forked from expo/troggle
13 lines
438 B
Python
13 lines
438 B
Python
from django.db import models
|
|
from troggle.core.models_caves import Cave, Entrance
|
|
|
|
class Redirect(models.Model):
|
|
originalURL = models.CharField(max_length=200, unique=True)
|
|
newURL = models.CharField(max_length=200)
|
|
|
|
class EntranceRedirect(models.Model):
|
|
originalURL = models.CharField(max_length=200)
|
|
entrance = models.ForeignKey(Entrance,on_delete=models.CASCADE)
|
|
def __str__(self):
|
|
return self.entrance.slug
|