L
L
leha782016-02-11 23:40:10
Django
leha78, 2016-02-11 23:40:10

Practice installing packages for a project?

Due to my little experience, I don’t immediately understand how to use this or that package in my project.
For example, there is https://pypi.python.org/pypi/django-meta
Downloaded in itself
64434a484d254b0f9307144c165e3f9f.png
The instructions say that you only need to add meta to INSTALLED_APPS. I did just that, but it is not written how to make a section appear in the admin panel, how to work further, and I come to a stupor.
How, for example, is this package installed in the project?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2016-02-12
@leha78

Basic concept
You render the meta tags by including a meta.html parial template in your view templates. This template will only render meta tags if it can find a meta object in the context, so you can safely include it in your base template to have it render on all your pages.
The meta.html template expects to find a dict or object called meta in the template context. In that dict or object, it will expect to find any of the following keys/attributes:

No section will appear in the admin panel

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question