2011-06-02 19:16:16 +01:00
|
|
|
from django.db import models
|
2020-05-28 04:54:53 +01:00
|
|
|
from troggle.core.models_caves 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)
|
2020-06-18 00:20:47 +01:00
|
|
|
entrance = models.ForeignKey(Entrance,on_delete=models.CASCADE)
|
2020-05-26 02:21:36 +01:00
|
|
|
def __str__(self):
|
2011-07-11 00:13:06 +01:00
|
|
|
return self.entrance.slug
|