Skip to content

Commit

Permalink
Merge pull request #273 from seanmorley15/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
seanmorley15 authored Aug 21, 2024
2 parents f32a339 + 528811d commit eaab740
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 65 deletions.
6 changes: 3 additions & 3 deletions backend/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ done
# Apply Django migrations
python manage.py migrate

# Check for default data
python manage.py worldtravel-seed

# Create superuser if environment variables are set and there are no users present at all.
if [ -n "$DJANGO_ADMIN_USERNAME" ] && [ -n "$DJANGO_ADMIN_PASSWORD" ]; then
echo "Creating superuser..."
Expand All @@ -33,5 +30,8 @@ else:
EOF
fi

# Sync the countries and world travel regions
python manage.py worldtravel-seed --force

# Start Django server
python manage.py runserver 0.0.0.0:8000
7 changes: 1 addition & 6 deletions backend/server/adventures/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,4 @@

class AdventuresConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'adventures'

# def ready(self):
# if settings.SCHEDULER_AUTOSTART:
# from .scheduler import start_scheduler
# start_scheduler()
name = 'adventures'
56 changes: 0 additions & 56 deletions backend/server/adventures/scheduler.py

This file was deleted.

21 changes: 21 additions & 0 deletions backend/server/worldtravel/management/commands/worldtravel-seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def handle(self, *args, **options):
('Iceland', 'is', 'EU'),
('Czech Republic', 'cz', 'EU'),
('Austria', 'at', 'EU'),
('Slovakia','sk','EU'),
('Liechtenstein','li','EU'),
]

regions = [
Expand Down Expand Up @@ -545,6 +547,25 @@ def handle(self, *args, **options):
('AT-7', 'Tirol', 'Tyrol', 'at'),
('AT-8', 'Vorarlberg', 'Vorarlberg', 'at'),
('AT-9', 'Wien', 'Vienna', 'at'),
('SK-BL', 'Bratislavský kraj', 'Bratislava Region', 'sk'),
('SK-TA', 'Trnavský kraj', 'Trnava Region', 'sk'),
('SK-TC', 'Trenčiansky kraj', 'Trenčín Region', 'sk'),
('SK-NI', 'Nitriansky kraj', 'Nitra Region', 'sk'),
('SK-ZI', 'Žilinský kraj', 'Žilina Region', 'sk'),
('SK-BC', 'Banskobystrický kraj', 'Banská Bystrica Region', 'sk'),
('SK-PV', 'Prešovský Kraj', 'Prešov Region', 'sk'),
('SK-KI', 'Košický kraj', 'Košice Region', 'sk'),
('LI-01', 'Balzers', 'Balzers', 'li'),
('LI-02', 'Eschen', 'Eschen', 'li'),
('LI-03', 'Gamprin', 'Gamprin', 'li'),
('LI-04', 'Mauren', 'Mauren', 'li'),
('LI-05', 'Planken', 'Planken', 'li'),
('LI-06', 'Ruggell', 'Ruggell', 'li'),
('LI-07', 'Schaan', 'Schaan', 'li'),
('LI-08', 'Schellenberg', 'Schellenberg', 'li'),
('LI-09', 'Triesen', 'Triesen', 'li'),
('LI-10', 'Triesenberg', 'Triesenberg', 'li'),
('LI-11', 'Vaduz', 'Vaduz', 'li'),
]


Expand Down

0 comments on commit eaab740

Please sign in to comment.