Git Product home page Git Product logo

rtcb-backend's Introduction

RedTurtle Calcio Balilla

Il Progetto si basa su:

  • python 3
  • django 2
  • GraphQL

Start working on the project

virtualenv .
. bin/activate
pip install -r requirements.txt

cd rtcbproj

cp rtcbproj/config/omissis.py.template rtcbproj/config/omissis.py

vi rtcbproj/config/omissis.py

Compilate la variabile SECRET_KEY con una stringa alfanumerica casuale molto lunga.

Proseguite con:

python manage.py makemigrations
python manage.py migrate
python manage.py runserver

DB

Attualmente non c'è bisogno di nessuna configurazione per il database. Il progetto è configurato per utilizzare un db sqlite3 (vedi i settings).

Modelli

User

Il modello custom dell'utente (presente in rtcb.authentication.models) è quello che rappresenta il nostro player.

Oltre ad avere uno username (e una password) ha anche altri due campi utili al nostro progetto: role e versatile.

role specifica il ruolo preferito dal giocatore (che può essere Striker o Defender) mentre versatile indica se il giocatore è disposto anche a giocare nel ruolo opposto al preferito. Questi valori verranno usati nella generazione automatica delle squadre.

Script - comandi da poter utilizzare

populate

Questo è uno script che popola il db con alcuni oggetti per testare l'applicativo.

python manage.py populate

blastdb

Questo script server per resettare il db dell'applicativo! Non usarlo se si hanno dei dati che non si vogliono perdere.

È scritto specificatamente per eliminare solo il db sqlite3 (quindi un altro database non verrebbe eliminato). Cancella anche tutti i file delle migrazioni dell'applicazione rtcb! Non è reversibile.

python manage.py blastdb

TODO

  • Team CRUD
  • Tournament CRUD
  • Match CRUD
  • Ritornare l'ID del database di un Utente
  • Generazione automatica delle squadre in base ai ruoli preferiti
  • Generazione automatica dei turni/round

License

This software is released under the Apache License 2.0. See the LICENSE file.

rtcb-backend's People

Contributors

arsenico13 avatar eikichi18 avatar cekk avatar luca-bellenghi avatar

Watchers

James Cloos avatar  avatar

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.