Git Product home page Git Product logo

Comments (2)

iplitharas avatar iplitharas commented on May 22, 2024

Hello,
Yes there is a small bug with the class attribute query, I have already raised the issue for the future

from try-django.

DahliMusic avatar DahliMusic commented on May 22, 2024

UPDATE:
Was in fact able to resolve the method not allowed issue, but still seeing the same problem of my form not saving to the database. Solution was to add to CourseView a post method, which he has commented out in the code here and in the tutorial. I needed to tweak it a bit to get it to redirect correctly.

def post(self,request, id=1,*args, **kwargs):
context = {}
if id is not None:
obj = get_object_or_404(Course, id=id)
context['object'] = obj
return render(request,self.template_name,context)

I will keep on searching for ways to get this working better.

ORIGINAL POST:
So relieved that I am not alone. I'm having the same issue with Raw Update Class View. So far my only hint is that after trying to run the Raw Update Class my server reports:

"System check identified no issues (0 silenced).
December 02, 2020 - 05:59:10
Django version 3.1.4, using settings 'django3.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Method Not Allowed (POST): /course/2/
Method Not Allowed: /course/2/
[02/Dec/2020 05:59:13] "POST /course/2/ HTTP/1.1" 405 0
[02/Dec/2020 05:59:16] "GET /course/2/ HTTP/1.1" 200 1838"

This answer seems to indicate that means that there is a missing POST definition, but I am baffled as to where. My first impression was to maybe add some kind of POST definition to the CourseView, since that is where it redirects after save, but that was made using the base class view "Views" according to the Youtube tutorial so it should be fine as-is. I am uncertain, but I'm going to continue combing through the views and see if I can find an error on my end in comparison.

from try-django.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.