Base filled up
This commit is contained in:
0
db.template.sqlite3
Normal file
0
db.template.sqlite3
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
|||||||
from django.db import migrations
|
from django.db import migrations
|
||||||
|
|
||||||
counties = [
|
counties = [
|
||||||
'KoprivničkO-križevačka',
|
'Koprivničko-križevačka',
|
||||||
'Međimurska',
|
'Međimurska',
|
||||||
'Dubrovačko-neretvanska',
|
'Dubrovačko-neretvanska',
|
||||||
'Zagrebačka',
|
'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 django.urls import path
|
||||||
|
|
||||||
from project.main import views
|
from project.main import views
|
||||||
@ -8,8 +12,30 @@ urlpatterns = [
|
|||||||
path("filter-list", views.FilterListView.as_view(), name="filter-list"),
|
path("filter-list", views.FilterListView.as_view(), name="filter-list"),
|
||||||
path("form-validation", views.FormValidationView.as_view(), name="form-validation"),
|
path("form-validation", views.FormValidationView.as_view(), name="form-validation"),
|
||||||
path("complex-form", views.ComplexFormView.as_view(), name="complex-form"),
|
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(
|
||||||
path("complex-form/handle/reports", views.ReportsHandleView.as_view(), name="complex-form-handle-reports"),
|
"complex-form/handle/route-module",
|
||||||
path("complex-form/handle/warehouse-management", views.WarehouseManagementHandleView.as_view(), name="complex-form-handle-warehouse-management"),
|
views.RouteModuleHandleView.as_view(),
|
||||||
path("table-inline-edit", views.TableInlineEditView.as_view(), name="table-inline-edit"),
|
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