jorgebastida / django-dajax

Easy to use library to create asynchronous presentation logic with django and dajaxice
http://dajaxproject.com/
BSD 3-Clause "New" or "Revised" License
346 stars 99 forks source link

No support for non-blank SERVER_ROOT_URL #40

Closed chriscrowe closed 12 years ago

chriscrowe commented 12 years ago

Submitted this in error to the dajaxice repo several months ago-- I'm not sure if it has been fixed since then.

I have a non-blank SERVER_ROOT_URL for a particular project, which means URLs for all the views in my project are of the form: www.mysite.com/project_name/some_view

Instead of: www.mysite.com/some_view

My configuration is only this way in the production server, not the dev server. Consequently, dajax works great on my dev server but not the production server. It seems the reason for this is because dajaxice uses only DAJAX_MEDIA_PREFIX to generate the paths to the ajax views and doesn't take SERVER_ROOT_URL into account. The result on my production server is that the ajax view urls look like this: www.mysite.com/dajaxice/myapp.some_view

When they should really look like this: www.mysite.com/project_name/dajaxice/myapp.some_view

Can you offer some insight here? I've spent hours trying to figure out if I just had it configured incorrectly... I tried changing the DAJAX_MEDIA_PREFIX to something else but it didn't seem to fix the problem since you have multiple dependencies on that prefix in your code...

jorgebastida commented 12 years ago

I've release django-dajaxice 0.5 http://pypi.python.org/pypi/django-dajaxice and django-dajax 0.9.1 http://pypi.python.org/pypi/django-dajax. This issue should be fixed now.

Thanks!