Closed xen closed 15 years ago
Are you sure it's not just some other issue? Where did you see that it was bad practice?
I can confirm that relative paths don't work with Django 1.1. If you add
[sourcecode:python] from google.appengine.dist import use_library use_library('django', '1.1') import django from django import forms django.newforms = forms [/sourcecode]
to admin.py the admin pages fail with a TemplateSyntaxError because of a missing template (it's actually not a syntax error in the template).
But I think this problem only occurs if google.appengine.ext.webapp.template is used since the customized template loader in that module restricts the template paths to a single directory. When using the native Django template loader and renderer I had no problems.
Sorry for delay and thank to andialbrecht for quick response. I'm tested locally with Django 1.1 and it was one of the issues, but only one with templates. Also I found that some other people have same problems here http://stackoverflow.com/questions/671369/django-specifying-a-base-template-by-directory
Fixed with andialbrecht's patch.
In admin templates base.html call {% extend "../base.html" %}. I'm try it with other Django version and its stop working. Seems like it is bad practice and you can't guaranty that it will work. So may be best way is divide admin and user templates or move both to same folder.