Commit 3b0406f8 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Added URL model.

parent 58cb90cd
from django.db import models
from django.contrib.auth.models import User
from django.utils import timezone
# Create your models here.
class URL( models.Model ):
owner = models.OneToOneField( User )
date_created = models.DateTimeField( default=timezone.now() )
target = models.CharField( max_length = 1000 )
short = models.CharField( max_length = 50 )
clicks = models.IntegerField( default = 0 )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment