python - How to reverse django feed url? -
I am searching for hours to try and understand it, and it seems that no one is online instantly Gives - I have just created a Django 1.2 RSS Feeds View Object and attached it to the URL. When I go to url, everything works great, so I know that my implementation of the feed class is fine.
There is a bottleneck, I do not know how to link to the url in my template. I could only have worked hard, but I was using more% {url%}
I tried to cross the full path like this:
{% url app_name .lib.feeds.LatestPosts blog_name = name%}
And I could not find anything. I am searching and it seems that everyone has such a clear solution that it is not worth posting online Do I have a lot of time now?
Here is the realval URL pattern:
app.lib Import from feeds LatestPosts urlpatterns = patterns ('app.blog.views', (R 'RSS / (? P & lt; blog_name & gt; [azza-j 0-9] +) / $', latest post "> You can, for which url
Helper function:
django.conf.urls.defaults import from url, pattern urlpatterns = pattern ( 'App.blog.views', url (r' ^ rss / (? P <
Then, you can enter {% url latest-posts blog_name = " Myblog "%}"
.
Comments
Post a Comment