Skip to content
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

Support S3 static files storage #58

Merged
merged 3 commits into from
Apr 7, 2014
Merged

Support S3 static files storage #58

merged 3 commits into from
Apr 7, 2014

Conversation

jnm
Copy link
Contributor

@jnm jnm commented Mar 7, 2014

Hello,

This lets django-leaflet work in an "advanced use case such as using a cloud service to serve static files," as described in https://docs.djangoproject.com/en/dev/ref/templates/builtins/#static.

Thanks for your consideration.

@@ -49,6 +49,8 @@ USAGE

* Add ``leaflet`` to your ``INSTALLED_APPS``

* Make sure ``django.contrib.staticfiles`` is also in your ``INSTALLED_APPS``; Django >= 1.3 `includes this by default <https://docs.djangoproject.com/en/1.3/intro/tutorial01/#database-setup>`_

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we add this as a footnote for the very few users still running Django < 1.3 only ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, should I make a new section called "Footnotes"? This INSTALLED_APPS issue is actually part of why the Travis tests are failing. This does not match the defaults for recent version of Django: https://github.com/makinacorpus/django-leaflet/blob/master/quicktest.py#L22.

@leplatrem
Copy link
Collaborator

Thanks for the contribution !
The test suite fails with recent versions of Django. Could you please have a look ?

@leplatrem
Copy link
Collaborator

@jnm Any news ?

@jnm
Copy link
Contributor Author

jnm commented Mar 31, 2014

@leplatrem, I just had a look at this. There are at least two problems. One is that INSTALLED_APPS in quicktest.py does not contain 'django.contrib.staticfiles'. That's easy, but once corrected, Django complains about STATIC_URL not being defined. If I define it, test_all_resources(), test_default_resources(), and test_explicit_resources() all fail due to STATIC_URL being prepended to the paths. STATIC_URL = '' unfortunately does not satisfy Django.

I'm out of time to work on this today, but perhaps I could resume later in the week.

@leplatrem
Copy link
Collaborator

Ok, I pushed an updated of the tests and project setup.
Just rebase or merge your branch with current master, and see if it fixes the testing suite :)

Thanks for pointing this out :)

@jnm
Copy link
Contributor Author

jnm commented Apr 4, 2014

Woohoo!

@leplatrem
Copy link
Collaborator

Perfect, thanks !

leplatrem added a commit that referenced this pull request Apr 7, 2014
Support S3 static files storage
@leplatrem leplatrem merged commit 4c637a8 into makinacorpus:master Apr 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants