Friday, February 26, 2016

Re: errors while trying to add extra context (detailview, __getitem__)


On Feb 26, 2016 5:55 PM, "Malik Rumi" <malik.a.rumi@gmail.com> wrote:
>
> And here is the code from the original error:
>
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
> from django.conf.urls import include, url, patterns
> from . import views
> from django.views.generic.base import TemplateView
> from essell.models import Code
> from essell.views import CodeListViewAll
> #from essell.views import CodeDetailView
> from essell.views import CodeDetail
>
>
> urlpatterns = patterns(['',
>     url(r'^$', TemplateView.as_view(template_name='library.html')),
>     url(r'code/', CodeDetail.as_view(template_name='code_family_detail')),

You've got CodeDetail instead of CodeDetailView, is that correct? That's not the class that you posted earlier.

-James

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWE9j9M90Hk%3Di%3DbknDB_4iPhJkDj_uLxB7QDA5soe-Yaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment