Did you finish out the 'Amend Views' section of the tutorial?

https://docs.djangoproject.com/en/dev/intro/tutorial04/#amend-views

Based on the dir() output below, you didn't. You won't be able to reference
those view classes from your urls.py until you create them in views.py.

Personal note: I think the ordering in the tutorial sections is wrong. The
views should be created first and then referenced by an updated urls.py. I
may file a bug/patch on this.

-James

On Monday, September 1, 2014, Michael Martin <mikemartin...@gmail.com>
wrote:

> Here are the results that I recieved
>
> >>> from polls import views
> >>> dir(views)
> ['Choice', 'HttpResponse', 'HttpResponseRedirect', 'Question', '__doc__',
> '__fil
> e__', '__name__', '__package__', 'detail', 'get_object_or_404', 'index',
> 'render
> ', 'results', 'reverse', 'vote']
> >>>
>
>
> On Sat, Aug 30, 2014 at 4:01 PM, Sithembewena Lloyd Dube <
> zebr...@gmail.com <javascript:_e(%7B%7D,'cvml','zebr...@gmail.com');>>
> wrote:
>
>> I suggest typing:
>> - manage.py shell
>> - from polls import views
>> - dir(views)
>>
>> What output do you get? i.e, nspect views like the regular python module
>> that it is.
>>
>>
>> On Sat, Aug 30, 2014 at 6:41 PM, Pitchblack <mikemartin...@gmail.com
>> <javascript:_e(%7B%7D,'cvml','mikemartin...@gmail.com');>> wrote:
>>
>>> I need to use Jython instead of Python, I found that jython2.7b2 works
>>> with DJango 1.7. So, I am stuck using the beta version. I am trying to
>>> follow the current Django tutorial and I have ran into a problem. I am not
>>> sure if I am using generic views properly. When I try to change the urls.py
>>> (polls) file. I see that pydev complains that views.IndexView,
>>> views.DetailView, and ResultsView don't exist. Am I doing something wrong?
>>> Or did they change the way generics work in version 1.7?
>>>
>>> My System:
>>>
>>>    - Windows 7
>>>    - jython2.7b2
>>>    - Django-1.7c3
>>>    - postgresql-9.3.5-1-windows-x64
>>>    - postgresql-9.3-1102.jdbc41.jar
>>>
>>> Here is the url for the tutorial, go to the section "Use generic views:
>>> Less code is better"
>>> https://docs.djangoproject.com/en/dev/intro/tutorial04/
>>>
>>>
>>> <https://lh6.googleusercontent.com/-d0O9JeEjRZE/VAH-lS3X9SI/AAAAAAAAAFc/hMrYlZBw15o/s1600/DjangoGenericsError.JPG>
>>>
>>>
>>> <https://docs.djangoproject.com/en/dev/intro/tutorial04/>
>>>
>>> --
>>> 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
>>> <javascript:_e(%7B%7D,'cvml','django-users%2bunsubscr...@googlegroups.com');>
>>> .
>>> To post to this group, send email to django-users@googlegroups.com
>>> <javascript:_e(%7B%7D,'cvml','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/5be54cfd-ed53-40ca-b7e1-297814c1727d%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/5be54cfd-ed53-40ca-b7e1-297814c1727d%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Regards,
>> Sithu Lloyd Dube
>>
>> --
>> 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
>> <javascript:_e(%7B%7D,'cvml','django-users%2bunsubscr...@googlegroups.com');>
>> .
>> To post to this group, send email to django-users@googlegroups.com
>> <javascript:_e(%7B%7D,'cvml','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/CAH-SnCBTSo-C_99JOZuu4fZd3Uyc_UyOU5JEW%2BPYDqdJMYhYag%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAH-SnCBTSo-C_99JOZuu4fZd3Uyc_UyOU5JEW%2BPYDqdJMYhYag%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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
> <javascript:_e(%7B%7D,'cvml','django-users%2bunsubscr...@googlegroups.com');>
> .
> To post to this group, send email to django-users@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','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/CAD0urK1OdSq8uJKXYqYYDTRihqAutzmkn4vF8e2%3DJvrOiG0%3Dsw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAD0urK1OdSq8uJKXYqYYDTRihqAutzmkn4vF8e2%3DJvrOiG0%3Dsw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2Be%2BciXPjxciACs%3D%3DZCJ7h5DnAZQ6dnmBRrweKLUK_zTvgAvng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to