Skip to content
Django - One App Project (Python Tutorial)
Python Batchfile Shell HTML
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
mysite update Mar 15, 2020
.gitignore init Mar 10, 2020
manage.py
readme.md
setup.bat update Mar 15, 2020
setup.sh

readme.md

Simple base project where we put all files in the mysite project package directory.

Instructions

Run the following commands to setup the project:

Windows:

git clone git@github.com:SamuliNatri/django-one-app-project.git project
cd project
setup.bat

MacOS / Linux:

git clone git@github.com:SamuliNatri/django-one-app-project.git project
cd project
chmod u+x setup.sh
./setup.sh

Scripts

setup.bat contains these lines:

py -m venv venv
call venv\Scripts\activate.bat
pip install django
python manage.py makemigrations
python manage.py migrate
python manage.py loaddata mysite\fixtures\data.json
python manage.py runserver

setup.sh contains these lines:

python3 -m venv venv
source venv/bin/activate
pip install django
python manage.py makemigrations
python manage.py migrate
python manage.py loaddata mysite/fixtures/data.json
python manage.py runserver

The scripts

  • Create a virtual environment in the project root.
  • Install the Django package.
  • Run migrations.
  • Load one blog post and admin user into the database using a fixture. Username and password is admin.
  • Run the Django development server.
You can’t perform that action at this time.