Try running
> python Scripts\django-admin.py runserver
On windows, the .py extension will be registered with your defaut
installation of python and that's the one it's using if you call the
script directly
Carles
On 14 Jul, 09:54, Mike Dewhirst wrote:
> Trying to get virtualenv working for th
In terms of best practices for Django templates, I recommend that you
try to use template inheritance extensively, in similar ways as when
you would use subclassing:
- Create a base.html template with everything that appears in all your
pages (common header and footer, generic html headers...).
-
Your "place" object will contain an attribute called "restaurant" to
access
the object as an instance of the subclass.
If this place object is an instance of another place subclass,
accessing the
restaurant attribute will raise a DoesNotExist error.
Carles.
On 28 Oct, 01:39, Tom Eastman wrote:
I sometimes use the direct_to_template generic view for a different
purpose than yours (test a template), but the same URL pattern might
be useful to you:
# test a template
(r'^direct/(?P.*)$',
'django.views.generic.simple.direct_to_template'),
Although you'd better use a better regex to
If the ideal solution for you is different sites, one authentication,
I found a reference in...
http://stackoverflow.com/questions/556907/how-to-get-distinct-django-apps-on-same-subdomain-to-share-session-cookie
...pointing to a "django-cas" application that is meant for that
purpose (Single Sign-
> Given this control flow let's try to do some of the typical
> modifications mentioned above:
> Authorization:
> Django has a beautiful mechanism for authorization, which is using
> decorators (@may_do_a_b_or_c) directly in the views.py.
> Tempting, but will not be modifyable in any way once you l
At some point I also thought this was a good idea. This way I can
reuse the app and all its visual stuff as well.
But the problem is that for most cases you will want your templates
and media to be consistent with a site's design and look&feel. This
means that for two projects (sites) re-using the
7 matches
Mail list logo