Skip to main content

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.

  1. Install Poetry if you haven't already.
  2. Run poetry install to 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

  1. 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.

  2. 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]
    
  3. Update the settings.py file inside that Django project to point to the new app name:

    INSTALLED_APPS = [
      "smoothglue.map",
      ...,
    ]
    
  4. Update the urls.py file inside that Django project to point to the new app name: :

    urlpatterns = [
      path("", include("smoothglue.map.urls")),
      ...,
    ]
    
  5. Run the development server to confirm the project continues to work.

    [GIF COMING SOON]

Install App From Gitlab PyPI Package (Official Use)

  1. 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.

  2. 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


Download files

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

Source Distribution

smoothglue_django_map-0.0.5.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smoothglue_django_map-0.0.5-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

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

Hashes for smoothglue_django_map-0.0.5.tar.gz
Algorithm Hash digest
SHA256 9b79cb3e02e842ed61e10c1e399ffa3fb4cc11cc1ede6258b9edb326df0cc753
MD5 fdc43c1980ad9d50d5e438d0638e44e5
BLAKE2b-256 e9d8a9b1ba024530ed3f34cfa5287d8885e77fbe9a8f8c7c0e515ba3b25869ad

See more details on using hashes here.

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

Hashes for smoothglue_django_map-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 50a23f64856637c954a37a8a1bc80fda3a570287569ca020f1274f2831d5b409
MD5 a89ba48d740a264bf7d056bb315782e4
BLAKE2b-256 49ae26498e2fabb10ef060d65714faabacc0cd8f99609be905626fd794d5be49

See more details on using hashes here.

Supported by

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