Content Management/Models

From OLPC

Jump to: navigation, search
from django.db import models

class Content(models.Model):
	title = models.CharField(maxlength=200)
	path = models.FileField(upload_to='files', blank=True, null=True)
	date = models.DateTimeField('date added')
	confirmed = models.BooleanField()
	def __str__(self):
		return self.title + " (" + self.path + ")"
	class Admin:
		pass

class Tags(models.Model):
	name = models.CharField(maxlength=200)
	content = models.ManyToManyField(Content)
	def __str__(self):
		return self.name
Personal tools
  • Log in
  • Login with OpenID
About OLPC
About the laptop
About the tablet
Projects
OLPC wiki
Toolbox
In other languages