add stub portal app with 'work in progress' message; configure template system
This commit is contained in:
		
							parent
							
								
									805e2911f8
								
							
						
					
					
						commit
						af49f2d749
					
				| 
						 | 
					@ -0,0 +1,3 @@
 | 
				
			||||||
 | 
					from django.contrib import admin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Register your models here.
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					from django.apps import AppConfig
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class PortalConfig(AppConfig):
 | 
				
			||||||
 | 
					    name = 'portal'
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,3 @@
 | 
				
			||||||
 | 
					from django.db import models
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Create your models here.
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,9 @@
 | 
				
			||||||
 | 
					{% extends 'base.html' %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% block 'body' %}
 | 
				
			||||||
 | 
					<main class="container" role="main">
 | 
				
			||||||
 | 
					  <h1>Portier</h1>
 | 
				
			||||||
 | 
					  <p class="leader">Nothing to see here yet. We're working on it, though!</p>
 | 
				
			||||||
 | 
					  <p><a href="https://github.com/chaoswest-tv/portier">See progress on GitHub</a></p>
 | 
				
			||||||
 | 
					</main>
 | 
				
			||||||
 | 
					{% endblock %}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,3 @@
 | 
				
			||||||
 | 
					from django.test import TestCase
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Create your tests here.
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,6 @@
 | 
				
			||||||
 | 
					from django.urls import path
 | 
				
			||||||
 | 
					from . import views
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					urlpatterns = [
 | 
				
			||||||
 | 
					    path('', views.index, name='index'),
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,7 @@
 | 
				
			||||||
 | 
					from django.shortcuts import render
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Create your views here.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def index(request):
 | 
				
			||||||
 | 
					    # do fancy stuff here maybe
 | 
				
			||||||
 | 
					    return render(request, 'portal/index.html')
 | 
				
			||||||
| 
						 | 
					@ -36,6 +36,9 @@ INSTALLED_APPS = [
 | 
				
			||||||
    'django.contrib.sessions',
 | 
					    'django.contrib.sessions',
 | 
				
			||||||
    'django.contrib.messages',
 | 
					    'django.contrib.messages',
 | 
				
			||||||
    'django.contrib.staticfiles',
 | 
					    'django.contrib.staticfiles',
 | 
				
			||||||
 | 
					    'bootstrap4',
 | 
				
			||||||
 | 
					    'fa',
 | 
				
			||||||
 | 
					    'portal.apps.PortalConfig',
 | 
				
			||||||
    'rtmp.apps.RtmpConfig',
 | 
					    'rtmp.apps.RtmpConfig',
 | 
				
			||||||
    'restream.apps.RestreamConfig',
 | 
					    'restream.apps.RestreamConfig',
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
| 
						 | 
					@ -55,7 +58,7 @@ ROOT_URLCONF = 'portier.urls'
 | 
				
			||||||
TEMPLATES = [
 | 
					TEMPLATES = [
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
 | 
					        'BACKEND': 'django.template.backends.django.DjangoTemplates',
 | 
				
			||||||
        'DIRS': [],
 | 
					        'DIRS': [os.path.join(BASE_DIR, 'templates')],
 | 
				
			||||||
        'APP_DIRS': True,
 | 
					        'APP_DIRS': True,
 | 
				
			||||||
        'OPTIONS': {
 | 
					        'OPTIONS': {
 | 
				
			||||||
            'context_processors': [
 | 
					            'context_processors': [
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,5 +18,6 @@ from django.urls import include, path
 | 
				
			||||||
 | 
					
 | 
				
			||||||
urlpatterns = [
 | 
					urlpatterns = [
 | 
				
			||||||
    path('admin/', admin.site.urls),
 | 
					    path('admin/', admin.site.urls),
 | 
				
			||||||
    path('rtmp/', include('rtmp.urls'))
 | 
					    path('rtmp/', include('rtmp.urls')),
 | 
				
			||||||
 | 
					    path('', include('portal.urls')),
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,6 @@
 | 
				
			||||||
django>=3.0
 | 
					django>=3.0
 | 
				
			||||||
 | 
					django-bootstrap4
 | 
				
			||||||
 | 
					django-fa
 | 
				
			||||||
celery>=4.4
 | 
					celery>=4.4
 | 
				
			||||||
gunicorn>=20
 | 
					gunicorn>=20
 | 
				
			||||||
psycopg2-binary
 | 
					psycopg2-binary
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,22 @@
 | 
				
			||||||
 | 
					{% load bootstrap4 %}
 | 
				
			||||||
 | 
					{% load font_awesome %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<!DOCTYPE html>
 | 
				
			||||||
 | 
					<html lang="en">
 | 
				
			||||||
 | 
					  <head>
 | 
				
			||||||
 | 
					    <meta charset="utf-8" />
 | 
				
			||||||
 | 
					    <meta http-equiv="x-ua-compatible" content="ie=edge" />
 | 
				
			||||||
 | 
					    <meta name="viewport" content="width=device-width, initial-scale=1" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <title>{% block 'title' %}portier{% endblock %}</title>
 | 
				
			||||||
 | 
					    {% bootstrap_css %}
 | 
				
			||||||
 | 
					    {% fa_css %}
 | 
				
			||||||
 | 
					    {% bootstrap_javascript jquery='full' %}
 | 
				
			||||||
 | 
					  </head>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <body>
 | 
				
			||||||
 | 
					    {% bootstrap_messages %}
 | 
				
			||||||
 | 
					    {% block 'body' %}
 | 
				
			||||||
 | 
					    {% endblock %}
 | 
				
			||||||
 | 
					  </body>
 | 
				
			||||||
 | 
					</html>
 | 
				
			||||||
		Loading…
	
		Reference in New Issue