No problem! Thanks so much for your help, I've been struggling with this for longer than I'd like to say and havent been able to find any help.
Since I'm using a lot of mixins that I'd like to use with this view I'll work my way through the CBV-based tutorial up until the spot where I'm having the trouble, and then start a new github repo for this and give you access here soon Thanks again! On Wed, Jun 20, 2018 at 10:28 AM, C. Kirby <mist...@gmail.com> wrote: > Ok, great. I am more versed with FBVs than CBVs, but if you are doing a > one form trial run I can figure it out. > > It sounds like you are correctly rendering javascript to the client when > they do a GET for the form, but when they do a POST (either correct or with > validation errors) you are returning an HttpResponse, which will redirect > to a new page. (It could be something different, but that is my first > guess) . > It would be easiest to debug with you if I could see the code, could you > share it here, or even better on a public code repository (github, gitlab, > bitbucket, etc). If you can share the code I am happy to work with you on > either tutorial. > > I'm sorry, I don't have any tutorials to point to - I've been doing this > for a long time and just pieced it together from the underlying components. > > Kirby > > > > On Tuesday, June 19, 2018 at 5:13:19 PM UTC-4, Alexander Joseph wrote: >> >> Thanks very much! >> >> I've followed a few tutorials and had mixed results - >> >> This tutorial I got the closest with >> https://simpleisbetterthancomplex.com/tutorial/2016/11/15/ >> how-to-implement-a-crud-using-ajax-and-json.html >> >> I got to the point where it says " The data was invalid. No hard refresh >> no anything. Just this tiny part changed with the validation. This is what >> happened:" >> >> I was able to get the form to load in the modal via ajax and the form >> information submitted and the database updated with the new record, however >> upon submission it would just show the ajax in a blank page rather than >> just close the modal and show the updated table with the information. Also >> when you submit the form and its invalid it will show the blank page with >> ajax code rather than the validation errors in the modal. I'd much rather >> be using CBVs though and this tutorial was for FBVs. Being such a noob it >> would be another project altogether to turn the FBVs into CBVs and still >> get it to work. >> >> I've tried other tutorials like this one >> https://www.abidibo.net/blog/2015/11/18/modal-django-forms-bootstrap-4/ >> >> I liked this one best because it uses CBVs and Bootstrap4, but I could >> never even get the form to load in the modal. I checked the Javascript >> Console and everything seemed to be fine - no missing files or errors >> related to the modal or functioning of the modal so I'm not sure where the >> problem was but this is my main problem right now - getting the form to >> even show in the modal to begin with. It seems like most of these tutorials >> use jquery/ajax to load the html form file in the modal content, is that >> the way you did it as well? >> >> Is there a tutorial or reference you used to get it working for you? >> If it would be easiest I can go through this tutorial again >> https://www.abidibo.net/blog/2015/11/18/modal-django-forms-bootstrap-4/ >> and give you any errors I get, if that tutorial looks like it will work >> to you. In the comments it seems like theres a lot of people that had the >> same issue I was running into with that one though. >> >> Thanks again for your help! >> >> >> >> On Tue, Jun 19, 2018 at 2:26 PM, C. Kirby <mis...@gmail.com> wrote: >> >>> What do you seem to be having trouble with? >>> >>> -Showing the form in a modal? >>> -Dynamically loading a form based on how the modal is launched? >>> -Using the modal to handle ajax loaded/submitted forms? >>> -Generally building abootstrap4 modal? >>> >>> I have done this and am happy to help, just give me some direction in >>> helping you >>> >>> On Tuesday, June 19, 2018 at 3:08:59 PM UTC-4, Alexander Joseph wrote: >>>> >>>> I've posted this before but havent gotten any response. If more >>>> information is needed let me know and I'll get you anything I can. >>>> >>>> I basically want to use forms in Bootstrap 4 modals for my CRUD >>>> operations but cant really find a good tutorial or references to work from. >>>> I'm newer to Django still. I'm sure this is a common question/application >>>> so theres got to be some material out there that can help a novice like me. >>>> Has anyone had some success with implementing this? I'm using CBVs so >>>> something that works with CBVs would be ideal. Any help, advice, or >>>> suggestions would be much appreciated >>>> >>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "Django users" group. >>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>> pic/django-users/CPspzgE33Dk/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> django-users...@googlegroups.com. >>> To post to this group, send email to django...@googlegroups.com. >>> Visit this group at https://groups.google.com/group/django-users. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/django-users/ac24306b-96d0-4eaa-ba23-3fedfa0a48ae%40googlegroups.com >>> <https://groups.google.com/d/msgid/django-users/ac24306b-96d0-4eaa-ba23-3fedfa0a48ae%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Best Regards, >> >> Alexander Joseph >> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "Django users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/django-users/CPspzgE33Dk/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/9a50c857-0e5b-4aac-8dfe-1ad79cbfef50%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/9a50c857-0e5b-4aac-8dfe-1ad79cbfef50%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Best Regards, Alexander Joseph -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGJrYjaixh3JMYNKYD7FiAXyswu2SXvBzGzNKqE4GGrmAnLU1Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.