Yes, I actually just tried that a few seconds ago and now it works. Thanks
Andrew On 24 Sep, 20:48, Emiel van de Laar <em...@vandelaar.name> wrote: > On Sep 24, 2009, at 9:20 PM, W3 wrote: > > > > > Sorry the url.py is like so: > > > ('^myposts/$', 'myproject.myapp.views.blog'), > > (r'^myposts/(?P<slug>.+)/$', 'myproject.myapp.views.title_view'), > > > On 24 Sep, 20:17, When ideas fail <andrewkenyon...@gmail.com> wrote: > >> Hello, I was wondering if somebody could tell me what i'm doing > >> wrong. > > >> I keep getting this error relating to a url tag: > > >> Traceback: > >> File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in > >> get_response > >> 92. response = callback(request, *callback_args, > >> **callback_kwargs) > >> File "C:\Apache2.2\myproject\myapp\views.py" in myapp > >> 42. context_instance=RequestContext > >> (request)) > >> File "C:\Python26\lib\site-packages\django\shortcuts\__init__.py" in > >> render_to_response > >> 20. return HttpResponse(loader.render_to_string(*args, > >> **kwargs), **httpresponse_kwargs) > >> File "C:\Python26\lib\site-packages\django\template\loader.py" in > >> render_to_string > >> 108. return t.render(context_instance) > >> File "C:\Python26\lib\site-packages\django\template\__init__.py" in > >> render > >> 178. return self.nodelist.render(context) > >> File "C:\Python26\lib\site-packages\django\template\__init__.py" in > >> render > >> 779. bits.append(self.render_node(node, context)) > >> File "C:\Python26\lib\site-packages\django\template\debug.py" in > >> render_node > >> 81. raise wrapped > > >> Exception Type: TemplateSyntaxError at / > >> Exception Value: Caught an exception while rendering: Reverse for > >> 'myapp_views.title_view' with arguments '(u'Hello',)' and keyword > >> arguments '{}' not found. > >> ---------------------------------------------------------------------------------------------------------------------------------------------------------------- > > >> my view for this is defined like this > > >> def title_view(request, slug): > >> if request.method == 'POST': > >> ....... > > >> and in my template I have this: > > >> {% for object in posts.object_list %} > >> <h2><a href="{% url myapp_views.title_view object.post_slug %}"> > > ----------------------------^ > Replace the _ with a . So myapp.views.title_view > > Perhaps this is your typo. > > Regards, > > - E --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---