GithubHelp home page GithubHelp logo

Comments (5)

Parbhat avatar Parbhat commented on June 23, 2024

@chrisdev make test can also be included in the list

from wagtail-cookiecutter-foundation.

chrisdev avatar chrisdev commented on June 23, 2024

Correct!!
If you think we need to add any more stuff?

from wagtail-cookiecutter-foundation.

Parbhat avatar Parbhat commented on June 23, 2024

@chrisdev working on makefile will be adding things as encountered

from wagtail-cookiecutter-foundation.

chrisdev avatar chrisdev commented on June 23, 2024

@Parbhat The make file should also cover the static sites
Here are the manual instructions

Generating a static site

For this project we will generate a static site using django medusa_ and the
wagtail.contrib.wagtailmedusa.

Note the official django medusa_ repo is broken_ so we have to use this fork_
which is specified in the requirements file.

.. _django medusa: https://github.com/mtigas/django-medusa
.. _this fork: https://github.com/ctxis/django-medusa
.. _broken: wagtail/wagtail#1183

Installing django-medusa


First, install django medusa from pip:

.. code::

    pip install django-medusa


Then add ``django_medusa`` and ``wagtail.contrib.wagtailmedusa`` to ``INSTALLED_APPS``:

.. code:: python

    INSTALLED_APPS = [
       ...
       'django_medusa',
       'wagtail.contrib.wagtailmedusa',
    ]

Add the following to the settings file

.. code:: python

    MEDUSA_RENDERER_CLASS = "django_medusa.renderers.DiskStaticSiteRenderer"
    MEDUSA_MULTITHREAD = True
    MEDUSA_DEPLOY_DIR = 'wesleyan_static_site'



Rendering

Start by loading the initial data for the site

.. code:: bash

./manage.py loaddata core/fixtures/core_data.json

Make your changes using the admin as with a normal site. You may want to store
your changes

.. code:: bash

./manage.py loaddata core/fixtures/core_data.json

To render a site, first

.. code:: bash

./manage.py staticsitegen 

This will render the the html for the entire website and place the HTML in
a folder called wesleayn_static_site. Next run

.. code:: bash

./manage.py collectstatic

This will bundle all the static files used by your app into the static folder
at the root of the project.

Finally, copy the static and media folders to wesleyan_static_site.

To test.

.. code:: bash

cd wesleyan_static_site
python -m SimpleHTTPServer

from wagtail-cookiecutter-foundation.

Parbhat avatar Parbhat commented on June 23, 2024

@chrisdev great adding it

from wagtail-cookiecutter-foundation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.