Relative Content

Tag Archive for pythondjangodjango-views

How do I GET and POST from different urls to the same class based view in my django project?

I am working on this coursework where I need to create a Django back-end with API routes and templated routes. Within the descriptor, I was given the routes which the project needs to follow. I made a class based view which successfully creates albums. However, the issue which I see is that my implementation GET and POST to /albums/new. Where the descriptor, says I have to GET from /albums/new and POST to /albums to create a new album. I’ve looked everywhere online to figure out how to implement this and haven’t found anything. The lecturer then gave us a tip: The POST of /albums/new/ could be mapped to POST /albums/ using the Django URL dispatcher, where it calls the same class or method for POST. But still had no luck finding anything.

How do I GET and POST from different urls to the same class based view in my django project?

I am working on this coursework where I need to create a Django back-end with API routes and templated routes. Within the descriptor, I was given the routes which the project needs to follow. I made a class based view which successfully creates albums. However, the issue which I see is that my implementation GET and POST to /albums/new. Where the descriptor, says I have to GET from /albums/new and POST to /albums to create a new album. I’ve looked everywhere online to figure out how to implement this and haven’t found anything. The lecturer then gave us a tip: The POST of /albums/new/ could be mapped to POST /albums/ using the Django URL dispatcher, where it calls the same class or method for POST. But still had no luck finding anything.

How do I GET and POST from different urls to the same class based view in my django project?

I am working on this coursework where I need to create a Django back-end with API routes and templated routes. Within the descriptor, I was given the routes which the project needs to follow. I made a class based view which successfully creates albums. However, the issue which I see is that my implementation GET and POST to /albums/new. Where the descriptor, says I have to GET from /albums/new and POST to /albums to create a new album. I’ve looked everywhere online to figure out how to implement this and haven’t found anything. The lecturer then gave us a tip: The POST of /albums/new/ could be mapped to POST /albums/ using the Django URL dispatcher, where it calls the same class or method for POST. But still had no luck finding anything.

How do I GET and POST from different urls to the same class based view in my django project?

I am working on this coursework where I need to create a Django back-end with API routes and templated routes. Within the descriptor, I was given the routes which the project needs to follow. I made a class based view which successfully creates albums. However, the issue which I see is that my implementation GET and POST to /albums/new. Where the descriptor, says I have to GET from /albums/new and POST to /albums to create a new album. I’ve looked everywhere online to figure out how to implement this and haven’t found anything. The lecturer then gave us a tip: The POST of /albums/new/ could be mapped to POST /albums/ using the Django URL dispatcher, where it calls the same class or method for POST. But still had no luck finding anything.

How do I GET and POST from different urls to the same class based view in my django project?

I am working on this coursework where I need to create a Django back-end with API routes and templated routes. Within the descriptor, I was given the routes which the project needs to follow. I made a class based view which successfully creates albums. However, the issue which I see is that my implementation GET and POST to /albums/new. Where the descriptor, says I have to GET from /albums/new and POST to /albums to create a new album. I’ve looked everywhere online to figure out how to implement this and haven’t found anything. The lecturer then gave us a tip: The POST of /albums/new/ could be mapped to POST /albums/ using the Django URL dispatcher, where it calls the same class or method for POST. But still had no luck finding anything.