Answer the question
In order to leave comments, you need to log in
How to call a user in Dzhang and attach meta tags to him?
The question is rather broader, how to do meta tags correctly? Are there methods already implemented in the engine?
I decided to do it like this (I need the output of a metatitle, description, h1 in the application responsible for authentication and displaying a personal account ), in the model:
from django.contrib.auth.models import User
class MyUser(User):
def name(self):
if not User.first_name:
return "Юзер %s" % User.id
return User.first_name
def meta_title(self):
return "Cтраница пользователя %s" % self.name
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question