blob: c2fbb6bb6831009b1038cc135af49e02ee57b610 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
from django.db import models
from django.contrib.auth.models import User
from django.contrib.auth.models import (
BaseUserManager, AbstractBaseUser
)
#from drupal_auth.managers import DrupalUserManager
class Users(AbstractBaseUser):
id = models.IntegerField(primary_key=True)
username = models.CharField(max_length=100L, unique=True)
email = models.CharField(max_length=100L, unique=True)
is_active = models.BooleanField()
USERNAME_FIELD = 'username'
class Meta:
db_table = 'auth_user'
class FossCategory(models.Model):
foss = models.CharField(unique=True, max_length = 255)
description = models.TextField()
status = models.BooleanField(max_length = 2)
created = models.DateTimeField(auto_now_add = True)
updated = models.DateTimeField(auto_now = True)
class Meta:
db_table = 'creation_fosscategory'
class Language(models.Model):
name = models.CharField(max_length = 255, unique = True)
created = models.DateTimeField(auto_now_add = True)
updated = models.DateTimeField(auto_now = True)
class Meta:
db_table = 'creation_language'
class TutorialDetails(models.Model):
foss = models.ForeignKey(FossCategory)
tutorial = models.CharField(max_length = 255)
order = models.IntegerField()
created = models.DateTimeField(auto_now_add = True)
updated = models.DateTimeField(auto_now = True)
class Meta:
db_table = 'creation_tutorialdetail'
class TutorialResources(models.Model):
id = models.IntegerField(primary_key=True)
tutorial_detail = models.ForeignKey(TutorialDetails)
language = models.ForeignKey(Language)
video = models.TextField()
status = models.PositiveSmallIntegerField(default = 0)
class Meta:
db_table = 'creation_tutorialresource'
|