An article model for Django-Rest-Framework.
Project description
Mb-drf-article
Mb-drf-article is a simple Django Rest Framework app to add some articles.
Quick start
1. Add "mb-drf-article" to your INSTALLED_APPS
settings
# settings.py
INSTALLED_APPS = [
...
'mb-drf-article',
]
2. Include the articles URLconf in your project urls.py
# urls.py
urlpatterns = [
# ...
path('articles/', include('mb-drf-article.urls')),
]
3. Add the models in your Database
Run python manage.py migrate
in your SHELL.
4. Update the Django Rest Framework Settings
Update the Django Rest Framework settings to add a pagination.
# Django Rest Framework
# https://www.django-rest-framework.org
REST_FRAMEWORK = {
# ...
'DEFAULT_PAGINATION_CLASS': ('rest_framework.pagination.'
'LimitOffsetPagination'),
'PAGE_SIZE': 5
}
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
mb_drf_article-0.1.0.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for mb_drf_article-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80ed4eeb27b1d95c97962c04d6623c784537f70eca3ede28d59217b968b9855d |
|
MD5 | 4eaf2d1d345de9f21761f5a3c914235a |
|
BLAKE2b-256 | e1dd602bd74f5691ed55bd59e445c61423bce588ce042f1b08453fb0622b641b |