7👍
django-medusa is largely unmaintained. These are some alternatives mentioned in the project’s README:
- django-bakery, built and maintained the lovely people at the Los Angeles Times Data Desk. (Read about it
here.)- The alsoicode/django-medusa fork, by Brandon
Taylor. Among other things, it’s been
kept up to date for newer versions of Django.- django-freeze by Fabio Caccamo.
- django-staticgen by Mishbah Razzaque.
2👍
I understand your intent, but any decent framework these days offers some sort of caching mecanism that alleviate the pains of dynamic content. With a properly implemented cache, the difference between static and dynamic will be trivial. Trust me.
Happy coding, friend.
- Good Practice: Organizing views.py in Django Apps
- TypeError: float() argument must be a string or a number in Django distance
2👍
A new one has just been announced, though it has existed and been used by its author for quite some time:
I haven’t tried using it yet, but it sure looks good: I will be!
1👍
I have a similar setup using Django but on GAE. I have created a build script which I use to build my static HTML files. Since GAE’s version of Django templates is slightly different, this might need some testing.
But essentially you do something like
from django.template import Template, Context
from django.template.loader import get_template
t = get_template('template1.html') #Need to verify this. GAE template allows me to just call template.render(path, context). Not sure about pure Django templates
c = Context({ 'variable' : 'value'})
with open("file1.html", "w") as f:
f.write(t.render(c)) #This works for me, but if this doesn't in pure Django, try render_to_string
HTH
- Django heroku static dir
- In Django admin, how can I hide Save and Continue and Save and Add Another buttons on a model admin?
- Django south: changing field type in data migration
- How would I use django.forms to prepopulate a choice field with rows from a model?
0👍
You are asking for a dynamic site to host in a static environment, that is impossible. The only way is to export all the files, put them into a static server. You can do it with wget
, it will copy all the files and convert them to html.
One fallback of this problem is, it can only create html files, if there are links to the pages, ie. search forms etc. will not work, Javascript based linking may not work.
- Get all related many-to-many objects from a Django QuerySet
- Good ways to name django projects which contain only one app
0👍
I’m not familiar with anything that will convert an existing django site to a static html site. It might be worth looking at the suite of new django/python PaaS providers. A site like this should be easy to get running on one of these platforms and it should be pretty cheap month to month.
Some providers you might want to checkout include:
- Private messaging in Django
- Unable to get a non-model field in the validated_data of a Django Rest Framework serializer
- Django development server and MIME types
- Best practice for handling HTTP HEAD request with Django on App Engine