Skip to content

🏁 Django Start Project template with inertia-vue and auth

License

Notifications You must be signed in to change notification settings

iamdadmin/django-startproject

 
 

Repository files navigation

Welcome to django-startproject 👋

Twitter: webology CI

Django startproject template with batteries

🚩 Features

  • Django 4.2.x
  • django-click
  • Docker
  • Docker Compose
  • environs[django]
  • psycopg2-binary
  • whitenoise
  • inertia-django, django-vite
  • django-allauth (local only, but add your own additional providers)

💚 CI

  • django-test-plus
  • model-bakery
  • pre-commit
  • pytest
  • pytest-cov
  • pytest-django

🔧 Get Started

Step 0: Install Django and Python

Note: This assumes you've already installed Django>=4.2.7 and Python>=3.10 on your machine or in your venv and have activated it.

If you have not, you can install it with the following command (Ubuntu or Debian):

$ wget -O https://github.com/iamdadmin/django-startproject/blob/main/venv-build.sh && chmod +x venv-build.sh && ./venv-build.sh

$ source .venv/bin/activate

$ pip install django>=4.2.7

Step 1: Create a new project using this Quickstart

By convention, we recommend naming your project 'project' or 'config' - see here for more details.

We are going to use project in this example, but you can use any name you want.

$ mkdir mysite && cd mysite

$ django-admin startproject \
    --extension=ini,py,toml,yaml,yml \
    --template=https://github.com/iamdadmin/django-startproject/archive/main.zip \
    project .

Step n: Docker Build

Note this is assuming compose v2 as a plugin, you'll need to adjust the command to 'docker-compose' if you haven't set up this way.

# Build web docker
$ docker compose build

# Run Migrations
$ docker compose run --rm web python manage.py migrate

# Create a Superuser in Django
$ docker compose run --rm web python manage.py createsuperuser

# Run Django on http://localhost:8000/
$ docker compose up

# Run Django in background mode
$ docker compose up -d

# Stop all running containers
$ docker compose down

# Run Tests
$ docker compose run --rm web pytest

# Re-build PIP requirements
$ docker compose run --rm web pip-compile requirements/requirements.in

🔧 C

This is a fork of django-startproject by Jeff Triplett

👤 Jeff Triplett

If my fork isn't useful for you, consider using or making your own fork of Jeff's project and leave a star if it helped you.

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

About

🏁 Django Start Project template with inertia-vue and auth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 73.3%
  • JavaScript 14.5%
  • Shell 7.6%
  • Just 4.6%