These are chat archives for django/django

26th
Feb 2017
jundymek
@jundymek
Feb 26 2017 00:12 UTC
By the way - is Django good choice for web directory in your opinion?
for building web directory of course
@NLStom
Hi, guys
I wonder if we absolutely need to put the css and Js file in the static folder
Can we put html, css and Js file in side the one file ?
John
@flyboy1565
Feb 26 2017 02:32 UTC
Yes it can be done that way..
Kaushal Kumar
@kaushal087
Feb 26 2017 12:50 UTC
I am overriding get_scope() method of python social auth authentication.
from social.backends.facebook import FacebookOAuth2

class CustomFacebookOAuth2(FacebookOAuth2):
    def get_scope(self):
        scope = super(CustomFacebookOAuth2, self).get_scope()
        #if self.data.get('extrascope'):
        scope += [('email')]
        return scope
in settings.py
AUTHENTICATION_BACKENDS = (
   # 'social.backends.facebook.FacebookOAuth2',
   'custom_backend.CustomFacebookOauth2.CustomFacebookOAuth2'
   'django.contrib.auth.backends.ModelBackend',
)
Its is giving me error
ImportError at /login/facebook/
No module named CustomFacebookOAuth2django.contrib.auth.backends
Please help
John
@flyboy1565
Feb 26 2017 15:16 UTC
Dude @kaushal087 it's kind of annoying having to read you help posts here and in Django Girls Tutorial..
Kaushal Kumar
@kaushal087
Feb 26 2017 15:20 UTC
@flyboy1565 Sorry, I was not getting any response so I posted at both the places.
Brett MacDonald
@ArtistsTechGuy
Feb 26 2017 15:26 UTC
@kaushal087 you forgot a comma to seperate the backends in settings.py
Kaushal Kumar
@kaushal087
Feb 26 2017 15:29 UTC
@ArtistsTechGuy thank you. This is so embarrassing. Because of one missing comma I was stuck for 4 hours.
Brett MacDonald
@ArtistsTechGuy
Feb 26 2017 15:31 UTC
np, I was testing an email form the other day and when I went live with it it stoped working...turns out I forgot I changed the email to what it was supposed to be for live and forgot I wouldn't get it if i sent a test
-_-
Kaushal Kumar
@kaushal087
Feb 26 2017 15:37 UTC
This kind of things happens :laughing: