Skip to main content

huscy.subjects

PyPi Version PyPi Status PyPI Downloads PyPI License Python Versions Django Versions

Requirements

  • Python 3.8+
  • A supported version of Django

Tox tests on Django versions 4.2, 5.0 and 5.1.

Installation

To install husy.subjects simply run:

pip install huscy.subjects

Add huscy.subjects and further required apps to INSTALLED_APPS in your settings.py:

INSTALLED_APPS = (
	...
	'django_countries',
	'guardian',
	'phonenumber_field',
	'rest_framework',

	'huscy.subjects',
)

Hook the urls from huscy.subjects into your urls.py:

urlpatterns = [
	...
	path('api/', include('huscy.subjects.urls')),
]

Create huscy.subjects database tables by running:

python manage.py migrate

Configuration

There are some settings to configure the service. These settings have be added to settings.py.

Name Default value Description
HUSCY_SUBJECTS_AGE_OF_MAJORITY 18 Specifies the age of majority.
HUSCY_SUBJECTS_SUBJECT_VIEWSET_MAX_RESULT_COUNT 500 Specifies the maximum number of subjects returned by the queryset in the SubjectViewSet.

Development

Install PostgreSQL and create a database user called huscy and a database called huscy.

sudo -u postgres createdb huscy
sudo -u postgres createuser -d huscy
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE huscy TO huscy;"
sudo -u postgres psql -c "ALTER USER huscy WITH PASSWORD '123';"

Check out the repository and start your virtual environment (if necessary).

Install dependencies:

make install

Create database tables:

make migrate

Run tests to see if everything works fine:

make test

Metadata

Release files for huscy.subjects 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for huscy.subjects 3.0.1
File Size Uploaded
huscy_subjects-3.0.1.tar.gz 25.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for huscy.subjects 3.0.1
File Interpreter ABI Platform
huscy_subjects-3.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 57.8 kB

Release files / huscy_subjects-3.0.1.tar.gz

Download URL huscy_subjects-3.0.1.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d3b39eb483efbb6d97950a44beb8c0d988f14628f467e28f24489421aff32e69
BLAKE2b-256 checksum
How to use checksums
e979920b1f11e4ce9f295f066a288ab4674b23b6b78c1d351591706d5c895806
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release files / huscy_subjects-3.0.1-py3-none-any.whl

Download URL huscy_subjects-3.0.1-py3-none-any.whl
Size 32.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da0ceb8f293430951fa9d9abf0225d500195e78ddaac2c1b748e3acebd36455d
BLAKE2b-256 checksum
How to use checksums
4194f8fcd1476ca00b7fab3ee28164b12f25801443509d22a8423f98e12e9400
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page