Kushal
Anyone can help me to give some useful links or books to make Machine learning applications in Python?
Doragonsureiyā
Anyone can help me to give some useful links or books to make Machine learning applications in Python?
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Kushal
Okay
Nirupam
Guys,m getting an error saying missing 1 required positional argument pk..
Nirupam
Another one an unexpected keyword argument pk.
Nirupam
Any idea?
محمد دلشاد
Guys,m getting an error saying missing 1 required positional argument pk..
u have declared a pk in the url but u r not passing it or u haven't coded ur view in the respected manner
Nirupam
Still
محمد دلشاد
I passed
may be view function is not defined with a parameter
محمد دلشاد
Not able to find.
hatebin codes
Pradyum
EDIT: Hi in django multiple databases i have set the router and DATABASES but am not able to call the models of the other database how can i do it?
Pradyum
got it, sorry am new to this.
Pradyum
https://stackoverflow.com/q/62658396/7999665
Pradyum
i have given a code snippets here
Nirupam
How to display data using the foreign key in rest framework Need to use class based view or function based
Pradyum
could you give more details Nirupam ?
Nirupam
could you give more details Nirupam ?
Suppose i have two table.connecting with foreign key.now i want to display 1 st table data using second table foreign key..in the view part what should i use function based or class based view..django rest api.
Pradyum
In django whenever you create a foreign key there is a reverse relationship is created you can use that for calling the details of the foreign key, mention the related_name on model filed and get it through serialiser
Pradyum
https://www.django-rest-framework.org/api-guide/relations/#reverse-relations
Pradyum
you may refer to this documentation
Pradyum
I usually prefer class based views
Pradyum
but at the end its just a matter of choice Nirupam
Nirupam
but at the end its just a matter of choice Nirupam
Thanks #pradyum.. let me check the above link
Nirupam
Guys.I am getting views import error in project urls.py.. any solution ? Tried everything from stackoverflow to resolve but no changes
Bunty chhatri wala..
Can anybody help me in pseudo design of Quiz (multiple choice questio ) models. Just for beginners.. I thought this one.. class Question(): Title= class Choice(): Opt1= Opt2= Opt3= Opt4= But for answer column should i add it in choice or a seprate table?
Wang
you may write error link path of css
Nirupam
Guys.I am getting views import error in project urls.py.. any solution ? Tried everything from stackoverflow to resolve but no changes
Wang
i want.to.see you link of css
Wang
you may not add /static in you path
@@
and used this in template
Rajesh
STATIC_URL = '/static/' STATICFILES_DIRS = [ os.path.join(BASE_DIR, "static") ] It must be like this
Rajesh
show me the code
Mark
#help how to make one page website in django?
Sparsh
Using rest api.
Mark
*single
Sparsh
Bunty chhatri wala..
you can.use many to many inChoice
And for answer column ? In choice table only?
Rajesh
1st on extends line music/base.html
Rajesh
on static line give a space b/w static and url
Wang
you can try don't use static tag use hard code /static/music/static/register.css in your html
Sparsh
run this command python manage.py collectstatic
@@
thank you now its working
Rajesh
i am also having one error if you interested ping me i will post that code
Rajesh
show me the error
i want to share photo
Wang
you cam private message to me
@@
what should i do ???
Rajesh
i couldn't understand you
Wang
me too
Shihasz
Learn more about environments
shekhar
anyone who has worked with jwt?
Doragonsureiyā
anyone who has worked with jwt?
Please don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello I need help on $z" Just ask about your problem directly! With a very high amount of people here the probability that someone will help is pretty high. Also please read: http://catb.org/~esr/faqs/smart-questions.html
Aleksey
Hello, I’m trying to configure LDAP authorization in a web application on django (AWX if it says something to someone). Authorization passes, but assignment to groups based on LDAP groups does not work. The following is specified in the "LDAP Organization Map" authorization settings: { "Default": { "remove_admins": false, "admins": [ "CN=MIQ_admins,OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO", "OU=MIQ,DC=BANK,DC=RUS,DC=CONTOSO" ], "remove_users": false, "users": false } } When authorizing an LDAP user sn.ivanov, the following is written in the logs: 2020-06-30 15:22:13,581 DEBUG django_auth_ldap search_s('OU=MIQ,DC=BANK,DC=RUS,DC=CONTOSO', 2, '(sAMAccountName=%(user)s)') returned 1 objects: cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso 2020-06-30 15:22:13,585 DEBUG django_auth_ldap Populating Django user sn.ivanov 2020-06-30 15:22:13,587 ERROR django_auth_ldap search_s('OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO', 2, '(&(objectClass=group)(member=cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso))') raised REFERRAL({'desc': 'Referral', 'info': 'Referral:\nldap://sts.rus.contoso/OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO'},) 2020-06-30 15:22:13,587 DEBUG django_auth_ldap search_s('OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO', 2, '(&(objectClass=group)(member=cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso))') returned 0 objects: 2020-06-30 15:22:13,595 DEBUG django_auth_ldap cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso is not a member of cn=miq_admins,ou=miq,dc=sts,dc=rus,dc=contoso 2020-06-30 15:22:13,595 DEBUG django_auth_ldap cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso is not a member of ou=miq,dc=bank,dc=rus,dc=contoso 2020-06-30 15:22:13,634 INFO awx.api.generics User sn.ivanov logged in from 10.31.252.123 The user sn.ivanov@BANK.RUS.CONTOSO is precisely a member of the group CN=MIQ_admins,OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO May be you can help me with it? Or it is wrong chat for that problem?
Mirco
Hello, I’m trying to configure LDAP authorization in a web application on django (AWX if it says something to someone). Authorization passes, but assignment to groups based on LDAP groups does not work. The following is specified in the "LDAP Organization Map" authorization settings: { "Default": { "remove_admins": false, "admins": [ "CN=MIQ_admins,OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO", "OU=MIQ,DC=BANK,DC=RUS,DC=CONTOSO" ], "remove_users": false, "users": false } } When authorizing an LDAP user sn.ivanov, the following is written in the logs: 2020-06-30 15:22:13,581 DEBUG django_auth_ldap search_s('OU=MIQ,DC=BANK,DC=RUS,DC=CONTOSO', 2, '(sAMAccountName=%(user)s)') returned 1 objects: cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso 2020-06-30 15:22:13,585 DEBUG django_auth_ldap Populating Django user sn.ivanov 2020-06-30 15:22:13,587 ERROR django_auth_ldap search_s('OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO', 2, '(&(objectClass=group)(member=cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso))') raised REFERRAL({'desc': 'Referral', 'info': 'Referral:\nldap://sts.rus.contoso/OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO'},) 2020-06-30 15:22:13,587 DEBUG django_auth_ldap search_s('OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO', 2, '(&(objectClass=group)(member=cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso))') returned 0 objects: 2020-06-30 15:22:13,595 DEBUG django_auth_ldap cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso is not a member of cn=miq_admins,ou=miq,dc=sts,dc=rus,dc=contoso 2020-06-30 15:22:13,595 DEBUG django_auth_ldap cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso is not a member of ou=miq,dc=bank,dc=rus,dc=contoso 2020-06-30 15:22:13,634 INFO awx.api.generics User sn.ivanov logged in from 10.31.252.123 The user sn.ivanov@BANK.RUS.CONTOSO is precisely a member of the group CN=MIQ_admins,OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO May be you can help me with it? Or it is wrong chat for that problem?
!paste
Doragonsureiyā
Hello, I’m trying to configure LDAP authorization in a web application on django (AWX if it says something to someone). Authorization passes, but assignment to groups based on LDAP groups does not work. The following is specified in the "LDAP Organization Map" authorization settings: { "Default": { "remove_admins": false, "admins": [ "CN=MIQ_admins,OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO", "OU=MIQ,DC=BANK,DC=RUS,DC=CONTOSO" ], "remove_users": false, "users": false } } When authorizing an LDAP user sn.ivanov, the following is written in the logs: 2020-06-30 15:22:13,581 DEBUG django_auth_ldap search_s('OU=MIQ,DC=BANK,DC=RUS,DC=CONTOSO', 2, '(sAMAccountName=%(user)s)') returned 1 objects: cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso 2020-06-30 15:22:13,585 DEBUG django_auth_ldap Populating Django user sn.ivanov 2020-06-30 15:22:13,587 ERROR django_auth_ldap search_s('OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO', 2, '(&(objectClass=group)(member=cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso))') raised REFERRAL({'desc': 'Referral', 'info': 'Referral:\nldap://sts.rus.contoso/OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO'},) 2020-06-30 15:22:13,587 DEBUG django_auth_ldap search_s('OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO', 2, '(&(objectClass=group)(member=cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso))') returned 0 objects: 2020-06-30 15:22:13,595 DEBUG django_auth_ldap cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso is not a member of cn=miq_admins,ou=miq,dc=sts,dc=rus,dc=contoso 2020-06-30 15:22:13,595 DEBUG django_auth_ldap cn=ivanov sergey,ou=miq,dc=bank,dc=rus,dc=contoso is not a member of ou=miq,dc=bank,dc=rus,dc=contoso 2020-06-30 15:22:13,634 INFO awx.api.generics User sn.ivanov logged in from 10.31.252.123 The user sn.ivanov@BANK.RUS.CONTOSO is precisely a member of the group CN=MIQ_admins,OU=MIQ,DC=STS,DC=RUS,DC=CONTOSO May be you can help me with it? Or it is wrong chat for that problem?
To share code or error tracebacks please use an online pasting service, here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev
Pradyum
can anyone actually fix this
Pradyum
https://stackoverflow.com/a/62662484/7999665
Pradyum
have been stuck for past 2days
Peter
Peter Nani: Any one real python paid videos?? Any one ??
Anonymous
Hello Guys ı have problem , {% for x in info %} {% trans "{{x.info}}" %} {% endfor %} why ıcant translate ??
Anonymous
mate ı dont understand all pages ı can translate where ım just model objects
Anonymous
can u give me example ?
Anonymous
no ,, What is tihs mate ?
Anonymous
def galery(request): info = Galeri.objects.all() hello = _('Merhaba') context = { 'info':info, 'hello':hello } return render(request,'central/galeri.html',context) this my code
bahaa eddine
please I need help in django