Installable django site skeleton
Project description
This is sample code used in the Real Python article [Writing an Installable Django App](???). The article describes how to take an app from an existing Django project and make it a stand-alone installable package avilable on PyPI.
Installable App
This app models a list of items on a receipt. Each item has a description and a cost. A receipt may reference multiple items.
This app can be installed and used in your django project by:
$ pip install realpython-django-receipts
Edit your settings.py file to include ‘receipts’ in the INSTALLED_APPS listing.
INSTALLED_APPS = [
...
'receipts',
]
Edit your project urls.py file to import the URLs:
url_patterns = [
...
path('receipts/', include('receipts.urls')),
]
Finally, add the models to your database:
$ ./manage.py makemigrations receipts
The “project” Branch
The master branch contains the final code for the PyPI package. There is also a project branch which shows the “before” case – the Django project before the app has been removed.
Docs & Source
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-installable-skeleton-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72eccb3c708802a070697edf02571149818b8f58641cfc2155d1e12f93a85fd8 |
|
MD5 | c952f44d84b554a5499ae1e0eef20d40 |
|
BLAKE2b-256 | 094c7acad755484d0d17e783fff9386c3c0c418e53a59995650fb61caecf8cc9 |
Hashes for django_installable_skeleton-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be2456a3a8c7e7ee1249943ebfce1122685976e536d480b78e0b414645906833 |
|
MD5 | 8c5e72d19f8ab46909b0aa47c0bd3752 |
|
BLAKE2b-256 | 224aed0312aa322989b22e0e94f040d6aa1c5238f0b2d6e8df8f335c66db95f0 |