Commit cc00bce8 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Added meta behavior for URL model

parent 6859cb16
......@@ -11,3 +11,9 @@ class URL( models.Model ):
short = models.CharField( primary_key = True, max_length = 50 )
clicks = models.IntegerField( default = 0 )
expires = models.DateTimeField( blank = True, null = True )
def __unicode__(self):
return '<URL: %s>' % self.short
class Meta:
ordering = ['short']
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