Hi,

i've started working on a very simple news app (still learning). Now i want to 
count the hits a topic gets. My url pattern looks like this:

urlpatterns = patterns('foo.news.views',
    (r'^$', 'index'),
    (r'^(?P<post_id>\d+)/$', 'detail'),
)

In my model i have an IntegerField called "count". What would be a good way to 
increment the post with post_id=1 when someone 
accesses "http://www.mysite.com/news/1";? Resp. where do i put my code?

Best Regards,
Dirk Eschler

-- 
Dirk Eschler <mailto:[EMAIL PROTECTED]>
http://www.krusader.org

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

Reply via email to