Managing subjects in a human research context.
Project description
huscy.subjects
Requirements
- Python 3.6+
- A supported version of Django
Tox tests on Django versions 2.2, 3.1 and 3.2.
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_ADULT_AGE | 18 | Specifies the age of majority. Deprecated: Use HUSCY_SUBJECTS_AGE_OF_MAJORITY instead! |
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
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
Hashes for huscy.subjects-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb2f800ede9ea8d1c50af4ecaacbec5741c2d515cf75ee7a058a4ad94920dc81 |
|
MD5 | 2bbebf89ca7c1b4377e8a189c5aa2600 |
|
BLAKE2b-256 | 6b97c9d9884ddeba654e1636d645e96cbaf934d4abd222d2e6c41dc2edf7d53c |