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

2016-02-27 Thread James Schneider
On Fri, Feb 26, 2016 at 6:04 PM, Malik Rumi wrote: > JAMES wrote: >>> Can you post the entire section for your urls.py, as > well as the entire traceback? Nothing is immediately jumping out at me. Do > you get this error when you start the Django server, or when you visit the > page that matches

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

2016-02-27 Thread James Schneider
> > > 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 ear

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

2016-02-27 Thread James Schneider
On Fri, Feb 26, 2016 at 6:38 PM, Malik Rumi wrote: > *OK, so maybeMAYBE I've got this figured out. The problem is here:* > > https://docs.djangoproject.com/en/1.9/ref/urls/#django.conf.urls.url > > > *I knew this, but note the examples still use the parens()* > > > https://docs.djangoproject.

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

2016-02-26 Thread James Schneider
On Feb 26, 2016 5:55 PM, "Malik Rumi" 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 impor

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

2016-02-26 Thread Malik Rumi
*OK, so maybeMAYBE I've got this figured out. The problem is here:* https://docs.djangoproject.com/en/1.9/ref/urls/#django.conf.urls.url *I knew this, but note the examples still use the parens()* https://docs.djangoproject.com/en/1.9/ref/urls/#patterns *but that's what patterns is. It i

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

2016-02-26 Thread Malik Rumi
JAMES wrote: >>> Can you post the entire section for your urls.py, as well as the entire traceback? Nothing is immediately jumping out at me. Do you get this error when you start the Django server, or when you visit the page that matches this URL? *This error comes when I try to start the serv

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

2016-02-26 Thread Malik Rumi
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.vi

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

2016-02-26 Thread Malik Rumi
Hi James, thanks for replying and I hope you are still online tonight, because I just got this same error again, but this time for my admin: I've been working on this particular project for weeks and it has never complained about this config. File "/home/malikarumi/Projects/cannon/jamf/jamf/u

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

2016-02-26 Thread James Schneider
On Fri, Feb 26, 2016 at 2:27 PM, Malik Rumi wrote: > File "/home/malikarumi/Projects/cannon/jamf/essell/urls.py", line 23, in > > url(r'^code/(?P)/', CodeDetailView.as_view(), name='family'), > TypeError: 'function' object has no attribute '__getitem__' > > I understand that DetailView does

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

2016-02-26 Thread Malik Rumi
File "/home/malikarumi/Projects/cannon/jamf/essell/urls.py", line 23, in url(r'^code/(?P)/', CodeDetailView.as_view(), name='family'), TypeError: 'function' object has no attribute '__getitem__' I understand that DetailView does not have __getitem__. I also understand that __getitem__ is us