Tuesday, May 1, 2012

No Module Named Generic

Hi, I am having a problem, where as django doesn't find the generics module. Here is my urls.py

thanks in advance.

from django.conf.urls.defaults import *

from django.views.generic import *
from coltrane.models import Entry


entry_info_dict = {
        'queryset': Entry.objects.all(),
        'date_field': 'pub_date',
}

urlpatterns = patterns('',
    (r'^$', 'django.generic.date_based.archive_index',entry_info_dict, 'coltrane_entry_archive_index'),
    (r'^(?P<year>\d{4})/$', 'django.generic.date_based.archive_year',entry_info_dict, 'coltrane_entry_archive_year'),
    (r'^(?P<year>\d{4})/(?P<month>\w{3})/$', 'django.generic.date_based.archive_month',entry_info_dict, 'coltrane_entry_archive_month'),
    (r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$', 'django.generic.date_based.archive_day',entry_info_dict,'coltrane_entry_archive_day'),
    (r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$', 'django.generic.date_based.object_detail',entry_info_dict,'coltrane_entry_detail'),
)
        

Gerald Klein DBA

ContactMe@geraldklein.com

www.geraldklein.com

jk@zognet.com

708-599-0352


Linux registered user #548580 



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment