A Django app to do anything with Django.
Project description
SmoothGlue Django Map App
This Django app provides backend api to support front end Map features such as Map Imagery Layers, CZML / GeoJSON python helper classes (coming soon), etc.
Development
Set Up Virtual Environment and Install Required Packages
This project uses Poetry for dependency management and packaging.
- Install Poetry if you haven't already.
- Run
poetry installto create a virtual environment and install dependencies.
Running Management Commands With Your App
-
smoothglue/map/tests/boot_django.py to set up a Django environment using Django’s settings.configure() and django.setup() to allow interacting with your app outside of a project.
- The settings.configure() call inside this file takes a list of arguments that are equivalent to the variables defined in a settings.py file. Anything you would need in your settings.py to make your app run gets passed into settings.configure().
- This file is used by the test runner and other scripts to bootstrap the environment.
-
djangoshell.py to spawn a Django shell that’s aware of your app
-
loaddata.py "some argument" load fixture data into your app's database and test out
-
run_test.sh to run all tests for your app (executes
smoothglue/map/tests/loadtests.py) -
makemigrations.py to create a migration file
-
migrate.py to perform table migrations
Using App Package (Locally)
The steps for using your package locally are:
Build Your App
Run poetry build inside the main level of this repo. This creates a directory called dist and builds your new package into source and binary formats (e.g., smoothglue_django_map-.tar.gz and smoothglue_django_map--py3-none-any.whl).
Install App Inside a Django Project
-
Before installing the package, make sure that there is a virtual environment set up inside of the Django project you want to install your app into.
-
Then use pip or poetry to install the package:
# Using pip pip install [path to your newly packaged file] # Using Poetry poetry add [path to your newly packaged file]
-
Update the
settings.pyfile inside that Django project to point to the new app name:INSTALLED_APPS = [ "smoothglue.map", ..., ]
-
Update the
urls.pyfile inside that Django project to point to the new app name: :urlpatterns = [ path("", include("smoothglue.map.urls")), ..., ]
-
Run the development server to confirm the project continues to work.
[GIF COMING SOON]
Install App From Gitlab PyPI Package (Official Use)
-
Before installing the package, make sure that there is a virtual environment set up inside of the Django project you want to install the app into.
-
Use pip and the following command inside the Django project:
pip install <app_name> --index-url https://__token__:<your_personal_token>@code.dsop.structsure.io/api/v4/projects/<project_id>/packages/pypi/simple
Other File Descriptions
- MANIFEST.in - Tells the build process which non common files and folders that should be packaged
- pyproject.toml - Package and project metadata / configuration
- tox.ini - Used to configure different types of packages,
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smoothglue_django_map-0.0.5.tar.gz.
File metadata
- Download URL: smoothglue_django_map-0.0.5.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.11 Linux/4.18.0-553.77.1.el8_10.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b79cb3e02e842ed61e10c1e399ffa3fb4cc11cc1ede6258b9edb326df0cc753
|
|
| MD5 |
fdc43c1980ad9d50d5e438d0638e44e5
|
|
| BLAKE2b-256 |
e9d8a9b1ba024530ed3f34cfa5287d8885e77fbe9a8f8c7c0e515ba3b25869ad
|
File details
Details for the file smoothglue_django_map-0.0.5-py3-none-any.whl.
File metadata
- Download URL: smoothglue_django_map-0.0.5-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.11 Linux/4.18.0-553.77.1.el8_10.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50a23f64856637c954a37a8a1bc80fda3a570287569ca020f1274f2831d5b409
|
|
| MD5 |
a89ba48d740a264bf7d056bb315782e4
|
|
| BLAKE2b-256 |
49ae26498e2fabb10ef060d65714faabacc0cd8f99609be905626fd794d5be49
|