Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
library-app-django
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ilham Maulana
library-app-django
Commits
dbcf75d9
Commit
dbcf75d9
authored
Jul 04, 2024
by
impfundev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: debug toolkit
parent
bc749a57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
7 deletions
+48
-7
settings.py
config/settings.py
+29
-7
urls.py
config/urls.py
+1
-0
0005_alter_members_account_number.py
members/migrations/0005_alter_members_account_number.py
+18
-0
No files found.
config/settings.py
View file @
dbcf75d9
...
...
@@ -32,6 +32,24 @@ DEBUG = True
ALLOWED_HOSTS
=
[
"localhost"
,
"127.0.0.1"
,
".vercel.app"
,
".now.sh"
]
INTERNAL_IPS
=
[
"127.0.0.1"
,
]
def
show_toolbar
(
request
):
return
True
DEBUG_TOOLBAR_CONFIG
=
{
"SHOW_TOOLBAR_CALLBACK"
:
show_toolbar
,
}
if
DEBUG
:
import
mimetypes
mimetypes
.
add_type
(
"application/javascript"
,
".js"
,
True
)
# Application definition
...
...
@@ -48,6 +66,7 @@ INSTALLED_APPS = [
"django.contrib.sessions"
,
"django.contrib.messages"
,
"django.contrib.staticfiles"
,
"debug_toolbar"
,
]
MIDDLEWARE
=
[
...
...
@@ -60,6 +79,7 @@ MIDDLEWARE = [
"django.contrib.messages.middleware.MessageMiddleware"
,
"django.middleware.clickjacking.XFrameOptionsMiddleware"
,
"authentications.middleware.AuthMiddleware"
,
"debug_toolbar.middleware.DebugToolbarMiddleware"
,
# "django.middleware.cache.UpdateCacheMiddleware",
# "django.middleware.cache.FetchFromCacheMiddleware",
]
...
...
@@ -139,7 +159,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/5.0/howto/static-files/
STATIC_ROOT
=
BASE_DIR
/
"staticfiles"
STATIC_URL
=
"
/
static/"
STATIC_URL
=
"static/"
STORAGES
=
{
"staticfiles"
:
{
...
...
@@ -147,12 +167,14 @@ STORAGES = {
},
}
# CACHES = {
# "default": {
# "BACKEND": "django.core.cache.backends.db.DatabaseCache",
# "LOCATION": "cache",
# }
# }
CACHES
=
{
"default"
:
{
"BACKEND"
:
"django_redis.cache.RedisCache"
,
"LOCATION"
:
"redis://default:zTuwykbejEOsZ4TGTku4IHRMJwu7JeHa@redis-12647.c1.ap-southeast-1-1.ec2.redns.redis-cloud.com:12647"
,
},
}
SESSION_ENGINE
=
"django.contrib.sessions.backends.cached_db"
# Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
...
...
config/urls.py
View file @
dbcf75d9
...
...
@@ -25,4 +25,5 @@ urlpatterns = [
path
(
"dashboard/"
,
include
(
"dashboards.urls"
)),
path
(
"admin/"
,
admin
.
site
.
urls
),
path
(
"auth/"
,
include
(
"authentications.urls"
)),
path
(
"__debug__/"
,
include
(
"debug_toolbar.urls"
)),
]
members/migrations/0005_alter_members_account_number.py
0 → 100644
View file @
dbcf75d9
# Generated by Django 5.0.6 on 2024-07-04 03:24
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'members'
,
'0004_alter_members_account_number'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'members'
,
name
=
'account_number'
,
field
=
models
.
CharField
(
default
=
'919767233748919'
,
editable
=
False
,
max_length
=
15
),
),
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment