An amazing series, so far so good. Just so, remember to look at all edge cases especially in this CRUD section. test accordingly. His is to teach, ours is to learn. Thanks Cryce.
Hi Semy Colon, This series is amazing.! really enjoying and learning a lot.! while trying this section I am getting an error while using objects.create error: subquery must return only one column can you help.?
you have validate in amount filed (it cant be empty) , but if we mix number and text like '123text' in amount field then it throws error, how to validate the amount filed for this?
in the validation, you can use the isdecimal function and return an error when the amount contains a string characters before you save to db. you can about the example usage here www.w3schools.com/python/ref_string_isdecimal.asp
An amazing series, so far so good. Just so, remember to look at all edge cases especially in this CRUD section. test accordingly. His is to teach, ours is to learn. Thanks Cryce.
Great tutorials. I am going to finish the series!!!
Thanks for this amazing tutorial. Your contents are unique and very helpful...
Thank you so much! I failed to express my appreciation to you. If you have courses on Udemy or other websites, I will definitely purchase that!
Many thanks man, well done
U r amazing ❤️❤️. Thanx a lot!!
Hi Semy Colon, This series is amazing.! really enjoying and learning a lot.!
while trying this section I am getting an error while using objects.create
error: subquery must return only one column
can you help.?
ooh sorry, could you share with me your code on GitHub, or screenshot?
@@crycetruly Thank you for prompt reply. I will share the same on github.
@@crycetruly went through the code again and found the issue. Now, its sorted. Thank you.!
@@HenilMehta kudos!
Please do not use float when dealing with currency fields, you are going to get all sort of strange issues, use decimal instead.
please help i got this error when am trying to login with the new user account => DoesNotExist at /
UserPreferences matching query does not exist.
Have u got solution for this error? Because i m facing the same issue.
instead of using .get, try get_object_or_404
@@crycetruly it's not working... giving attribute error.
@@saniyamulla8509
def index(request):
categories = Category.objects.all()
expenses = Expense.objects.filter(owner=request.user)
paginator = Paginator(expenses, 5)
page_number = request.GET.get('page')
page_obj = Paginator.get_page(paginator, page_number)
try:
user_preference = UserPreference.objects.get(user=request.user)
currency = user_preference.currency
except UserPreference.DoesNotExist:
currency = None # Handle case where UserPreference does not exist
I've got this error " 'WSGIRequest' object has no attribute 'User' " . Does anybody here help me?
you have validate in amount filed (it cant be empty) , but if we mix number and text like '123text' in amount field then it throws error, how to validate the amount filed for this?
in the validation, you can use the isdecimal function and return an error when the amount contains a string characters before you save to db. you can about the example usage here www.w3schools.com/python/ref_string_isdecimal.asp
@@crycetruly why u didn't use form.py for creating add-expense?it would be might easier for creating and validating
Please make video of web push notifications 🙏
later bro
After finish this series, you could jump into generics, the repeat crud code eventually disappear