Skip to content

Commit

Permalink
refactored requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
DorianMoreno committed Jul 11, 2020
1 parent 0d461ea commit 0ba20d6
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
10 changes: 4 additions & 6 deletions acm_web_site/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
import sys
from os import environ

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
PROJECT_ROOT = os.path.dirname(BASE_DIR)
SITE_NAME = os.path.dirname(BASE_DIR)
PROJECT_APP_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
PROJECT_ROOT = os.path.dirname(PROJECT_APP_ROOT)
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'run', 'static')
MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'run', 'media')
sys.path.append(os.path.normpath(os.path.join(PROJECT_ROOT, 'apps')))

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get(
Expand Down Expand Up @@ -58,7 +56,7 @@
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(BASE_DIR, "templates"),
os.path.join(PROJECT_ROOT, "templates"),
],
'APP_DIRS': True,
'OPTIONS': {
Expand Down Expand Up @@ -120,7 +118,7 @@

STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static")
os.path.join(PROJECT_ROOT, "static")
]

# Archivos multimedia.
Expand Down
2 changes: 1 addition & 1 deletion acm_web_site/settings/development.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .common import *

TMP_PATH = os.path.abspath(os.path.join(BASE_DIR, 'tmp'))
TMP_PATH = os.path.abspath(os.path.join(PROJECT_ROOT, 'tmp'))

DEBUG = TEMPLATE_DEBUG = True

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.0.0",
"description": "Website API for Javeriana's ACM chapter",
"scripts": {
"requirements": "pip install -U -r ./requirements.txt",
"requirements": "pip install -U -r requirements/development.txt",
"start": "python acm_web_site/manage.py runserver"
},
"keywords": [
Expand Down
8 changes: 0 additions & 8 deletions requirements.txt

This file was deleted.

6 changes: 6 additions & 0 deletions requirements/common.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
django==3.0.8
django-markdownx==3.0.1
djangorestframework==3.11.0
markdown==3.2.2
django-cors-headers==3.4.0
psycopg2==2.8.5
4 changes: 4 additions & 0 deletions requirements/development.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r common.txt
django-extensions==3.0.2
ipython==7.16.1
flake8==3.8.3

0 comments on commit 0ba20d6

Please sign in to comment.