Skip to content

Commit

Permalink
Merge pull request #16 from divyanshusahu/revert-11-constants_file
Browse files Browse the repository at this point in the history
Revert "adding constants file"
  • Loading branch information
divyanshusahu authored Jun 18, 2022
2 parents b5def21 + cce1e88 commit cf35359
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
4 changes: 1 addition & 3 deletions challenges/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from django.urls import path

from minictf import constants
from . import views
from django.conf import settings
from django.conf.urls.static import static
Expand All @@ -9,4 +7,4 @@
path('', views.index, name='index'),
path('admin/add', views.addchallenges, name="add"),
path('postflag/', views.flagsubmit, name="flagsubmit")
] + static(constants.MEDIA_URL, document_root=settings.MEDIA_ROOT)
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
11 changes: 0 additions & 11 deletions minictf/constants.py

This file was deleted.

13 changes: 7 additions & 6 deletions minictf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import os
from dotenv import load_dotenv
from constants import (LANGUAGE_CODE, TIME_ZONE, USE_I18N, USE_L10N, USE_TZ)

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Expand Down Expand Up @@ -113,15 +112,15 @@
# Internationalization
# https://docs.djangoproject.com/en/2.0/topics/i18n/

LANGUAGE_CODE = LANGUAGE_CODE
LANGUAGE_CODE = 'en-us'

TIME_ZONE = TIME_ZONE
TIME_ZONE = 'UTC'

USE_I18N = USE_I18N
USE_I18N = True

USE_L10N = USE_L10N
USE_L10N = True

USE_TZ = USE_TZ
USE_TZ = True


# Static files (CSS, JavaScript, Images)
Expand All @@ -136,3 +135,5 @@
LOGIN_REDIRECT_URL = '/challenges/'

MEDIA_ROOT = os.path.join(BASE_DIR, 'challenges/uploads/')

MEDIA_URL = '/uploads/'

0 comments on commit cf35359

Please sign in to comment.