Below you'll find the steps to create a 3rd-party Django app from scratch,
using the Maykin Media starting template. The <project_root>
is typically
placed in your home directory.
mkdir <project_root>
cd <project_root>
Create the virtual environment that holds your copy of Python and relevant libraries:
virtualenv env or virtualenv --python=/usr/bin/python3.10 env
source env/bin/activate
pip install django~=4.2.0
Start a new Django project, named <project_name>
, using the template. This
will be your Python import path.
django-admin startproject \
--template=https://github.com/maykinmedia/default-app/archive/main.zip \
--extension=py-tpl,rst,gitignore,in,ini,cfg,toml,yml,yaml \
-x .github \
--name LICENSE \
<project_name> .
And then set up the Github actions workflows:
mv dotgithub .github
{% endcomment %}
Version: | 0.1.0 |
---|---|
Source: | https://github.com/maykinmedia/{{ project_name }} |
Keywords: | <keywords> |
PythonVersion: | 3.10 |
<One liner describing the project>
Contents
- ...
- ...
- Python 3.10 or above
- Django 4.2 or newer
pip install {{ project_name }}
<document or refer to docs>
To install and develop the library locally, use:
.. code-block:: bash
pip install -e .[tests,coverage,docs,release]
When running management commands via django-admin
, make sure to add the root
directory to the python path (or use python -m django <command>
):
export PYTHONPATH=. DJANGO_SETTINGS_MODULE=testapp.settings
django-admin check
# or other commands like:
# django-admin makemessages -l nl