-
in the project you want to use it type:
pipenv install -e git+https://github.com/astrosat/django-astrosat-core.git@master#egg=django-astrosat
-
add "astrosat" to your INSTALLED_APPS settings like this:
INSTALLED_APPS = [
...
'astrosat',
...
]
- include the astrosat URLconf in your project "urls.py" like this:
path("", include("astrosat.urls")
-
run
python manage.py migrate
to create the astrosat models. -
profit!
django-astrosat-core comes w/ an example project to help w/ developing/testing
git clone https://github.com/astrosat/django-astrosat-core.git
cd django-astrosat-core/example
- activate virtual environments as desired
pipenv install
python manage.py makemigrations && python manage.py migrate
as neededpython manage.py collectstatic --noinput
as neededpython manage.py runserver
goto "http://localhost:8000" and enjoy
note that "django-astrosat-core/examples/Pipfile" was created using pipenv install -e ..
; this uses a pointer to "django-astrosat-core/setup.py" in the virtual environment and creates a entry like [packages.ed0a5ba]; if the distribution changes just run pipenv update ed0a5ba
, otherwise code changes should just be picked up b/c of the -e
flag.
Note note that when things go wrong, I tend to get this error: "LookupError: No installed app with label 'admin'."