Skip to content

Commit

Permalink
Update django-init
Browse files Browse the repository at this point in the history
  • Loading branch information
aclark4life committed Jun 13, 2024
1 parent 8cff1ae commit 7806d6b
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,22 @@ EOF
rm -f /opt/elasticbeanstalk/deployment/*.bak
endef

define DJANGO_HOME_PAGE_VIEWS
from django.views.generic import View

class HomeView(View):
template_name = "home.html"
endef

define DJANGO_HOME_PAGE_URLS
from django.urls import path
from .views import HomeView

urlpatterns = [
path("", HomeView.as_view(), name="home")
]
endef

define DJANGO_BASE_TEMPLATE
{% load static webpack_loader %}

Expand Down Expand Up @@ -1897,23 +1913,6 @@ tinymce.init({
});
endef

define WAGTAIL_HOME_PAGE_VIEWS
from django.views.generic import View


class HomeView(View):
template_name = "home.html"
endef

define WAGTAIL_HOME_PAGE_URLS
from django.urls import path
from .views import HomeView

urlpatterns = [
path("", HomeView.as_view(), name="home")
]
endef

define WAGTAIL_HOME_PAGE_MODEL
from django.db import models
from wagtail.models import Page
Expand Down Expand Up @@ -2429,6 +2428,7 @@ django-init-default: db-init django-install
@echo "$$DJANGO_BASE_TEMPLATE" > backend/templates/base.html
@$(MAKE) django-url-patterns
@$(MAKE) django-init-common
@$(MAKE) django-home
export SETTINGS=backend/settings/base.py; \
$(MAKE) django-siteuser
@$(MAKE) django-migrations
Expand All @@ -2438,7 +2438,6 @@ django-init-default: db-init django-install
@$(MAKE) npm-install
@$(MAKE) django-npm-install-save
@$(MAKE) django-npm-install-save-dev
@$(MAKE) django-home
@$(MAKE) pip-init-test
@$(MAKE) readme
@$(MAKE) gitignore
Expand Down Expand Up @@ -2653,6 +2652,7 @@ django-settings-default:
@echo "INSTALLED_APPS.append('crispy_forms')" >> $(SETTINGS)
@echo "INSTALLED_APPS.append('crispy_bootstrap5')" >> $(SETTINGS)
@echo "INSTALLED_APPS.append('django_recaptcha')" >> $(SETTINGS)
@echo "INSTALLED_APPS.append('home')" >> $(SETTINGS)
@echo "INSTALLED_APPS.append('explorer')" >> $(DEV_SETTINGS)
@echo "INSTALLED_APPS.append('django.contrib.admindocs')" >> $(DEV_SETTINGS)
@echo "# INSTALLED_APPS = [app for app in INSTALLED_APPS if app != 'django.contrib.admin']" >> $(SETTINGS)
Expand Down

0 comments on commit 7806d6b

Please sign in to comment.