Home > other >  What is the best way to build Django model?
What is the best way to build Django model?

Time:01-18

I want to make a website that gives a visualization of football game statistics. Functionality: The user checks a list of games. Selects game to see details. Can select a particular player. If there is no game he/she is interested in, the user uploads a datafile of the game and adds it to the main list of games.

I have a script that cleans data and gives me DataFrame with columns:

['Shots', 'SCA',  'Touches',  'Pass',  'Carries',  'Press',  'Tackled',  'Interceptions',  'Blocks']

if I do the Django model is it ok if I simply do model with these columns, or do I need to do a proper database with separate tables like: enter image description here

Is my UML is ok or do I need to fix something? here is link to my UML https://drawsql.app/xml-team/diagrams/football-game-stats

CodePudding user response:

You don't need to manually create tables and relations in your database, Django can take care of that for you.

It has been explained in detail here

CodePudding user response:

I suggest following these simple steps for building Django Model. I always did by following these steps.

Step 1 — Create Django Application. ... Step 2 — Add the Posts Model. ... Step 3 — Update Settings. ... Step 4 — Make Migrations. ... Step 5 — Verify Database Schema.

  •  Tags:  
  • Related