You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
360 B
15 lines
360 B
from django.db import models
|
|
|
|
# Create your models here.
|
|
|
|
class Redirect(models.Model):
|
|
redirect = models.URLField()
|
|
count = models.PositiveIntegerField(default=0)
|
|
views = models.PositiveIntegerField(default=0)
|
|
|
|
|
|
def __unicode__(self):
|
|
return self.redirect
|
|
|
|
def get_object_url(self):
|
|
return '/redirect/redirect/%d/'%self.id
|
|
|