deepak
how to jump on specific page if login is authenticat
deepak
please answer ....
deepak
please anyone help me to write code for logout on site and jump to home page
deepak
i m new in django
Anonymous
https://code.djangoproject.com/ticket/17568
deepak
and where i register this page .in project url or app url
deepak
and how add this like ^aaaaa/. ^$/etc
Mirco
I suppose you have an app with its urlconf So in project url you define for example home/$ url and include home app urls conf with include() for example the first home app url could be r'^$'
Mirco
So when redirecting to home/ , Django will look inside home.urls and it will find the r'^$' path
Mirco
and where i register this page .in project url or app url
https://realpython.com/django-redirects/ Have a look for better examples
Combot
deepak kashyap (0) has increased reputation of Mirco (2)
Mirco
thanks
Yw 😀
Piyush
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev or sudo yum install python-devel openldap-devel
I am using windows 7 and python 3.6........ I need to imstall the same libraries or different??
Piyush
I couldnt found that libraries 😢
Jimmies San
idk windows. sorry:/ never used
darksied
I am using windows 7 and python 3.6........ I need to imstall the same libraries or different??
You can check this: https://www.python-ldap.org/en/latest/installing.html
Anonymous
check for virtual environment ... pipenv or virtualenv on windows
Anonymous
I think it works with powershell
Anonymous
on windows 10 you could use bash app... it's pathetic, but for basic Dev it's fine
Jimmies San
@henry908 spam again and i will ban you.
Piyush
You can check this: https://www.python-ldap.org/en/latest/installing.html
For Windows I followed the steps.. Getting the same error.... Lber.h file not found 😢
Vladyslav 🇺🇦🇪🇺
Hey
Vladyslav 🇺🇦🇪🇺
Folks, can you help me with facebook api? Mean oauth2
Vladyslav 🇺🇦🇪🇺
I send post to my server with facebook token etc, and server give me TypeError - unsupported operand type(s) for &: 'str' and 'str' Rrquest method:post
Vladyslav 🇺🇦🇪🇺
Share the code with pastebin
Pastebin.com/CQePjdu4
Mirco
Pastebin.com/CQePjdu4
Line 21, u cannot use & without ' '
8 € ∆ $ "|"
guys
Mirco
You should use format()
8 € ∆ $ "|"
where i can get free domain and hosting
Vladyslav 🇺🇦🇪🇺
Vladyslav 🇺🇦🇪🇺
Line 21, u cannot use & without ' '
Pastebin.com/nR7RyjbG like this?
Vladyslav 🇺🇦🇪🇺
Or type=large&id={}
Vladyslav 🇺🇦🇪🇺
Or' response_id={}'.format(response['id'])
Milan
Pastebin.com/CQePjdu4
You can use literal string format like: avatar = f'http://graph.facebook.com/%s/picture?type=large&{response['id']}'
Vladyslav 🇺🇦🇪🇺
Without .format?
Milan
Yes
Milan
Like just: avatar = f"http://graph.facebook.com/%s/picture?type=large&{response['id']}"
Vladyslav 🇺🇦🇪🇺
Pastebin.com/B6nhcXHP What? What mean f? Its dont a method or def... how it works?
Milan
It's called f-string literal format. It's only works on python 3.x+
Milan
You can google it.
Vladyslav 🇺🇦🇪🇺
Lol
Vladyslav 🇺🇦🇪🇺
Thanks!
Milan
👍
Mirco
Oh right I forgot about f-string
Django Bot
>> Links - Using Database Views in Django ORM | Rescale
Arion
It's called f-string literal format. It's only works on python 3.x+
Actually f-strings are only available in python 3.6 and above
Milan
Byes
Vitaly
Hey. I’m rolling out a new feature having a new endpoint. I want to monitor its usage. One thing I can do is to add analytics tracking event eg. by sending an event to Mixpanel. However, isn’t there any django module that can capture things like endpoint calls with arguments and show them on a dashboard? So that I don’t need to forward every call to Mixpanel. Maybe enabled by a decorator, yeah
Vitaly
Maybe I should switch to DRF, and it has sort of call tracking?
Maz
"The best functions are those with no parameters." How true is this with regards to Python?
Django Bot
>> Links - #28078 (Can't use field as part of expression when annotate key shadows mod - #28072 (Allow QuerySet.annotate() to use the name of an exisiting field) – - #28621 (Crash in QuerySet.annotate() with OuterRef) – Django - Query Expressions | Django documentation | Django - Django 1.11 Annotating a Subquery Aggregate - Stack Overflow - Django - Displaying a user list takes over 14 seconds, how to speed it up? - All you need to know about prefetching in Django – Hacker Noon - Bullet Proofing Django Models – Haki Benita – Medium
Anonymous
Hey any one help me to create user registration form
Anonymous
I get error model form class not specified
Maz
Maybe you could post the code in dpaste.de so guys can help you.
Jimmies San
or maybe can wait harry potter.
Jimmies San
english only please
Сергей
I have a error OSError: cannot identify image file <InMemoryUploadedFile: IMG_6025.JPG (image/jpeg)>, during uploading image, I use PiL, but only from some device arise the error, what's the matter?
Jimmies San
I have a error OSError: cannot identify image file <InMemoryUploadedFile: IMG_6025.JPG (image/jpeg)>, during uploading image, I use PiL, but only from some device arise the error, what's the matter?
try to share code and complete stack trace with errors using some service like dpaste. or maybe can try "google: i feel lucky" -> i got this https://github.com/python-pillow/Pillow/issues/3287
Jimmies San
it's a short code that not woring http://dpaste.com/152VP92
i think you need to save the img somewhere, and then process it with pil.Image
Jimmies San
and btw you do open(file) but file not exists
Сергей
but why on some device it's work and other not work?
Jimmies San
but why on some device it's work and other not work?
you paste a short piece of your code, not entirely. we can't say nothing if you don't show the code.
Jimmies San
the code you paste is a piece, and incorrect. never works.
Сергей
it's like short example, I use it in django model like `image = ProcessedImageField(upload_to=upload_auto, blank=True, null=True, verbose_name='Фото (несколько)', spec=OriginalSpec, autoconvert=None)`
Сергей
and error arises during save model
Jimmies San
it's like short example, I use it in django model like `image = ProcessedImageField(upload_to=upload_auto, blank=True, null=True, verbose_name='Фото (несколько)', spec=OriginalSpec, autoconvert=None)`
and you suppose i know what is "upload_auto" what this original spec if you are using a correct path [with right permission] if the uwsgi/webserver don't do nothing bad if if if :)
Jimmies San
sorry i can't help you. maybe someone else.