Find Jobs
Hire Freelancers

Django Limiting permissions with-in template

$10-30 CAD

Terminado
Publicado hace casi 8 años

$10-30 CAD

Pagado a la entrega
I have a django application made, however; I would like to check in the html template file if the user has a permission to use an application. If the user has access to the App then a link will appear (using an IF statement). If not nothing will appear. So far we've accomplished this by using a for statement in the View and checking in the database if the user has permission to use that application. As the software grows we do not want to code this in every single method. Should be a quick fix for someone with good experience.
ID del proyecto: 10729582

Información sobre el proyecto

3 propuestas
Proyecto remoto
Activo hace 8 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
Hi there,I am a professional Django developer, having many years of experience with it. Ping me for discussion.
$30 CAD en 1 día
5,0 (12 comentarios)
4,2
4,2
3 freelancers están ofertando un promedio de $27 CAD por este trabajo
Avatar del usuario
so check it in template ia a wrong way, becouse this part of code will be slow (django template engine) and not reusable. You should create some method in a view, and check permission in a view, or, probably, you can create View mixin with this method and use it in any View if you need it. This method should take context of a page and add "has_look_permission" attribute to this context, after you can ise it in template {% if has_look_permission %} bla-bla. Also check native Django permission Groups it is poverful build-in tool
$25 CAD en 10 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
Open Source Developer. Experience in Python , Django, Javascript , HTML , CSS. This can be done using Django Permissions.
$25 CAD en 1 día
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de CANADA
Windsor, Canada
5,0
3
Forma de pago verificada
Miembro desde may 19, 2015

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.