mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-27 07:44:50 +00:00
upgrade django to 2.2 (#4620)
This commit is contained in:
@@ -19,7 +19,7 @@ DEFAULT_TERMS_SLUG = getattr(settings, 'DEFAULT_TERMS_SLUG', 'site-terms')
|
||||
class UserTermsAndConditions(models.Model):
|
||||
"""Holds mapping between TermsAndConditions and Users"""
|
||||
username = LowerCaseCharField(max_length=255)
|
||||
terms = models.ForeignKey("TermsAndConditions", related_name="userterms")
|
||||
terms = models.ForeignKey("TermsAndConditions", on_delete=models.CASCADE, related_name="userterms")
|
||||
ip_address = models.GenericIPAddressField(null=True, blank=True, verbose_name='IP Address')
|
||||
date_accepted = models.DateTimeField(auto_now_add=True, verbose_name='Date Accepted')
|
||||
|
||||
@@ -53,10 +53,6 @@ class TermsAndConditions(models.Model):
|
||||
def __str__(self):
|
||||
return "{0}-{1:.2f}".format(self.slug, self.version_number)
|
||||
|
||||
@models.permalink
|
||||
def get_absolute_url(self):
|
||||
return ('tc_view_specific_version_page', [self.slug, self.version_number]) # pylint: disable=E1101
|
||||
|
||||
@staticmethod
|
||||
def create_default_terms():
|
||||
"""Create a default TermsAndConditions Object"""
|
||||
|
Reference in New Issue
Block a user