Dear Group,

I am very new to Django, and started with Django on Windows. I am using 
Python 2.7.9. I have some 
issues learning it. 

(a) I was following the Tutorial given in 
https://docs.djangoproject.com/en/1.8/intro/tutorial02/
It is generally going fine I am using, 1.8.1 of Django as given in 
>>> django.get_version()
'1.8.1'
Here as I gave 
python manage.py runserver
I could find the login page, http://127.0.0.1:8000/admin/ and could login 
using my login id and password.
But as I changed the admin.py with admin.site.register(Question) I could 
not find the changed view of the login page, rather it is 
not coming anymore.

(b) I was trying to follow the earlier part of the Tutorial given in,
https://docs.djangoproject.com/en/1.8/intro/tutorial01/, things were 
generally fine, 
but somehow I am failing to follow, 
def __str__(self):              # __unicode__ on Python 2
        return self.question_text
in models.py, I am not being able to write models.py
So, if I use it as,
In [12]: Question.objects.all()
Out[12]: [<Question: Question object>]

In [13]: from polls.models import Question, Choice

In [14]: Question.objects.all()
Out[14]: [<Question: Question object>]

In [15]: Question.objects.filter(id=1)
Out[15]: [<Question: Question object>]

In [16]: Question.objects.filter(question_text__startswith='What')
Out[16]: [<Question: Question object>]

In [17]: from polls.models import Question, Choice

In [18]: Question.objects.all()
Out[18]: [<Question: Question object>]

In [19]: Question.objects.filter(id=1)
Out[19]: [<Question: Question object>]

I am not getting the desired output.

If any one may kindly suggest what is the error I am doing.

Thanks in advance,
Regards,
Subhabrata Banerjee. 








 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/547a0366-b238-4c13-9978-e57450f84d6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to