Skip to content

Commit

Permalink
A few fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
blopker committed Oct 24, 2023
1 parent 0c33508 commit 0e85c25
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions totem/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from totem.users.managers import UserManager
from totem.utils.hash import basic_hash
from totem.utils.md import MarkdownField, MarkdownMixin
from totem.utils.models import SluggedModel
from totem.utils.models import AdminURLMixin, SluggedModel

from . import analytics

Expand All @@ -44,7 +44,7 @@ def upload_to_id_image(instance, filename: str):
return f"profiles/{user_slug}/{new_filename}.{extension}"


class User(SluggedModel, AbstractUser):
class User(AdminURLMixin, SluggedModel, AbstractUser):
"""
Default custom user model for Totem.
If adding fields that need to be filled at user signup,
Expand Down Expand Up @@ -116,9 +116,6 @@ def get_login_url(self, after_login_url: str | None, mobile: bool = False) -> st
def get_keeper_url(self):
return reverse("users:detail", kwargs={"slug": self.slug})

def get_admin_url(self):
return reverse(f"admin:{self._meta.app_label}_{self._meta.model_name}_change", args=(self.pk,))

def identify(self):
analytics.identify_user(self)

Expand Down

0 comments on commit 0e85c25

Please sign in to comment.