Skip to content

Commit 51b461d

Browse files
authored
Merge pull request #660 from chhsiao1981/clean-local-dev-env
remove unnecessary pacakges in dev env.
2 parents 4ec51d9 + 0615833 commit 51b461d

4 files changed

Lines changed: 27 additions & 21 deletions

File tree

chris_backend/config/local_urls.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from django.urls import path, include
2+
from django.conf import settings
3+
4+
from .urls import urlpatterns as production_urlpatterns
5+
6+
urlpatterns = production_urlpatterns
7+
8+
if settings.DEBUG:
9+
import debug_toolbar
10+
11+
urlpatterns += [
12+
path('__debug__/', include(debug_toolbar.urls)),
13+
]

chris_backend/config/settings/local.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
# Quick-start development settings - unsuitable for production
2222
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
2323

24+
# as for urls for dev env
25+
ROOT_URLCONF = 'config.local_urls'
26+
2427
# SECURITY WARNING: keep the secret key used in production secret!
2528
SECRET_KEY = 'w1kxu^l=@pnsf!5piqz6!!5kdcdpo79y6jebbp+2244yjm*#+k'
2629

@@ -80,10 +83,10 @@
8083
'pipelines', 'userfiles', 'pacsfiles', 'users', 'filebrowser',
8184
'workflows']:
8285
LOGGING['loggers'][app] = {
83-
'level': 'DEBUG',
84-
'handlers': ['console_verbose', 'file'],
85-
'propagate': False # required to avoid double logging with root logger
86-
}
86+
'level': 'DEBUG',
87+
'handlers': ['console_verbose', 'file'],
88+
'propagate': False # required to avoid double logging with root logger
89+
}
8790

8891
# Storage Settings
8992
STORAGE_ENV = os.getenv('STORAGE_ENV', 'swift')
@@ -172,7 +175,7 @@
172175

173176
# Celery settings
174177

175-
#CELERY_BROKER_URL = 'amqp://guest:guest@localhost'
178+
# CELERY_BROKER_URL = 'amqp://guest:guest@localhost'
176179
CELERY_BROKER_URL = 'amqp://queue:5672'
177180

178181
#: Only add pickle to this list if your broker is secured

chris_backend/config/urls.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,3 @@
4747
path('schema/swagger-ui/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
4848
path('schema/redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'),
4949
]
50-
51-
if settings.DEBUG:
52-
import debug_toolbar
53-
54-
urlpatterns += [
55-
path('__debug__/', include(debug_toolbar.urls)),
56-
]

requirements/local.txt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# Local development dependencies go here
22
-r base.txt
3-
django-debug-toolbar==5.2.0
4-
django-extensions==4.1
5-
collection-json==0.1.1
6-
coverage==7.8.0
7-
pylint==3.3.7
8-
flake8==7.2.0
9-
isort==6.0.1
10-
pudb==2025.1
3+
django-debug-toolbar==5.2.0 # for Jorge's needs of dev env
4+
django-extensions==4.1 # for Jorge's needs of dev env
5+
collection-json==0.1.1 # required in collectionjson.tests.test_renderers
6+
coverage==7.8.0 # test coverage
7+
pylint==3.3.7 # lint
8+
flake8==7.2.0 # auto-format
119
daphne==4.1.2 # required by (django) channels.testing
12-
https://github.com/msbrogli/rpudb/archive/master.zip

0 commit comments

Comments
 (0)