-
Notifications
You must be signed in to change notification settings - Fork 1
/
models.py
30 lines (23 loc) · 869 Bytes
/
models.py
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
import datetime
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.contrib import admin
class Truck(models.Model):
name=models.CharField(max_length="100")
description = models.CharField(max_length="200", null= True)
profile_icon=models.URLField(blank=True)
date_added = models.DateTimeField(default=datetime.datetime.now())
id_str = models.CharField(max_length="100")
truck_url = models.URLField(blank=True)
geo_enabled = models.BooleanField(default=False)
real_name=models.CharField(max_length="100")
def __unicode__(self):
return self.name
from tagging.models import Tag
class Hood(models.Model):
name = models.CharField(max_length="80")
location = models.CharField(max_length="250")
tags = models.ManyToManyField(Tag)
def __unicode__(self):
return self.name