The if condition in my html template is not working, only else is
executing.
view function is
def test(request):
lists=Book.objects.all()
return render_to_response('test.html',{'book':lists})
template file:test.html
{% if lists %}
{% for a in lists %}
There are {{book|
i am implementing the django admin interface in my site.
after changing the settings and the urls file, i am getting an import
error on the web browser.
the error was "import error"
"No module named urls"
also when i check for that file by giving the command 'pydoc
django.contrib.admin.urls' in te
while executing the following model i got the error message
__init() got an unexpected keyword argument 'maxlength'
from django.db import models
class Author(models.Model):
name=models.CharField(maxlength=20)
city=models.CharField(maxlength=10)
--
You received this message because you
be doing something wrong - although as far as I
| can see your code is identical to mine.
\--
Just for the record, I manually installed Django 1.3 RC1, and it worked.
Thanks for your help,
SK
--
Shakthi Kannan
http://www.shakthimaan.com
--
You received this message because you are subscribed
d using the following in
settings.py to no avail.
FIXTURE_DIRS = ( '/tmp/mysite/polls/fixtures/', )
What could be missing? If you have a working app/ solution for that
above that I can refer, it will be very helpful, or if you suggest any
other methods to load dynamic test data, please l
5 matches
Mail list logo