On 14 Apr, 19:33, "Norman Harman" <[EMAIL PROTECTED]> wrote:
>
> myview should be in the views.py of your app.  The urlpatterns above is
> pointing to some django views file.  You shouldn't edit the django
> source if you can avoid it.

myview resides in views.py and I'm importing it correctly (from
myapp.views import myview), that's why I'm calling myview and not
"myview" or 'myview' in that pattern. I'm calling the "django views
file" in the urlpattern because, as I said, it is used by all the
other patterns residing in this urlconf. I tried to get rid of that
django view file, leaving empty '' but it didn't work either
(returning 404 on a valid url).

> urlpatterns = patterns('',
>         (r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[\w\d\-]
> +)/$', "myapp.views.myview", dict(entry_info_dict, month_format='%m', 
> template_object_name='entry')),
> )
>
> Not sure if that caused your 404.  They are usually caused by missing
> data (if you used incorrect slug in url), or if regex in urlpatterns is
> wrong.  Turning debug=True in your settings.py should give you more
> information on why there is 404's.

Debug *is* enabled, but it is just throwing me the 404 with no
additional info. Therefore I am assuming there's something wrong in
how I wrote myview, but I am 100% sure it gets called because if I
intentionally mess up myview, it throws errors when I load an url
matching its pattern.

So there must be something wrong in the way I pass data to myview
(it's either year/month/day/slug/ or the queryset). The queryset
itself, however is setup right because it works when I use
'object_detail' instead of myview. Same goes for the regexp's, they
work with 'object_detail'.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to