From 8ed554bca9d1fbd1fdc3f187b8bc790c38f3ae2e Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Mon, 28 Jul 2014 13:20:13 +0200 Subject: [PATCH] [TASK] Add project context model. --- frontend/admin.py | 3 ++- frontend/models.py | 11 ++++++++++- frontend/templates/index.html | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/frontend/admin.py b/frontend/admin.py index ab35bfd..4155877 100644 --- a/frontend/admin.py +++ b/frontend/admin.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.contrib import admin +from frontend.models import ProjectContext -# Register your models here. +admin.site.register(ProjectContext) \ No newline at end of file diff --git a/frontend/models.py b/frontend/models.py index 4ec29ca..6c04a1c 100644 --- a/frontend/models.py +++ b/frontend/models.py @@ -2,4 +2,13 @@ from django.db import models -# Create your models here. +class ProjectContext(models.Model): + name = models.CharField(max_length=255) + description = models.TextField() + associated_filename = models.CharField(max_length=255,blank=True,null=True) + + def __unicode__(self): + repr = self.name + if self.associated_filename: + repr += " (" + self.associated_filename + ")" + return repr \ No newline at end of file diff --git a/frontend/templates/index.html b/frontend/templates/index.html index 556feaf..a755a80 100644 --- a/frontend/templates/index.html +++ b/frontend/templates/index.html @@ -1,7 +1,7 @@ {% extends "layout/base.html" %} {% block content %}

- Welcome to Citavi Mapper!
+ Welcome, {{user}}!
Feel free to discover.

{% endblock %} \ No newline at end of file