dodan folder resources

This commit is contained in:
emaric 2024-01-10 12:44:55 +01:00
parent c5fb12ffb8
commit eaac31978f
5 changed files with 28 additions and 4 deletions

View File

@ -14,7 +14,7 @@ class Command(BaseCommand):
Programatically create entries for plovidba_aplikacija model ObjektSigurnosti
"""
def handle(self, *args, **options):
json_rpath = r'C:\Users\Student1\Desktop\plovidba\myenv\plovidba_projekt\plovidba_aplikacija\management\commands\testnipodaci.json'
json_rpath = os.path.join(settings.RESOURCES_DIR, 'testnipodaci.json')
created_entries = 0
existing_entries = 0

View File

@ -122,14 +122,18 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/4.2/topics/i18n/
LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'hr'
TIME_ZONE = 'UTC'
TIME_ZONE = 'Europe/Zagreb'
USE_I18N = True
USE_L10N = True
USE_TZ = True
LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")]
PROJ_LIB = ENV_STR("PROJ_LIB", None)
GDAL_DATA = ENV_STR("GDAL_DATA", None)
@ -143,7 +147,26 @@ if GDAL_DATA:
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/
STATIC_URL = 'static/'
# folder containing static files for production purposes (manage.py collectstatic)
STATIC_ROOT = os.path.join(BASE_DIR, "static")
# static files for each app
STATIC_URL = "/api/static/"
# static files directories for each app
#STATICFILES_DIRS = [
#os.path.join(BASE_DIR, "user/static"),
#]
# Media Folder
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
MEDIA_URL = "/api/media/"
# Resources DIR
RESOURCES_DIR = os.path.join(BASE_DIR, "resources")
# TEMP DIR
TEMP_DIR = os.path.join(BASE_DIR, "temp")
# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

File diff suppressed because one or more lines are too long