Esempio n. 1
0
    def update_settings(self, user_id, setts):

        user = UserLikees.objects.get(pk=user_id)
        self.delete_settings(user_id)

        for key, value in setts.items():
            sett = User_Settings(user=user, key=key, value=value)
            sett.save()
Esempio n. 2
0
    def update_settings(self, user_id, setts):

        user = UserLikees.objects.get(pk=user_id)
        self.delete_settings(user_id)

        for key,value in setts.items():
            sett = User_Settings(user=user, key=key, value=value)
            sett.save()
Esempio n. 3
0
 def init_settings(self, user):
     setting = User_Settings(user_id=user.id,
                             key='timezone',
                             value=settings.DEFAULT_USER_TIMEZONE)
     setting.save()
     setting = User_Settings(user_id=user.id,
                             key='events',
                             value=settings.DEFAULT_USER_PUBLISH_EVENTS)
     setting.save()
     setting = User_Settings(user_id=user.id,
                             key='language',
                             value=settings.DEFAULT_USER_LANGUAGE)
     setting.save()
     setting = User_Settings(user_id=user.id,
                             key='mail',
                             value=settings.DEFAULT_USER_NOTIFY_MAIL)
     setting.save()
     setting = User_Settings(user_id=user.id,
                             key='facebook_post_votes',
                             value=settings.DEFAULT_FACEBOOK_PUBLISH_VOTES)
     setting.save()
     setting = User_Settings(user_id=user.id,
                             key='facebook_post_faves',
                             value=settings.DEFAULT_FACEBOOK_PUBLISH_FAVES)
     setting.save()
Esempio n. 4
0
 def init_settings(self, user):
     setting = User_Settings(user_id=user.id, key='timezone',value=settings.DEFAULT_USER_TIMEZONE)
     setting.save()
     setting = User_Settings(user_id=user.id, key='events',value=settings.DEFAULT_USER_PUBLISH_EVENTS)
     setting.save()
     setting = User_Settings(user_id=user.id, key='language',value=settings.DEFAULT_USER_LANGUAGE)
     setting.save()
     setting = User_Settings(user_id=user.id, key='mail',value=settings.DEFAULT_USER_NOTIFY_MAIL)
     setting.save()
     setting = User_Settings(user_id=user.id, key='facebook_post_votes',value=settings.DEFAULT_FACEBOOK_PUBLISH_VOTES)
     setting.save()
     setting = User_Settings(user_id=user.id, key='facebook_post_faves',value=settings.DEFAULT_FACEBOOK_PUBLISH_FAVES)
     setting.save()