-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeoJSONLayerView and LoginRequiredMixin #89
Comments
Hi, Do you see the requests in your browser inspector ? Are the responses 403 or 200 ? |
Hi, responses are 302 with this parameters (layer is not loaded on map) whereas i can read this place.geojson from browser. # views.py
class GeoJSONData (LoginRequiredMixin, GeoJSONLayerView):
pass
# urls.py
url(r'^place.geojson$', GeoJSONData.as_view(model=Place, properties=('name', 'pk', 'municipality')),
name='geodata_place'), I get this message in firefox web console
while i'm already logged in response 200 with this config (layer loaded) # urls.py
url(r'^place.geojson$', GeoJSONLayerView.as_view(model=Place, properties=('name', 'pk', 'municipality')),
name='geodata_place'), |
From https://stackoverflow.com/q/34558264/2575355 :
|
Thanks a lot, it solved my problem. I noticed than this error occur when using AJAX. |
👍 |
Hi,
I'm using GeoJSONLayerView in my project. While I am using GeoJSONLayerView in my urls.py, it works.
My views.py:
My urls.py
My template:
But when i'm trying to use LoginRequiredMixin with GeoJSONLayerView, I can't get data on the map where as i can read my geojson data directly in my browser.
Any explanation?
Thanks.
The text was updated successfully, but these errors were encountered: