Wednesday, February 29, 2012

Re: Error while importing URLconf 'permitprint.urls': day is out of range for month

The guy I built this for does not want to pay me to maintain it, so
it's still on .96. And yet when something breaks randomly he wonders
why. Debug enabled today for debugging. There is no dev
environment. Only production for this.

Here's the urlconf. I've literally commented out every urlpattern
expect the top one on line 4. Still breaks:

1 from django.conf.urls.defaults import *
2 from permitprint.app.models import *
3 urlpatterns = patterns('django.views.generic.simple',
4 (r'^/?$', 'direct_to_template', {'template': 'index.html'}),
5 """
6 (r'^contact/?$', 'direct_to_template', {'template':
'contact.html'}),
7 (r'^services/?$', 'direct_to_template', {'template':
'services.html'}),
8 (r'^cancel/?$', 'direct_to_template', {'template':
'cancel.html'}),
9
10 # Uncomment this for admin:
11 """
12 )
13 """
14 urlpatterns = patterns('',
15 (r'^register/(?P<community_id>\w+)/?$',
'permitprint.app.views.register'),
16 (r'^register/?$', 'permitprint.app.views.register'),
17 (r'^success/?$', 'permitprint.app.views.success'),
18 (r'^cancel/?$', 'permitprint.app.views.cancel'),
19 (r'^success-login/?$', 'permitprint.app.views.success_login'),
20 (r'^verify/?$', 'permitprint.app.views.verify'),
21 (r'^cancel-order-permits/?$',
'permitprint.app.views.cancel_order_permits'),
22 (r'^success-order-permits/?$',
'permitprint.app.views.success_order_permits'),
23 (r'^review-order-permits/?$',
'permitprint.app.views.review_order_permits'),
24 (r'^admin/app/parkingpermit/$',
'permitprint.app.admin.views.main.change_list',
{'app_label':'app','model_name':'ParkingPermit'}),
25 (r'^admin/app/userprofile/$',
'permitprint.app.admin.views.main.change_list',
{'app_label':'app','model_name':'UserProfile'}),
26 (r'^admin/app/orderpermits/$',
'permitprint.app.views.order_permits'),
27 (r'^admin/', include('permitprint.admin_urls')),
28 )
29 urlpatterns += patterns('django.views.generic.list_detail',
30 (r'^products/?$', 'object_list', product_list ),
31 (r'^products/(?P<slug>\w+)/?$', 'object_detail',
product_detail ),
32 (r'^links/?$', 'object_list', link_list ),
33 )
34 """


On Feb 29, 9:22 am, Tom Evans <tevans...@googlemail.com> wrote:
> On Wed, Feb 29, 2012 at 3:09 PM, furby <jasonno...@gmail.com> wrote:
> > A site I built several years ago is breaking randomly today due to the
> > extra leap year day.  Any help on this would be appreciated.  I can't
> > track it down.
>
> > Traceback (most recent call last):
> > File "/home/nolenjb/django/django_src/django/core/handlers/base.py" in
> > get_response
> >  68. callback, callback_args, callback_kwargs =
> > resolver.resolve(request.path)
> > File "/home/nolenjb/django/django_src/django/core/urlresolvers.py" in
> > resolve
> >  160. for pattern in self.urlconf_module.urlpatterns:
> > File "/home/nolenjb/django/django_src/django/core/urlresolvers.py" in
> > _get_urlconf_module
> >  180. raise ImproperlyConfigured, "Error while importing URLconf %r:
> > %s" % (self.urlconf_name, e)
>
> >  ImproperlyConfigured at /admin/
> >  Error while importing URLconf 'permitprint.urls': day is out of
> > range for month
>
> So, it is going wrong because something that is in your urlconf causes
> an exception, and so the urlconf cannot be imported. You need to show
> the code from your urlconf.
>
> Two other unrelated things:
>
> 1) You're running with DEBUG=True on a production site! Don't do that!
> 2) You seem to be using Django 0.96! Django 1.4 is about to be
> released, there are 'several' bugs fixed in between those two
> versions. Perhaps even something that causes this problem!
>
> Cheers
>
> Tom

--
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