huscy.subjects
======






Requirements
------
- Python 3.8+
- A supported version of Django
Tox tests on Django versions 4.2 and 5.0.
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`:
```python
INSTALLED_APPS = (
...
'django_countries',
'guardian',
'phonenumber_field',
'rest_framework',
'huscy.subjects',
)
```
Hook the urls from `huscy.subjects` into your `urls.py`:
```python
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
Raw data
{
"_id": null,
"home_page": "https://bitbucket.org/huscy/subjects",
"name": "huscy.subjects",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Mathias Goldau, Stefan Bunde",
"author_email": "stefanbunde+git@posteo.de",
"download_url": "https://files.pythonhosted.org/packages/6c/aa/fb14305eec393462a3339d4a5a597fe8a8576ba01a47e9f78d9de132c415/huscy_subjects-3.0.0.tar.gz",
"platform": null,
"description": "huscy.subjects\n======\n\n\n\n\n\n\n\n\n\n\nRequirements\n------\n\n- Python 3.8+\n- A supported version of Django\n\nTox tests on Django versions 4.2 and 5.0.\n\n\n\nInstallation\n------\n\nTo install `husy.subjects` simply run:\n\n pip install huscy.subjects\n\nAdd `huscy.subjects` and further required apps to `INSTALLED_APPS` in your `settings.py`:\n\n```python\nINSTALLED_APPS = (\n\t...\n\t'django_countries',\n\t'guardian',\n\t'phonenumber_field',\n\t'rest_framework',\n\n\t'huscy.subjects',\n)\n```\n\nHook the urls from `huscy.subjects` into your `urls.py`:\n\n```python\nurlpatterns = [\n\t...\n\tpath('api/', include('huscy.subjects.urls')),\n]\n```\n\nCreate `huscy.subjects` database tables by running:\n\n python manage.py migrate\n\n\n\nConfiguration\n------\n\nThere are some settings to configure the service. These settings have be added to `settings.py`.\n\n\n| Name | Default value | Description |\n| -------- | -------- | -------- |\n| HUSCY_SUBJECTS_AGE_OF_MAJORITY | 18 | Specifies the age of majority. |\n| HUSCY_SUBJECTS_SUBJECT_VIEWSET_MAX_RESULT_COUNT | 500 | Specifies the maximum number of subjects returned by the queryset in the SubjectViewSet. |\n\n\n\nDevelopment\n------\n\nInstall PostgreSQL and create a database user called `huscy` and a database called `huscy`.\n\n sudo -u postgres createdb huscy\n sudo -u postgres createuser -d huscy\n sudo -u postgres psql -c \"GRANT ALL PRIVILEGES ON DATABASE huscy TO huscy;\"\n sudo -u postgres psql -c \"ALTER USER huscy WITH PASSWORD '123';\"\n\nCheck out the repository and start your virtual environment (if necessary).\n\nInstall dependencies:\n\n make install\n\nCreate database tables:\n\n make migrate\n\nRun tests to see if everything works fine:\n\n make test\n",
"bugtrack_url": null,
"license": "AGPLv3+",
"summary": "Managing subjects in a human research context.",
"version": "3.0.0",
"project_urls": {
"Homepage": "https://bitbucket.org/huscy/subjects"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "27c92844c8ee65235da441dd6023779d26692d53175c5b1dee37359808665294",
"md5": "915a7759d44b2f3019b925664a93c801",
"sha256": "b0b43ca8e275005a0f7dc49351076aaccf7f3346c9100fc651b1561831c6b81a"
},
"downloads": -1,
"filename": "huscy.subjects-3.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "915a7759d44b2f3019b925664a93c801",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 32217,
"upload_time": "2024-08-19T16:20:41",
"upload_time_iso_8601": "2024-08-19T16:20:41.324846Z",
"url": "https://files.pythonhosted.org/packages/27/c9/2844c8ee65235da441dd6023779d26692d53175c5b1dee37359808665294/huscy.subjects-3.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6caafb14305eec393462a3339d4a5a597fe8a8576ba01a47e9f78d9de132c415",
"md5": "f63d4cd59d2f6ebe304ee923eab844da",
"sha256": "dec4bb005c4a98edd37433cb07cefb9f157e317e3924b638801a46f60cdbd7ea"
},
"downloads": -1,
"filename": "huscy_subjects-3.0.0.tar.gz",
"has_sig": false,
"md5_digest": "f63d4cd59d2f6ebe304ee923eab844da",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 25559,
"upload_time": "2024-08-19T16:20:42",
"upload_time_iso_8601": "2024-08-19T16:20:42.916663Z",
"url": "https://files.pythonhosted.org/packages/6c/aa/fb14305eec393462a3339d4a5a597fe8a8576ba01a47e9f78d9de132c415/huscy_subjects-3.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-19 16:20:42",
"github": false,
"gitlab": false,
"bitbucket": true,
"codeberg": false,
"bitbucket_user": "huscy",
"bitbucket_project": "subjects",
"lcname": "huscy.subjects"
}