2011-06-02 19:16:16 +01:00
|
|
|
from django.db import models
|
2018-04-15 16:28:13 +01:00
|
|
|
from troggle.core.models import Cave, Entrance
|
2011-06-02 19:16:16 +01:00
|
|
|
|
2011-07-11 00:13:06 +01:00
|
|
|
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)
|
2020-05-26 02:21:36 +01:00
|
|
|
def __str__(self):
|
2011-07-11 00:13:06 +01:00
|
|
|
return self.entrance.slug
|