Base filled up
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
from django.db import migrations
|
||||
|
||||
counties = [
|
||||
'KoprivničkO-križevačka',
|
||||
'Koprivničko-križevačka',
|
||||
'Međimurska',
|
||||
'Dubrovačko-neretvanska',
|
||||
'Zagrebačka',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,7 @@
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
from django.conf import settings
|
||||
from django.urls import path
|
||||
|
||||
from project.main import views
|
||||
@ -8,8 +12,30 @@ urlpatterns = [
|
||||
path("filter-list", views.FilterListView.as_view(), name="filter-list"),
|
||||
path("form-validation", views.FormValidationView.as_view(), name="form-validation"),
|
||||
path("complex-form", views.ComplexFormView.as_view(), name="complex-form"),
|
||||
path("complex-form/handle/route-module", views.RouteModuleHandleView.as_view(), name="complex-form-handle-route-module"),
|
||||
path("complex-form/handle/reports", views.ReportsHandleView.as_view(), name="complex-form-handle-reports"),
|
||||
path("complex-form/handle/warehouse-management", views.WarehouseManagementHandleView.as_view(), name="complex-form-handle-warehouse-management"),
|
||||
path("table-inline-edit", views.TableInlineEditView.as_view(), name="table-inline-edit"),
|
||||
path(
|
||||
"complex-form/handle/route-module",
|
||||
views.RouteModuleHandleView.as_view(),
|
||||
name="complex-form-handle-route-module",
|
||||
),
|
||||
path(
|
||||
"complex-form/handle/reports",
|
||||
views.ReportsHandleView.as_view(),
|
||||
name="complex-form-handle-reports",
|
||||
),
|
||||
path(
|
||||
"complex-form/handle/warehouse-management",
|
||||
views.WarehouseManagementHandleView.as_view(),
|
||||
name="complex-form-handle-warehouse-management",
|
||||
),
|
||||
path(
|
||||
"table-inline-edit",
|
||||
views.TableInlineEditView.as_view(),
|
||||
name="table-inline-edit",
|
||||
),
|
||||
]
|
||||
|
||||
# check if db exists, and copy from template if not
|
||||
if not Path.exists(settings.DATABASES["default"]["NAME"]):
|
||||
template_filename = settings.BASE_DIR / "db.template.sqlite3"
|
||||
shutil.copyfile(template_filename, settings.DATABASES["default"]["NAME"])
|
||||
print("Database copied from template.")
|
||||
|
||||
Reference in New Issue
Block a user