#24 Implement REST API (#32)

* #24 Implement readonly bookmark API

* #24 Implement create/update bookmark API

* #24 Fix title, description not allowing blank values

* #24 Code cleanup

* #24 Add modification dates to response

* #24 Add API docs

* #24 Implement delete bookmark API

* #24 Fix API docs link

* #24 Fix API docs link

* #24 Implement tag API

Co-authored-by: Sascha Ißbrücker <sissbruecker@lyska.io>
This commit is contained in:
Sascha Ißbrücker
2020-09-27 09:34:56 +02:00
committed by GitHub
parent 7fb73111b2
commit e497bcb5c0
15 changed files with 349 additions and 16 deletions

View File

@@ -40,6 +40,8 @@ INSTALLED_APPS = [
'sass_processor',
'widget_tweaks',
'django_generate_secret_key',
'rest_framework',
'rest_framework.authtoken'
]
MIDDLEWARE = [
@@ -143,5 +145,15 @@ STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'bookmarks', 'styles'),
]
# REST framework
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.TokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
],
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
'PAGE_SIZE': 100
}
# Registration switch
ALLOW_REGISTRATION = False