Skip to main content

Basic features used in all PSU Django apps

Project description

PSU-Base

Reusable Django app specifically for PSU's custom-built web applications.
It encapsulates the common functionality that we would otherwise need to program into each application we build. Features include:

  • PSU Single Sign-On (SSO)
  • Authentication and authorization features
  • Feature toggles
  • Template tags for our static content server

Quick Start

Dependencies

The following dependencies may be REQUIRED in your system:

  • libpq-dev
    sudo apt install libpq-dev
    

Start a PSU Base Enabled Project

django-admin.py startproject \ 
--template=*some-path-to*/psu-base-template.zip \
--extension=py,md,env \
my_project_name

Configuring Your App

After starting a new project from the custom template (above):

  1. cd my_project_name
  2. pip install -r requirements.txt
  3. Review/Update the application metadata in settings.py
  4. Run migrations: python manage.py migrate

If you have the PSU Secret Key file, your site was configured to access Finti's test server. This will need to be overwritten in local_settings.py eventually. If you do not have the PSU Secret Key file, you'll need to set these prior to running your app.

Usage

Usage of the psu-base app is documented in Confluence.

For Developers

The version number must be updated for every PyPi release. The version number is in psu_base/__init__.py

Document Changes

Record every change in docs/CHANGELOG.txt Document new features or significant changes to existing features in Confluence.

Publishing to PyPi

  1. Create accounts on PyPi and Test PyPi
  2. Create ~/.pypirc
    [distutils]
    index-servers=
        pypi
        testpypi
    
    [testpypi]
    repository: https://test.pypi.org/legacy/
    username: mikegostomski
    password: pa$$w0rd
    
    [pypi]
    username: mikegostomski
    password: pa$$w0rd
    
  3. Ask an existing developer to add you as a collaborator - test and/or prod
  4. python setup.py sdist bdist_wheel --universal
  5. twine upload --repository testpypi dist/*
  6. twine upload dist/*
  7. Tag the release in Git. Don't forget to push the tag! Example:
git tag 0.1.2
git push origin 0.1.2 

Project details


Release history Release notifications | RSS feed

This version

1.2.0

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

psu_base-1.2.0-py3-none-any.whl (150.4 kB view details)

Uploaded Python 3

File details

Details for the file psu_base-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: psu_base-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 150.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for psu_base-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2ffe011f15f1f630e7aee7ffcb2be87740bbb2b040d6f402277677930238870
MD5 65b0d54cf9e786dfcf9b6745144c2193
BLAKE2b-256 62ce3fc4c676f7f2e503099b01dae6ba9e794b208e8393e5aa8a4e006176e3a9

See more details on using hashes here.

Supported by

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