ceys / django-tracking

Automatically exported from code.google.com/p/django-tracking
MIT License
0 stars 0 forks source link

middleware thinks every page is not-a-valid-url #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install
2. run

What is the expected output? 
Each hit would produce a call to the db creating a visitor object

What do you see instead?
settings.MEDIA_URL (by default) = ''
This causes the prefixes list to contain a '', which when compared to the
request.path ( middleware.py, line ~28)  using;
if request.path.startswith(prefix):
causes every path to return valirURL=False, and skip the rest of the code

What version of the product are you using? On what operating system?
Linux, 0.1

Please provide any additional information below.
I patched it with 
        if settings.MEDIA_URL:
            prefixes.append(settings.MEDIA_URL)
        if settings.ADMIN_MEDIA_PREFIX:
            prefixes.append(settings.ADMIN_MEDIA_PREFIX)

im at (remove Xs) mXrkXiwiX@gmail.com

Original issue reported on code.google.com by mrk...@gmail.com on 3 Oct 2008 at 9:22

GoogleCodeExporter commented 8 years ago
I apologize for the delay in responding to this issue... Forgot to setup the 
issue
notification for the project.

Thanks for posting a work-around.  I'll put it in the code tonight!

Original comment by wheaties...@gmail.com on 6 Nov 2008 at 8:40

GoogleCodeExporter commented 8 years ago
I've checked in the code with this change.  Thanks mrkiwi!

Original comment by wheaties...@gmail.com on 10 Nov 2008 at 7:02