Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decouple templates: bootstrap, general, user, admin, base, index #32

Open
bepetersn opened this issue Apr 23, 2014 · 3 comments
Open

decouple templates: bootstrap, general, user, admin, base, index #32

bepetersn opened this issue Apr 23, 2014 · 3 comments

Comments

@bepetersn
Copy link
Member

It's way too cluttered right now. I can't understand how they all fit together in the least.

@MMisery
Copy link
Contributor

MMisery commented Apr 24, 2014

I'm not entirely sure where the issue lies for you, so I'll just rattle off a few things:

The "admin" folder in templates folder is largely useless - it's a remnant of time I/we was/were working with editing the look of the Django admin console. We've since moved to building our own interface and using decorators.

I don't currently recall a "general" or a "users" template, but I should be able to address the others. The other templates are built off "base", which contains a call to the JavaScript files. "Index" extends from "base" and is the home page for a logged in volunteer. Every template that's used by a view with the login_required decorator is extended from "index".

Now, could there be a better way of dealing with all of that? Possibly.

@bepetersn
Copy link
Member Author

My thoughts were basically twofold:

  1. "decouple" was a carefully chosen word. In "index.html", which as you say most of these files extend from, there is a lot of code we don't need. It looks like the home for /volunteer/home. Conceptually, at least, we should either move this code into its own file, or stop extending other templates from it.

  2. In general, I wanted to normalize the naming schemas. The direction in which it seems to me this should happen is along the line of who can access a given page -- of permissions. Templates in the "admin" folder can only be accessed by people with admin privileges, in the "users" folder by people with user privileges, and in the "general" folder by anyone.

What do you think?

@bepetersn bepetersn removed the design label Apr 26, 2014
@MMisery
Copy link
Contributor

MMisery commented Apr 26, 2014

I've nothing against setting a standard for names, and it's something I had to do in the last commit or two in order to fix some things. Just have to find every place the names are referenced. Also, if I'm not mistaken (which I likely am), the admin folder in a Django project is the second place Django looks to change the look of the default admin console, so there might have to be a setting changed in that case, if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants