Skip to content

kevinbowen777/django-start

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-start

Status GitHub Issues License Coverage

  • django-start - A Django framework reference repository

  • A reference template of "best practices" & standards used in my collection of Web Framework Projects. This repository runs a Django 5.2.x web application demonstrating some of this functionality.

Table of Contents

Features

  • Application

    • User registration with email verification & social(GitHub) login using django-allauth
    • Bootstrap4 & crispy-forms decorations
    • Customizable user profile pages with bio, profile pic, & country flags
    • Image carousel
    • Pagination template
    • Centered account templates(login, registration, verification, etc.)
    • For additional links to package resources used in this repository, see the Package Index
  • Dev/testing

  • run and drun command menus

    A collection of command shortcuts/aliases for frequently used Docker, Django, and Nox commands. For a local installation, use the run command file. For Docker installations, use the drun command file. (adapted from Nick Janetakis' helpful docker-django-example) repository.

    You can run ./run to get a list of commands and each command has documentation in the run file itself. This comes in handy to run various Docker commands because sometimes these commands can be a bit long to type.

    If you get tired of typing ./run you can always create a shell alias with alias run=./run in your ~/.bash_aliases or equivalent file. Then you'll be able to run run instead of ./run.


Installation

  • git clone https://github.com/kevinbowen777/django-start.git
  • cd django_start
  • Local installation:
    • poetry shell
    • poetry install
    • python manage.py migrate
    • python manage.py createsuperuser
    • python manage.py runserver
  • Docker installation:
    • docker compose up --build
    • docker compose build --build-arg "ENV=DEV" (include testing/dev dependencies)
    • docker compose build --build-arg "ENV=PROD"
    • docker compose exec web python manage.py migrate
    • docker compose exec web python manage.py createsuperuser Additional commands:
      • docker compose exec web python manage.py shell_plus (loads Django shell autoloading project models & classes)
      • docker run -it django-start-web bash (CLI access to container)
  • Browse to http://127.0.0.1:8000 or http://127.0.0.1:8000/resources/
  • Pre-commit:
    • To add the hook, run the following command in the poetry shell:
      • pre-commit install
    • To update the pre-commit hooks, run the following command:
      • pre-commit autoupdate
  • Documentation
    • nox -s docs-3.13
    • Open browser to docs/_build/index.html

Testing

  • docker compose exec web python manage.py test
  • coverage run -m pytest
  • Nox (includes sessions for coverage, docs, lint, pyright, audit, tests)
    • testing supported for Python 3.11, 3.12, 3.13
    • e.g. nox, nox -rs lint-3.13, nox -s tests
      • nox
      • nox -s coverage-3.12
      • nox -s docs-3.13
      • nox -rs lint-3.11 (Use the 'r' flag to reuse existing session)
      • nox -s audit (will run tests against all Python versions)
      • nox -s tests

Application Demo

  • TBD

Screenshots

Home

Home

Login Page

Login Page

Logged in user with dropdown

Dropdown detail

Profile Page

Profile Page


Contributions

At this time, this project is not accepting pull-requests. You are free to fork this repository and modify as you see fit.


Reporting Bugs

Visit the Issues page to view currently open bug reports or open a new issue.

About

Django web framework reference repository

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •