Skip to main content

Django application template repository.

Project description

!!! Remove this section !!!

  1. Create empty Git repository with your preferred name: example django-my-new-pkg-name
  2. Checkout local copy of this new empty repository
  3. Copy all the contents of this repository inside the new cloned empty repository
  4. Delete the directory src\django_pkg.egg-info
  5. Rename the directory inside src from PACKAGE_NAME to my_new_pkg_src_location
  6. Massive replace with match case the string model_mixin with your src location my_new_pkg_src_location
  7. Massive replace the string django-pkg with your new package's name django-my-new-pkg-name
  8. Edit the tests/settings.py file for the needed configuration to test your app
  9. Rename and edit the tests/test_fake.py file for the needed application's tests
  10. Copy or create all source's files of the app inside the src/my_new_pkg_src_location
  11. Install python's requirements pip install -r requirements/dev.in
  12. Install python's requirements pip install -r requirements/requirements.in
  13. Install python's package pip install . to test the package's local version
  14. Execute python runtests.py and validate all tests are passed (if any error is present, the automatic workflow on tag will fail)
  15. Edit docs ...
  16. Install python requirements pip install -r requirements/docs.in
  17. Execute python setup.py sdist bdist_wheel to build the project
  18. Execute twine upload dist/* to upload the built files
  19. Inside PyPi repository, generate new API key with the only scope of project
  20. Inside Git repository's settings, section General, enable the Allow auto-merge and Automatically delete head branches
  21. Inside Git repository's settings, section Access, add access to be able to execute workflows (as team member's or bot-user collaborator)
  22. Inside Git repository's settings, section Security, add security repository secret named PYPI_API_TOKEN to be able to upload packages inside PyPi's repository
  23. Add git files as first commit git add .github .gitattributes .gitignore

django-model-mixin PyPi license

PyPi status PyPi version PyPi python version PyPi downloads PyPi downloads PyPi downloads

GitHub GitHub release GitHub release

Test codecov.io pre-commit.ci status gitthub.com

Check Demo Project

  • Check the demo repo on GitHub

Requirements

  • Python 3.8+ supported.
  • Django 3.2+ supported.

Setup

  1. Install from pip:
pip install django-model-mixin
  1. Modify settings.py by adding the app to INSTALLED_APPS:
INSTALLED_APPS = [
    # ...
    "model_mixin",
    # ...
]
  1. Finally, modify your project urls.py with handlers for all errors:
# ...other imports...

urlpatterns = [
    # ...other urls...
]
  1. Execute Django's command migrate inside your project's root:
python manage.py migrate
Running migrations:
  Applying model_mixin.0001_initial... OK

Run Example Project

git clone --depth=50 --branch=django-model-mixin https://github.com/DLRSP/example.git DLRSP/example
cd DLRSP/example
python manage.py runserver

Now browser the app @ http://127.0.0.1:8000

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-model-mixin-0.2.0.tar.gz (16.4 kB view hashes)

Uploaded Source

Built Distribution

django_model_mixin-0.2.0-py2.py3-none-any.whl (10.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page