Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python django Create a Django Project and an application if you haven't created one in the first assignment. You may just continue on the project

Python django
image text in transcribed
Create a Django Project and an application if you haven't created one in the first assignment. You may just continue on the project you made in the first assignment. 1) 2) (5 points) Create an admin user with username admin and a password 1 sehir 1 3) MODELS (10): You need to create three classes with CASCADING relationship. An example would be: Music Genre > Album> Song. Where each album belongs to a music genre and each song belongs to an Album Each of those objects when printed or shown in the database should be shown in the following form "id -title" where title (or name) is a charfield you have to specify in the class of that object. You may print them in any way you want as long the string representation of the object starts with id-title (e.g. -AlbumName> Artist). You should have a booleanfield in each table which you will use in step 6 (Forms). VIEWS (30): You are going to create a template for viewing all items in a given list. So since you have created three tables in step 3, you have to specify three url patterns for them. Each url pattern should be capplication name>/table name>. For example, if the url pattern is "music/albums" then the view function should give a context to the template which in turn lists all the albums in the application called "music Moreover, you have to have functions that capture the items ids too. For example, if the url is music/albums/1, that should take the user to the details page of the album with id 1. Again, you have to use templates and contexts. If you do not use templates, you are not going to get the grade, and actually you are not going to be able to effectively do the next steps otherwise To recab, here is an example for the urls: 4) 5) URLs (30): This is just an example, namings could be different, but patterns should be the same. music/genres >ists all genres in your database music/albumslists all albums in your database music/songs lists all songs in your databse music/genres/pop>show the details of that genre (if any) and list all albums of "pop music/albums/avaz >>show details of that album and list all songs in the album called "avaz 6) FORMs (25): You should create a form that has a radio-button next to each item in the list of items you show in the previous sections (e-g. list of albums, list of songs ...etc). If the user selects one item, there should be a "submit" button also to tweak the BooleanField of that selected item. For example, in class we had is favorite, so the user could make a 'song favorite or not-favorite using the radio-button and the submission button. Bonus: You could view the list of items in your template and assign to them 'href attribute that takes the user to the details page of that item. For example, if the user is in music/genres page and there are genres [pop, jazz, rock], so the user should be able to click on "pop" for example, and goes to music/genres/pop where all albums are listed. And so on. If all of your items in all pageseclickable you get extra 10 points

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

What are the major forms of direct response advertising?

Answered: 1 week ago