Web M&M
https://mam.matfyz.cz
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
537 B
24 lines
537 B
from django.urls import reverse
|
|
from django.db import models
|
|
|
|
__all__ = ["SeminarModelBase"]
|
|
|
|
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):
|
|
app_name = self._meta.app_label
|
|
model_name = self.__class__.__name__.lower()
|
|
return reverse('admin:{}_{}_change'.format(app_name, model_name), args=(self.id, ))
|
|
|
|
# def verejne_url(self):
|
|
# return None
|
|
|
|
|