Skip to content

Commit 45a47f8

Browse files
[Static] Remove Django admin files and collect static files (#665)
* static: delete django admin files it's generated via collectstatic * docker: fix static root * static: fix .gitignore * docker: don't collectstatic by default because dev mode don't need it * docker: add collect-static command * static: add mo files in .gitignore * static: fix bad common_dev static variable
1 parent 45e081b commit 45a47f8

133 files changed

Lines changed: 12 additions & 30201 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
/.vagrant
21
*.pyc
3-
/storage/
2+
storage/
43
venv/
54
data/
65
.idea
@@ -10,11 +9,15 @@ data/
109
exodus/django
1110
exodus/celerybeat-schedule
1211
celerybeat.pid
13-
scheduler.sh
1412

1513
# Settings files
1614
.env
1715
exodus/exodus/settings/custom_dev.py
1816
exodus/exodus/settings/custom_docker.py
1917
exodus/exodus/settings/production.py
20-
staticfiles
18+
19+
# Static files
20+
exodus/staticfiles
21+
22+
# Translations
23+
*.mo

doc/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ You have different ways of setting up your development environment:
1010

1111
- [Docker](#docker-setup)
1212
- [Manual](#manual-setup)
13-
- ~~Vagrant (Deprecated)~~
1413

1514
### Docker setup
1615

@@ -72,6 +71,7 @@ docker-compose exec exodus-worker /entrypoint.sh "<command>"
7271

7372
to make actions, where `<command>` can be:
7473

74+
- `collect-static`: Collect all static files
7575
- `compile-messages`: Compile the translation messages
7676
- `create-db`: Create the database and apply migrations
7777
- `create-user`: Create a Django user

docker/entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ declare -r pymanage="$pyexe manage.py"
55
declare -r custom_docker_settings="/exodus/exodus/exodus/settings/custom_docker.py"
66

77
declare -Ar commandList=(
8+
[collect-static]=collectStatic
89
[compile-messages]=compileMessages
910
[create-db]=createDB
1011
[create-user]=createUser
@@ -18,6 +19,7 @@ declare -Ar commandList=(
1819
)
1920

2021
declare -Ar commandHelpList=(
22+
[collect-static]='collect all static files'
2123
[compile-messages]='compile translation messages'
2224
[create-db]='create database if required and attend to migrations'
2325
[create-user]='actually create a super user if not created yet'
@@ -134,7 +136,6 @@ function init_db() {
134136

135137
function init() {
136138
init_db
137-
collectStatic
138139
compileMessages
139140
startFrontend
140141
}

exodus/exodus/settings/common_dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
ALLOWED_HOSTS = ['*']
99

1010
STATIC_URL = '/static/'
11-
STATIC_ROOT = f'{BASE_DIR}/static/'
11+
STATIC_ROOT = f'{ROOT_DIR}/staticfiles/'
1212
STATICFILES_DIRS = [f'{APPS_DIR}/static']
1313

1414
MINIO_STORAGE_ACCESS_KEY = env('EXODUS_MINIO_ROOT_USER', default='exodusexodus')

exodus/exodus/settings/docker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
}
1414
}
1515

16-
STATIC_ROOT = f'{BASE_DIR}/staticfiles/'
16+
STATIC_ROOT = f'{ROOT_DIR}/staticfiles/'
1717
CELERY_BROKER_URL = 'amqp://guest@amqp//'
1818
BROKER_URL = CELERY_BROKER_URL
1919
MINIO_STORAGE_ENDPOINT = 'minio:9000'

exodus/static/admin/css/autocomplete.css

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

0 commit comments

Comments
 (0)