from django.db import models
from django.contrib.auth.models import  User
import os

# Create your models here.

def get_upload_path(self,filename):
    return os.path.join("files_uploaded", filename)

class Blog(models.Model):
    title = models.CharField(max_length=50)
    date_posted = models.DateTimeField('Posted Date',auto_now_add=True)
    content = models.TextField()
    author = models.ForeignKey(User)

    def __unicode__(self):
        return self.title

class Event(models.Model):
    name = models.CharField(max_length=50)
    start_date = models.DateTimeField('Start Time')
    end_date = models.DateTimeField('End Time')
    venue = models.CharField(max_length=50)

    def __unicode__(self):
        return self.name

class FileManager(models.Model):
    title = models.CharField(max_length=50)
    CATEGORY = (
        ('Audio','Audio'),
        ('Video','Video'),
        ('Document','Document')
    )
    category = models.CharField('File Category', choices=CATEGORY, max_length=50)
    file_uploaded = models.FileField(upload_to='files_uploaded/')
    date_uploaded = models.DateTimeField('Date Uploaded',auto_now_add=True)

    def __unicode__(self):
        return self.title
4aa6e62e3929a7516fc9cf21f38a8583a799f4a9
<mask token>


class Event(models.Model):
    name = models.CharField(max_length=50)
    start_date = models.DateTimeField('Start Time')
    end_date = models.DateTimeField('End Time')
    venue = models.CharField(max_length=50)

    def __unicode__(self):
        return self.name


class FileManager(models.Model):
    title = models.CharField(max_length=50)
    CATEGORY = ('Audio', 'Audio'), ('Video', 'Video'), ('Document', 'Document')
    category = models.CharField('File Category', choices=CATEGORY,
        max_length=50)
    file_uploaded = models.FileField(upload_to='files_uploaded/')
    date_uploaded = models.DateTimeField('Date Uploaded', auto_now_add=True)

    def __unicode__(self):
        return self.title

<mask token>


class Blog(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>


class Event(models.Model):
    name = models.CharField(max_length=50)
    start_date = models.DateTimeField('Start Time')
    end_date = models.DateTimeField('End Time')
    venue = models.CharField(max_length=50)

    def __unicode__(self):
        return self.name


class FileManager(models.Model):
    title = models.CharField(max_length=50)
    CATEGORY = ('Audio', 'Audio'), ('Video', 'Video'), ('Document', 'Document')
    category = models.CharField('File Category', choices=CATEGORY,
        max_length=50)
    file_uploaded = models.FileField(upload_to='files_uploaded/')
    date_uploaded = models.DateTimeField('Date Uploaded', auto_now_add=True)

    def __unicode__(self):
        return self.title

<mask token>


class Blog(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __unicode__(self):
        return self.title


class Event(models.Model):
    name = models.CharField(max_length=50)
    start_date = models.DateTimeField('Start Time')
    end_date = models.DateTimeField('End Time')
    venue = models.CharField(max_length=50)

    def __unicode__(self):
        return self.name


class FileManager(models.Model):
    title = models.CharField(max_length=50)
    CATEGORY = ('Audio', 'Audio'), ('Video', 'Video'), ('Document', 'Document')
    category = models.CharField('File Category', choices=CATEGORY,
        max_length=50)
    file_uploaded = models.FileField(upload_to='files_uploaded/')
    date_uploaded = models.DateTimeField('Date Uploaded', auto_now_add=True)

    def __unicode__(self):
        return self.title

<mask token>


class Blog(models.Model):
    title = models.CharField(max_length=50)
    date_posted = models.DateTimeField('Posted Date', auto_now_add=True)
    content = models.TextField()
    author = models.ForeignKey(User)

    def __unicode__(self):
        return self.title


class Event(models.Model):
    name = models.CharField(max_length=50)
    start_date = models.DateTimeField('Start Time')
    end_date = models.DateTimeField('End Time')
    venue = models.CharField(max_length=50)

    def __unicode__(self):
        return self.name


class FileManager(models.Model):
    title = models.CharField(max_length=50)
    CATEGORY = ('Audio', 'Audio'), ('Video', 'Video'), ('Document', 'Document')
    category = models.CharField('File Category', choices=CATEGORY,
        max_length=50)
    file_uploaded = models.FileField(upload_to='files_uploaded/')
    date_uploaded = models.DateTimeField('Date Uploaded', auto_now_add=True)

    def __unicode__(self):
        return self.title

from django.db import models
from django.contrib.auth.models import  User
import os

# Create your models here.

def get_upload_path(self,filename):
    return os.path.join("files_uploaded", filename)

class Blog(models.Model):
    title = models.CharField(max_length=50)
    date_posted = models.DateTimeField('Posted Date',auto_now_add=True)
    content = models.TextField()
    author = models.ForeignKey(User)

    def __unicode__(self):
        return self.title

class Event(models.Model):
    name = models.CharField(max_length=50)
    start_date = models.DateTimeField('Start Time')
    end_date = models.DateTimeField('End Time')
    venue = models.CharField(max_length=50)

    def __unicode__(self):
        return self.name

class FileManager(models.Model):
    title = models.CharField(max_length=50)
    CATEGORY = (
        ('Audio','Audio'),
        ('Video','Video'),
        ('Document','Document')
    )
    category = models.CharField('File Category', choices=CATEGORY, max_length=50)
    file_uploaded = models.FileField(upload_to='files_uploaded/')
    date_uploaded = models.DateTimeField('Date Uploaded',auto_now_add=True)

    def __unicode__(self):
        return self.title