Wagtail Setup and Development
Last updated
Last updated
In the Terminal of VSCode, run the local server:
If at this step you encounter a message saying that you have x amount of unapplied migrations
, please refer to the Performing Django migrations on the Docker container section on the page. Come back to this page after you have applied the migrations to your Docker database.
You should now be able to develop inside the Docker container. However, before you will be able to see your development version of the site on , you must configure the Wagtail CMS (content management system).
The username is volunteer@ubyssey.ca
, password is volunteer
Create a new root page (other than the currently existing 'Welcome to your new Wagtail site!'). Your new page should not be a child page of the default 'Welcome' site.
To 'compile' static files such as CSS during development, run gulp buildDev
in the folder where gulp is installed.
Building static files with gulp is a step in front-end development which is somewhat analogous to compiling.
If you see that there is no CSS styling applied to the HTML in (http://localhost:8000/), you may need to set-up ubyssey.ca/ubyssey/static/
In the Docker container (i.e. in the VSCode workspace Terminal):
Install the required Node packages with npm:
Install a global version of gulp (if you don't have it already) and build the static files:
_If you run into any error while installing npm or gulp, remove ubyssey.ca/ubyssey/static_src/node_modules
by running rm -rf node_modules
.
Going to without setting up Wagtail, you will see a blank site that says 'Welcome to your new Wagtail site'.
You can see Wagtail by going to . Make sure your server is running.
Change the site root to your newly created page in Settings -> Sites. here.
You should now be able to see an empty site resembling the live Ubyssey site at .
Download and unzip the to ubyssey-dev/ubyssey.ca/media/
. This will make it so the images attached to the sample articles are viewable.