Skip to content

Commit 5eeea9c

Browse files
committed
Remove unnecessary configuration
- Remove .pylintrc - Update flake8 settings in setup.cfg - Remove unused templates and update urls.py
1 parent bc9b9cb commit 5eeea9c

File tree

7 files changed

+24
-78
lines changed

7 files changed

+24
-78
lines changed

backend/.pylintrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

backend/config/urls.py

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@
88

99
urlpatterns = [
1010
path("", TemplateView.as_view(template_name="pages/home.html"), name="home"),
11-
path(
12-
"about/", TemplateView.as_view(template_name="pages/about.html"), name="about"
13-
),
11+
# User management
1412
# Django Admin, use {% url 'admin:index' %}
1513
path(settings.ADMIN_URL, admin.site.urls),
16-
# User management
1714
path("users/", include("personal_website.users.urls", namespace="users")),
1815
path("accounts/", include("allauth.urls")),
1916
# Your stuff: custom urls includes go here
@@ -26,29 +23,3 @@
2623
# DRF auth token
2724
path("auth-token/", obtain_auth_token),
2825
]
29-
30-
if settings.DEBUG:
31-
# This allows the error pages to be debugged during development, just visit
32-
# these url in browser to see how these error pages look like.
33-
urlpatterns += [
34-
path(
35-
"400/",
36-
default_views.bad_request,
37-
kwargs={"exception": Exception("Bad Request!")},
38-
),
39-
path(
40-
"403/",
41-
default_views.permission_denied,
42-
kwargs={"exception": Exception("Permission Denied")},
43-
),
44-
path(
45-
"404/",
46-
default_views.page_not_found,
47-
kwargs={"exception": Exception("Page not Found")},
48-
),
49-
path("500/", default_views.server_error),
50-
]
51-
if "debug_toolbar" in settings.INSTALLED_APPS:
52-
import debug_toolbar
53-
54-
urlpatterns = [path("__debug__/", include(debug_toolbar.urls))] + urlpatterns

backend/personal_website/templates/403.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

backend/personal_website/templates/404.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

backend/personal_website/templates/500.html

Lines changed: 0 additions & 13 deletions
This file was deleted.

backend/personal_website/templates/pages/about.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

backend/setup.cfg

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
[flake8]
2-
max-line-length = 120
3-
exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv
2+
# https://pep8.readthedocs.io/en/latest/intro.html#error-codes
3+
ignore =
4+
# whitespace before ‘:’
5+
E203
6+
# line too long (82 > 79 characters)
7+
E501
8+
# line break before operator
9+
W503
10+
# Max width of Github code review is 119 characters
11+
max-line-length = 119
12+
max-complexity = 18
13+
exclude =
14+
.tox
15+
.git
16+
*/migrations/*
17+
*/static/CACHE/*
18+
docs
19+
node_modules
20+
.idea
21+
.mypy_cache
22+
.pytest_cache
23+
*__init__.py
24+
venv
425

526
[pycodestyle]
627
max-line-length = 120

0 commit comments

Comments
 (0)