Created
April 24, 2019 20:54
-
-
Save PantherHawk/d77469be108d469a1f489e1429f0ba7e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserHome(UserPagesMixin, ListView): | |
... | |
def post(self, request, *args, **kwargs): | |
print('----------we are in post------------') | |
if 'eshel' in request.POST: | |
if 'yes_eshel' in request.POST: | |
print("YES ESHEL") | |
instance = Settings.objects.get(pk=self.request.user) | |
instance.eshel_member = True | |
instance.save() | |
if 'no_eshel' in request.POST: | |
print("NO ESHEL") | |
instance = Settings.objects.get(pk=self.request.user) | |
instance.eshel_member = False | |
instance.save() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment