here you teach us protect duplicate category enter . but in a stock multiple item in a same category. i think you need different category table and item table . when a item insert that time select from drom down category . i am sure item table need under e category multiple. ex: cat computer -> item dell ,qty:50 ; cat computer ->item accer,qty:10 how can be store in this situation . please solve this. aftter listing join 2 tables catagory and item
I am unable to get the form validation to work like in video 17. I am able to set the model blank = false and this works fine. But when I implement the custom validation the code seems to work fine, the server starts fine but the validation never triggers. Everything gets saved to the database, blank or duplicates, does not matter. I have looked at Django docs, I have searched stackoverflow and nothing seems to fix the issue. I am unsure what is happening. I have followed your tutorial exactly
@@Arbadjie I have posted there, and thank you so much for looking.. here is the post: arbcoms.com/community/computer-inventory/stock-management-video-17-form-validation/#post-89
@@Arbadjie I think this is what is happening to me, I have the code added like your tutorial says and the server runs fine. However I get no validation errors, the item gets added to the list. What do I need to do to prevent the form from being overwritten?
This is normal and common when copying and pasting codes. You gonna select few lines of codes where the error is pointing. You will see some lines of code will have periods like this >..... before the code while some will have dashes like this > ----- before the code. You will need to have periods of dashes on codes that should have the same indentation. You can choose.... Or ---- Anyone should work.
I spend weeks trying to study this but after stumbling over this video, i was able to understand and implement it within minutes. Thank so much Sir.
Glad to hear that.
why we are not using "unique=True" on category type (models file).
This is great. Never knew about that. Thanks for sharing
Because it will be by default for both add_items/ and list_item/ and we need this uniqueness in list_item/ only. But thanks for this suggestion.
here you teach us protect duplicate category enter . but in a stock multiple item in a same category. i think you need different category table and item table . when a item insert that time select from drom down category . i am sure item table need under e category multiple. ex: cat computer -> item dell ,qty:50 ; cat computer ->item accer,qty:10 how can be store in this situation . please solve this. aftter listing join 2 tables catagory and item
create a model for catgory , then put category as ForeignKey field in item model
AttributeError at /add_items/
type object 'stock' has no attribute 'object' what is solution friend
I am unable to get the form validation to work like in video 17. I am able to set the model blank = false and this works fine. But when I implement the custom validation the code seems to work fine, the server starts fine but the validation never triggers. Everything gets saved to the database, blank or duplicates, does not matter. I have looked at Django docs, I have searched stackoverflow and nothing seems to fix the issue. I am unsure what is happening. I have followed your tutorial exactly
Send your codes to arbcoms.com/community let me look at it
@@Arbadjie I have posted there, and thank you so much for looking.. here is the post: arbcoms.com/community/computer-inventory/stock-management-video-17-form-validation/#post-89
I just brushed through your code and it seems ok. I will check it again and get back to you.
Tried according to the video but this is not working for the list_items and not for working add_items
Check if it is not overwritten when creating the form in forms.py
@@Arbadjie Got it. Thank you
@@Arbadjie I think this is what is happening to me, I have the code added like your tutorial says and the server runs fine. However I get no validation errors, the item gets added to the list. What do I need to do to prevent the form from being overwritten?
hey arbadjie i kept getting indentation error how do i easily fix this?
This is normal and common when copying and pasting codes.
You gonna select few lines of codes where the error is pointing.
You will see some lines of code will have periods like this >..... before the code while some will have dashes like this > ----- before the code.
You will need to have periods of dashes on codes that should have the same indentation.
You can choose.... Or ----
Anyone should work.