Is it possible you are testing using a browser and it is doing a request
for the page and for favicon.ico? That would end up being 2 requests. You
can use something like Chrome Developer Tools or Firebug to see.

-Jeff

On Tue, Aug 21, 2012 at 4:07 PM, James Verran <ja...@verran.ca> wrote:

> Hi there, I'm trying to capture all url path data. (Except admin, and a
> couple other paths.)
>
> At the end of my urls.py file, I'm using r'^(.*)$'... On my associated
> view, I make a simple entry into a database - ie:
> Test(path=capturedpath).save()
>
> The problem: my database entry is saved twice! Or rather, my view is being
> loaded twice. I added a global variable to check- if not
> globals()['already_saved']: Test(path=capturedpath).save()
>
> If I adjust the path: r'^test/(.*)$'  all works as expected (here my url
> would be 
> 'mysite.com/test/url/data/to/capture'<http://mysite.com/test/url/data/to/capture%27>
> .)
>
> I'm using django 1.4. Any help/thoughts/suggestions would be much
> appreciated.
>
> Thanks!
>
> --
> 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.
>

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

Reply via email to