I'm working on a Django Twilio app, and I believe it's coming along well. I just want to improve my code writing skills. How can I improve the below code?
def save_number(request): from_number = request.POST.get('From', '') try: obj = SaveNumber.objects.get(phone_number=from_number) if obj == obj: subscribe = request.POST.get('Body', ) if subscribe.lower().strip() == "stellar": enter = SaveNumber.objects.get(phone_number=from_number) enter.subscribed = True enter.save() r = twiml.Response() r.message("You're in. Always text outtahere, and we'll remove you.") return r elif subscribe.lower().strip() == "outtahere": remove = SaveNumber.objects.get(phone_number=from_number) remove.subscribed = False remove.save() except SaveNumber.DoesNotExist: obj = SaveNumber(phone_number=from_number) obj.save() r1 = twiml.Response() r1.message("Reply with stellar and you're in! :-)") return r1