--- /dev/null
+from django.db import models
+
+# Create your models here.
+
+# A very basic data model to begin with
+# Create sensible default option, test the authentification framework, ensure
+# pertinence of the comics building way : page by page, vignette by vignette, etc. offer
+# multiple way as much as much possible, test upload to PDF file outisde the DB...
+
+class User(models.Model):
+ first_name = models.CharField(max_length=50)
+ last_name = models.CharField(max_length=50)
+ # Not sure about this two, django should offer login/pass and session
+ #login = models.CharField(max_length=15)
+ #password = models.CharField(max_length=15)
+ email = models.EmailField()
+ headshot = models.ImageField(upload_to='user_headshots')
+ is_author = models.BooleanField()
+ #num_awards = models.IntegerField()
+
+
+class Comics_page(models.Model):
+ # Not sure about vignette by vignette view or page by page ... let's start page by page
+ page_number = models.IntegerField()
+ page_content = models.ImageField(upload_to='comics_pages')
+ upload_date = models.DateField()
+ page_authors = models.ManyToManyField(User)
+
+class Comics(Comics_page):
+ title = models.CharField(max_length=300)
+ rating = models.FloatField()
+ authors = models.ManyToManyField(User)
+ publication_date = models.DateField()
+ # Change the related name to a more appropriate name
+ fragment_comics = models.ManyToManyField(Comics_page, related_name="%(app_label)s_%(class)s_related")
+ full_comics = models.ImageField(upload_to='comics_full')
+ full_comics_upload_date = models.DateField()
+ #publisher = models.ForeignKey(User)
--- /dev/null
+"""
+This file demonstrates writing tests using the unittest module. These will pass
+when you run "manage.py test".
+
+Replace this with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+
+class SimpleTest(TestCase):
+ def test_basic_addition(self):
+ """
+ Tests that 1 + 1 always equals 2.
+ """
+ self.assertEqual(1 + 1, 2)