Basic features used in all PSU Django apps
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
The following dependencies may be REQUIRED in your system:
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):
pip install -r requirements.txt
- Review/Update the application metadata in settings.py
- 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 of the psu-base app is documented in Confluence.
The version number must be updated for every PyPi release.
The version number is in
Publishing to PyPi
- Create accounts on PyPi and Test PyPi
[distutils] index-servers= pypi testpypi [testpypi] repository: https://test.pypi.org/legacy/ username: mikegostomski password: pa$$w0rd [pypi] username: mikegostomski password: pa$$w0rd
- Ask an existing developer to add you as a collaborator - test and/or prod
python setup.py sdist bdist_wheel --universal
twine upload --repository testpypi dist/*
twine upload dist/*
- Tag the release in Git. Don't forget to push the tag! Example:
git tag 0.1.2 git push origin 0.1.2
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size psu_base-1.2.0-py2.py3-none-any.whl (150.4 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size psu-base-1.2.0.tar.gz (101.1 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for psu_base-1.2.0-py2.py3-none-any.whl