Пример #1
0
def initialize_database(request):
    database = DB()
    database.initialization()

    # User.objects.initialize()
    # Product.objects.initialize()
    # Department.objects.initialize()

    return redirect('/')
Пример #2
0
def initializeDatabase(request):
    database = DB()
    database.initialization()
    return redirect(reverse('index')+ '?message=Database initialized')