Skip to content

stoffels-it/django_initial_workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django_initial_workshop

current manual steps in running container:

add to settings.py:

AUTH_USER_MODEL = 'core.Person'

INSTALLED_APPS = [
    'admin_reorder',
    'crispy_forms',
    'django_registration',
    'phone_field',
    'core.apps.CoreConfig',
...

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
	'NAME': 'dockerws',
        'USER': 'dockerws',
        'PASSWORD': 'dockerws',
        'HOST': '127.0.0.1',
        'PORT': '5432',
    }
}

TODO: add option for superuser being active on create

execute:

python3 manage.py makemigrations core
python3 manage.py migrate core
python3 manage.py migrate

create urls in /urls.py, add "include" to "import path":

import path, include

    path('', include('core.urls')),
    path('accounts/company_register/', CompanyRegistrationView.as_view(
        form_class=CompanySignUpForm),
        name='django_company_register',
    ),
    path('accounts/', include('django_registration.backends.activation.urls')),
    path('accounts/', include('django.contrib.auth.urls')),
    path('admin/', admin.site.urls),

create a superuser for login into backend (127.0.0.1/admin):

python3 manage.py createsuperuser

load initial data from yaml-files by:

python3 manage.py loaddata initial_data/*

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published