This is a generic sample of code for api test installation. To be used as an app to create api endpoints using DRF.
The steps for installation are as follow:
Detailed documentation is in the “docs” directory.
Quick start
Install “rest_framework”:
`pip install djangorestframework`
Once installed add the rest_framework into your “INSTALLED_APPS” in your settings.py:
INSTALLED_APPS = [ ... 'rest_framework', ]Install samplemed_users_api:
``pip install samplemed_users_api``
Once installed add the “User” app into your INSTALLED_APP in settings.py:
INSTALLED_APPS = [ ... 'rest_framework', 'Users', ]Make db migrations to make the app work:
``python manage.py makemigrations``
Migrate the changes:
``python manage.py migrate``
Add the urls from “User” app into your main url:
``from django.conf.urls import include``
URL path that will display as default admin and the empty path as the API endpoints (router.urls):
urlpatterns = [ path('admin/', admin.site.urls), path('users/', include("Users.urls")), ]
Go to “https://your.url.com/users/” and see the endpoints.
Release files for django-samplemed-user-api 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_samplemed_user_api-0.0.2.tar.gz | 8.3 kB | Details |
Release files / django_samplemed_user_api-0.0.2.tar.gz
| Download URL | django_samplemed_user_api-0.0.2.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ce2aac91e0e5e34be0f5c7f96d727eca2ad5f87e76e220b2e7ca8e6fede28d7
|
|
BLAKE2b-256 checksum How to use checksums |
b68508c8247888af7acdb06e75e3562497053f012856e290753099fedbf4af90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.1
|