Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

django-de/django-de-v4

Repository files navigation

django-de-website

Installation

$ # Clone repository
$ git clone [email protected]:django-de/django-de-website.git

$ npm install
$ pipenv install

$ # run tests
$ pipenv run py.test

Development settings

Create the file djangode/settings.py with the following content, feel free to add some custom settings for local development:

from djangode.conf.dev_settings import *

Setup the database for development

For Development:

$ createdb djangode_dev

After all you can migrate the database:

$ pipenv run ./manage.py migrate

Static file compilation

How static files are treated

  • All client/browser related files are stored in client/.
  • Static files which don't need processing are in client/assets.
  • CSS and JS are compiled into the build/ folder using a make command.
  • Asset files are simply copied to the build/ folder.
  • Django's collectstatic takes everything from the build/ folder plus the "classic" application static files and puts them in STATIC_ROOT. This is also the folder we serve with the webserver.

For CSS we use a factory of: Node-Sass for CSS compilation + autoprefixer.

For JS we use browserify to collect all dependencies, from client/js as well as from the node_modules into one file. We transform that with Babel from ES6 to ES5 for compatibility reasons. We compress that with uglify.

$ npm install

Staring the server & superuser

$ # Create a new super user
$ pipenv run ./manage.py createsuperuser

Now you can run the webserver and start using the site.

$ pipenv run ./manage.py runserver

This starts a local webserver on localhost:8000. To view the administration interface visit /admin/

Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published