Commit f64fc7d50b1c7e5472bae1d141a2651f03de479c

Authored by Gustavo Bernardo
1 parent f220b7a8

Started the app Links and started to develope the model [Issue #119]

links/__init__.py 0 → 100644
links/admin.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.contrib import admin
  2 +
  3 +# Register your models here.
... ...
links/apps.py 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +from django.apps import AppConfig
  2 +
  3 +
  4 +class LinksConfig(AppConfig):
  5 + name = 'links'
... ...
links/migrations/__init__.py 0 → 100644
links/models.py 0 → 100644
... ... @@ -0,0 +1,15 @@
  1 +from django.db import models
  2 +from courses.models import Material
  3 +# Create your models here.
  4 +class Link(Material,models.Model):
  5 + name = models.CharField(max_lenght = 100)
  6 + link = models.UrlField()
  7 + description = models.CharField(max_lenght = 200)
  8 + class Meta:
  9 + verbose_name = 'Link'
  10 + verbose_name_plural = "Links"
  11 + def __str__(self):
  12 + return str(self.name)
  13 +
  14 +
  15 +
... ...
links/tests.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.test import TestCase
  2 +
  3 +# Create your tests here.
... ...
links/views.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.shortcuts import render
  2 +
  3 +# Create your views here.
... ...