These are chat archives for django/django

22nd
Feb 2017
sky1048576
@sky1048576
Feb 22 2017 02:35
Hi everybody
Nobody is here
Miracle Ayodele
@iammiracle
Feb 22 2017 06:20
anyone online, i need a help on a project i am working on
Sopan
@sopanshewale
Feb 22 2017 07:18
hello
Shakya Mohanty
@ShakyaMohanty
Feb 22 2017 07:26
hi
Sopan
@sopanshewale
Feb 22 2017 07:28
Ask question - people respond. No one (except me) has time to respond to your hello :D
Mark Vail
@joules99
Feb 22 2017 07:28
the new ans improve web!!!!!
Sopan
@sopanshewale
Feb 22 2017 07:30
& right questions too
Mark Vail
@joules99
Feb 22 2017 07:32
and i have no answers to the questions......... noob :/
Kaushal Kumar
@kaushal087
Feb 22 2017 07:33
Hey Guys , I am creating a web page in which many links will be there like.
show friend list
show public profile
show comments
show likes
I am currently using python-social-auth==0.2.21 with Django==1.10.5
The authentication is working fine but there is no way I can request permission on runtime. I have to define permission in settings.py which will be constant.
Another method is to create my own backend http://python-social-auth-docs.readthedocs.io/en/latest/use_cases.html#multiple-scopes-per-provider
. My problem is I have to ask many types of different combination of permission. For which I will have to create many backend which doesn't seems correct method to me.
How can I pass scope in python social auth. I can get the permission from db for each link?
I want to fetch information from Facebook.
Kaushal Kumar
@kaushal087
Feb 22 2017 07:46
from social_core.backends.facebook import FacebookOAuth2


class CustomFacebookOAuth2(FacebookOauth2):
    def get_scope(self):
        scope = super(CustomFacebookOAuth2, self).get_scope()
        if self.data.get('extrascope'):
            scope = scope + [('foo', 'bar')]
        return scope
Kaushal Kumar
@kaushal087
Feb 22 2017 07:58
scope = scope + [('foo', 'bar')]
Can I first set session on click of button and then willthe seesion be accessible in my custom auth.
like
scope = scope + get_permission_from_session()
Miracle Ayodele
@iammiracle
Feb 22 2017 09:02
but all i get in return is the dashboard.html as a modal instead of the created modal form in the template
any help?
Asif Saif Uddin
@auvipy
Feb 22 2017 11:07
hello
anyone to help?
Miracle Ayodele
@iammiracle
Feb 22 2017 14:35
hello
cs89gr
@cs89gr
Feb 22 2017 19:42
hello what is the difference from imagefield and django-raster plugin ?
John
@flyboy1565
Feb 22 2017 20:12
@cs89gr , you'd have to look at the code.
cs89gr
@cs89gr
Feb 22 2017 20:17
@flyboy1565 i not have yet and for this i want to ask before create my app
John
@flyboy1565
Feb 22 2017 20:20
I would go to the given packages repo (GitHub) and look at it from there..
cs89gr
@cs89gr
Feb 22 2017 20:27
is general question