S
S
siarheisiarhei2020-05-05 16:23:07
Django
siarheisiarhei, 2020-05-05 16:23:07

"Django app image", Only one "img" unit is obtained - a universal one that works in all "app"?

"Django app image", It turns out that there is only one universal unit (models) - "img" - that works in all "app" templates.

user = models.OneToOneField(User, on_delete=models.CASCADE)
......

To make one more, "universal for all app" does not work ...
Are there any simple options ...?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
siarheisiarhei, 2020-05-05
@siarheisiarhei

It took 2 full days to understand - (app.user.image | to | app.user.image.template)
there is one uni. model (User) = assigned to everyone upon activation -
{{ user.profile.image.url }}
In template tags - works, in all app... (and everyone who registered sees it)..
There is an app "Master" and when booking, you need the face of the master, not "user.profile.image" ...
Tags with ".image.url " the rest work only in their-templates-app....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question