The easiest thing to do is to create each site as a separate project. Define a base template for that project inside templates directory and link your css in that template. Extend that template in all your other templates. Same goes for users. Each project/site will have it's own db and its users.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/xM3TUeVaOA4J.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
You're right, a site is a container of applications and an application
should do one thing and one thing only.
Normally, you don't want your site to contain applications and at the
same time have those applications inherit from your site's main template
or so.
But... django sticks all the templates/ and static/ directories of all
apps and sites together. So nothing stops you from sticking a very basic
base template in every app ("yourapp/templates/base.html") with just a
sidebar and main content block or so. You can have your apps use that.
In your site, you provide the real "yoursite/templates/base.html", which
will win because your site is higher up in the INSTALLED_APPS list.
Stuff that one full with the real layout and css, but keep providing the
sidebar and content block (or whatever you need).
Alternative: just make templates in the apps and customize them in the
site. Not as nice imho.
ALternative: start a base UI app that just provides a layout. Use that
in the apps.
Reinout
--
Reinout van Rees http://reinout.vanrees.org/
rei...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"