Skip to content

Instantly share code, notes, and snippets.

View teury's full-sized avatar

Teury Diaz teury

View GitHub Profile
@teury
teury / example_usage.py
Created August 22, 2024 23:55 — forked from marty0678/example_usage.py
Django Rest Framework Base Model CRUD Class
# Views
class UserProfileViewSet(BaseModelViewSet):
"""View set for the UserProfile."""
ENABLE_LIST = True
ENABLE_RETRIEVE = True
ENABLE_PARTIAL_UPDATE = True
ENABLE_PAGINATION = True
LIST_CACHE_KEY = "users:user-profiles-list"
@teury
teury / Nginx_uwsig_django.md
Created October 19, 2021 03:22 — forked from junstrix/Nginx_uwsig_django.md
Nginx, Uwsgi, Virtualenv and Django
@teury
teury / config.py
Created January 31, 2018 17:08 — forked from jerivas/config.py
One-click Django language select
# settings.py
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.i18n',
)
# urls.py (outside i18n_patterns)
(r'^i18n/', include('django.conf.urls.i18n')),