OpenSlides/tests/old/core/models.py

13 lines
337 B
Python
Raw Normal View History

2013-08-11 09:36:17 +02:00
from django.db import models
class TestModel(models.Model):
name = models.CharField(max_length='255')
def get_absolute_url(self, link='detail'):
if link == 'detail':
return 'detail-url-here'
if link == 'delete':
return 'delete-url-here'
raise ValueError('No URL for %s' % link)