Sorry. Info ISN’T saved on private browser On Thu, May 30, 2019 at 7:25 PM Andrew C. <[email protected]> wrote:
> Try clearing your browser history and info. Should also test in Incognito > or Private browser so info is saved. I have a suspicion that your browser > is saving login info and you’re just not realizing this. > > On Tue, May 28, 2019 at 5:54 PM Fellipe Henrique <[email protected]> > wrote: > >> Hi Jim, >> >> Tried that, as you can see on my code, but not working.. when user type >> the url, still see the template.. >> >> Any suggestions? >> >> Regards, >> >> T.·.F.·.A.·. S+F >> *Fellipe Henrique P. Soares* >> >> e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ >> 's/(.)/chr(ord($1)-2*3)/ge' >> *Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh >> <https://fedoraproject.org/wiki/User:Fellipeh>* >> *Blog: *http:www.fellipeh.eti.br >> *GitHub: https://github.com/fellipeh <https://github.com/fellipeh>* >> *Twitter: @fh_bash* >> >> >> On Tue, May 28, 2019 at 2:36 PM Jim Illback <[email protected]> >> wrote: >> >>> I think you can also add to your class (right under your *template_name*… >>> for example) this statement: >>> >>> permission_required = *‘*appname.permission_name' >>> >>> This will limit to logged on users (as below), and also to users who >>> possess this permission. >>> >>> Jim >>> >>> >>> On May 28, 2019, at 9:55 AM, Joe Reitman <[email protected]> wrote: >>> >>> Fellipe, >>> >>> Here is an example of decorating class based views from the >>> documentation >>> <https://docs.djangoproject.com/en/2.2/topics/class-based-views/intro/#decorating-class-based-views> >>> : >>> >>> from django.contrib.auth.decorators import login_requiredfrom >>> django.utils.decorators import method_decoratorfrom django.views.generic >>> import TemplateView >>> class ProtectedView(TemplateView): >>> template_name = 'secret.html' >>> >>> @method_decorator(login_required) >>> def dispatch(self, *args, **kwargs): >>> return super().dispatch(*args, **kwargs) >>> >>> >>> On Tuesday, May 28, 2019 at 6:54:38 AM UTC-5, Fellipe Henrique wrote: >>>> >>>> Hello, >>>> >>>> I have these class, based on CreateView class... and I only want allow >>>> user with these permissions to add record... >>>> >>>> class ClienteCreateView(ERPbrViewMixin, CreateView): >>>> template_name = 'cadastro/cliente/form.html' >>>> permission_required = ('cliente.can_open', 'cliente.can_edit', >>>> 'cliente.can_add') >>>> model = Cliente >>>> form_class = ClienteForm >>>> >>>> But, not working... user without these permission, when type the url >>>> show the form... >>>> >>>> Any tips how to do that? >>>> >>>> Cheers! >>>> >>>> >>>> T.·.F.·.A.·. S+F >>>> *Fellipe Henrique P. Soares* >>>> >>>> e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ >>>> 's/(.)/chr(ord($1)-2*3)/ge' >>>> *Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh >>>> <https://fedoraproject.org/wiki/User:Fellipeh>* >>>> *Blog: *http:www.fellipeh.eti.br <http://www.fellipeh.eti.br/> >>>> *GitHub: https://github.com/fellipeh <https://github.com/fellipeh>* >>>> *Twitter: @fh_bash* >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/group/django-users. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/060a2c59-bf39-456c-a686-bf6ba104e1f7%40googlegroups.com >>> <https://groups.google.com/d/msgid/django-users/060a2c59-bf39-456c-a686-bf6ba104e1f7%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/group/django-users. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/B5E64E45-C1C3-455F-AEC7-167852FE17C7%40hotmail.com >>> <https://groups.google.com/d/msgid/django-users/B5E64E45-C1C3-455F-AEC7-167852FE17C7%40hotmail.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAF1jwZHCR%3Dn2FMcdPdWsAOKG7wQRhqKBb4is58P61dGCi8_Eqg%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAF1jwZHCR%3Dn2FMcdPdWsAOKG7wQRhqKBb4is58P61dGCi8_Eqg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJVmkN%3D-Js0_CKEeqZ0YP0eC_zvWPVZXP5v_2KC4MmCoCmko0Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

