Skip to content

zeabur/django-static-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static and Media Files in Django

Example repo for the Working with Static and Media Files in Django article.

Getting Started

  1. Clone down the repo

  2. Create and activate a virtual environment

  3. Install the dependencies:

    $ pip install -r requirements.txt
  4. Apply the migrations:

    $ python manage.py migrate

Development Example

$ python manage.py runserver

Production Example

  1. Set DEBUG to False in the settings.py file

  2. Then, collect the static files and run Gunicorn:

    $ python manage.py collectstatic
    $ gunicorn core.wsgi:application -w 1

This DOES NOT use WhiteNoise to serve up the static files.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published