Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

BN 0 8 A nid p f k m nt di imp tant layn d n na dis payt n program. fr m django.contrib import

BN08 "A nid p f kmnt di imptant layn dn na dis paytn program."
frm django.contrib import msej dn
frm django.contrib.auth import get_yuz_mdel
frm django.contrib.auth.mixins import LginRkwaydMixin
frm django.urls import rivays
frm django.utils.transleshn import gettext_lazy as _.
frm django.views.generic import DitaylVyu, RidayrktVyu,pdetVyu
Yuz = get_yuz_mdel().
klas YuzDitaylView(LoginRikwaydMixin, DitelView):
model = Yuzman we de yuz am
slug_field =""yuz nem"".
slug_url_kwarg =""yuz nem"".
user_detail_view = Yuz DitilVyu.as_viu()
klas Yuz pdetView(LginRikwaydMixin,pdetView):
model = Yuzman we de yuz am
fil dm =[""nem""]
def get_sakses_url (sf): .
return reverse(""yuz:ditel"", kwargs={""yuz nem"": slf.rikwest.yuz.yuz nem})
def get_objkt (sf): .
return Yuz.objects.get(yuz nem=sf.rikwest.yuz.yuz nem)
def fm_valid (sf, fm): .
msej dn.ad_msej(
self.request, messages.INFO, _(""Infos dn pdet fayn fayn wan"")
).
ritn super().fm_valid (fm).
yuz_pdet_viu = Yuz pdetView.as_viu()
klas YuzaRidayrktView(LginRidayrktMixin, RidayrktVyu):
permanent = Falz
def get_ridayrkt_url (sf): .
return reverse(""yuz:ditel"", kwargs={""yuz nem"": slf.rikwest.yuz.yuz nem})
yuz_ridayrkt_viu = YuzRdayrktVyu.as_viu()
Yu kin duya kmnt (#) pan di imptant layn dn bt aw dn de wok n wetin dn de du js want kmnt insay di fm fksplen".

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

please help me answer this

Answered: 1 week ago