I am trying to configure a django project that uses the wagtail CMS to display the templates(the templates is already in the file) on the frontend but since it is my first time working with wagtail, I am having issues and don't know where to head to. I have checked some external sources like YouTube perhaps I will get any illustration of such but I don't seem to get any.
The whole project structure is shown below and this shows that the whole templates and html files are intact but I don't know how to set it up.
If I run the program using the python manage.py runserver
, I get the project running and after opening the localhost:8000 on the browser, I only get a blank screen.
The url.py file of the main project is show below:
# django imports
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
# wagtail imports
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.core import urls as wagtail_urls
from wagtail.documents import urls as wagtaildocuments_urls
urlpatterns = [
url(r'^django-admin/', admin.site.urls),
url(r'^admin/', include(wagtailadmin_urls)),
url(r'^robots\.txt$', TemplateView.as_view(
template_name='robots.txt', content_type='text/plain'
)),
url(r'^documents/', include(wagtaildocuments_urls)),
]
urlpatterns += i18n_patterns(
url(r'', include(wagtail_urls)),
)
The project structure:
│ manage.py
│
├───about
│ │ apps.py
│ │ models.py
│ │ translation.py
│ │ __init__.py
│
├───except_wagtail
│ │ abstract_models.py
│ │ admin.py
│ │ apps.py
│ │ blocks.py
│ │ context_processors.py
│ │ models.py
│ │ settings.py
│ │ sitemap.py
│ │ translation.py
│ │ urls.py
│ │ wagtail_hooks.py
│ │ wsgi.py
│ │ __init__.py
│ │
│ ├───templates
│ │ │ 404.html
│ │ │ 500.html
│ │ │ base.html
│ │ │ base_new.html
│ │ │ robots.txt
│ │ │ sitemap.xml
│ │ │
│ │ ├───about
│ │ │ about_page.html
│ │ │ contact_page.html
│ │ │ event_calendar_page.html
│ │ │ generic_page.html
│ │ │ privacy_page.html
│ │ │ resources_page.html
│ │ │
│ │ ├───index
│ │ │ home_page.html
│ │ │
│ │ ├───knowledge
│ │ │ article_page.html
│ │ │ knowledge_page.html
│ │ │
│ │ ├───news
│ │ │ news_index_page.html
│ │ │ news_page.html
│ │ │
│ │ ├───people
│ │ │ people_page.html
│ │ │ profile_page.html
│ │ │
│ │ ├───projects
│ │ │ project_index_page.html
│ │ │ project_page.html
│ │ │
│ │ ├───search
│ │ │ search.html
│ │ │
│ │ ├───services
│ │ │ service_index_page.html
│ │ │ service_page.html
│ │ │ service_pillar_page.html
│ │ │ working_area_page.html
│ │ │
│ │ ├───_blocks
│ │ │ blockquote.html
│ │ │ carousel_block.html
│ │ │ lightbox_block.html
│ │ │ linked_asset_block.html
│ │ │ paragraph_block.html
│ │ │ people_list_block.html
│ │ │ related_assets_block.html
│ │ │ spacer_block.html
│ │ │
│ │ ├───_includes
│ │ │ │ card.html
│ │ │ │ card_new.html
│ │ │ │ card_old.html
│ │ │ │ card_people.html
│ │ │ │ card_video.html
│ │ │ │ card_with_col.html
│ │ │ │ index_item_search.html
│ │ │ │ index_item_specific_cards.html
│ │ │ │ ld_article.html
│ │ │ │ ld_article.json
│ │ │ │ ld_organization.html
│ │ │ │ ld_organization.json
│
├───index
│ │ apps.py
│ │ models.py
│ │ translation.py
│ │ __init__.py
│
├───knowledge
│ │ apps.py
│ │ models.py
│ │ translation.py
│ │ __init__.py
│
├───news
│ │ apps.py
│ │ models.py
│ │ translation.py
│ │ __init__.py
│
├───people
│ │ apps.py
│ │ models.py
│ │ translation.py
│ │ __init__.py
│
├───projects
│ │ apps.py
│ │ models.py
│ │ translation.py
│ │ __init__.py
│
├───search
│ │ apps.py
│ │ models.py
│ │ translation.py
│ │ views.py
│ │ __init__.py
│
└───services
│ apps.py
│ models.py
│ translation.py
│ __init__.py