Managing subjects in a human research context.
Project description
huscy.subjects
Requirements
- Python 3.7+
- A supported version of Django
Tox tests on Django versions 3.2, 4.0 and 4.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
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
File details
Details for the file huscy.subjects-2.1.0.tar.gz
.
File metadata
- Download URL: huscy.subjects-2.1.0.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c82af4cd0e373daf5b339b9d1358930107497397ea03534c0c5280935e418af3 |
|
MD5 | bf35b73e3848d7c47d076fa8fc6e9eb7 |
|
BLAKE2b-256 | adfb87a7834c7d7b7c3a48e0188ed9929034c32880e72f0c1b88a95c08e9d6a3 |
File details
Details for the file huscy.subjects-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: huscy.subjects-2.1.0-py3-none-any.whl
- Upload date:
- Size: 30.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e1c1c74d88b5cbcb1b02eb43cbfb842eeefc2297363945804c747b0d0ff59de |
|
MD5 | c0a99b2b4d522471e7234f82f136bb9d |
|
BLAKE2b-256 | 82153d51dad92eb20315329c5b6f94f79d5e3cfe7710f09b4d657ed5e26b9e1d |