91cf18fa9e
Pustil jsem na velkou část kódu skript, zatím nevím, co jsem rozbil. Prosím o review :-)
22 lines
467 B
Python
22 lines
467 B
Python
from django.urls import reverse
|
|
from django.db import models
|
|
|
|
|
|
class SeminarModelBase(models.Model):
|
|
|
|
class Meta:
|
|
abstract = True
|
|
|
|
def verejne(self):
|
|
return False
|
|
|
|
# def get_absolute_url(self):
|
|
# return "https://" + str(get_current_site(None)) + self.verejne_url()
|
|
|
|
def admin_url(self):
|
|
model_name = self.__class__.__name__.lower()
|
|
return reverse('admin:seminar_{}_change'.format(model_name), args=(self.id, ))
|
|
|
|
# def verejne_url(self):
|
|
# return None
|
|
|