Commit 59fd555a authored by gab's avatar gab

created eventcatalog, homepage

parent 8ee3262a
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class EventcatalogConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'eventcatalog'
from django.db import models
# Create your models here.
{% extends "base.html" %}
{% block content %}
{% if user.is_authenticated %}
Hi {{ user.first_name }} {{ user.last_name }}!
<form action="{% url 'accounts:logout' %}" method="post">
{% csrf_token %}
<button type="submit">Log Out</button>
</form>
{% else %}
<p>You are not logged in</p>
<a href="{% url 'accounts:login' %}">Log In</a>
{% endif %}
{% endblock %}
\ No newline at end of file
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
urlpatterns = [
path('', views.homepage, name="index"),
]
\ No newline at end of file
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def homepage(request):
return render(request, "eventcatalog/index.html")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment