Dasturiy injiniring va raqamli iqtisodiyot




Download 2,25 Mb.
bet8/13
Sana30.12.2023
Hajmi2,25 Mb.
#129150
1   ...   5   6   7   8   9   10   11   12   13
Bog'liq
Individual Loyiha 2

rasm. Bosh sahifa .

Bu oynamizda saytimiz haqida malumotlarga ega bo’lamiz
1.2 rasm Clublar sahifasi
Bu oynada clublar haqida malumotlarga ega bo’lamiz


1.3 rasm. Clubga oid futbolchilar sahifasi
Bu qismda biz o’zimiz qiziqqan clublar va ular tarkibida bor futbolchilar va ularning transfer narxlari haqida bilib olishimiz mumkin

1.4 rasm. Transferlar sahifasi
Bu oynada biz so’nggi qilingan transferlar haqida malumotga ega bo’lamiz bunda bizga transfer narxi bo’yicha bizga eng qimmat transferni chiqarib beradi

1.5 rasm. Davlatga oid clublar sahifalar
Bu oynada biz davlatlarga tegishli clublarni ko’rishimiz mumkin bo’ladi.Bu yerda ham clubni ustiga bosib clubga tegishli futbolchilar haqida malumotga ega bo’lishimiz mumkin bo’ladi.

1.6 rasm.
Bu oynada biz transfer narxi bo’yicha futbolchilar jadvalini ko’rishimiz mumkin

1.7 rasm. Transfer archive sahifasi
Bu transfer archive bo’limda har seasonda bo’lgan trasferlar haqida malumotga ega bo’lamiz

1.8 rasm. Season sahifasi
Bu oynada bitta seasonni tanlasak shu seasonda amalga oshirilgan transferlar haqida malumotga ega bo’lamiz





3.2 Web saytning beckend qismini yaratish.


Model.py kodlari .
from django.db import models

class Club(models.Model):


nom = models.CharField(max_length=100)
davlat = models.CharField(max_length=100)
logo = models.FileField()
president = models.CharField(max_length=100)
coach = models.CharField(max_length=80)
yili = models.CharField(max_length=30)
eng_qim_tr = models.CharField(max_length=50)
eng_qim_sotuv = models.CharField(max_length=50)

def __str__(self):


return self.nom

class Player(models.Model):


pozit = [
('Midfielder', 'Midfielder'),
('Defender', 'Defender'),
('Forward', 'Forward'),
('Keeper', 'Keeper')

]
ism = models.CharField(max_length=50)


t_yil = models.DateField()
club = models.ForeignKey(Club, on_delete=models.CASCADE, related_name='futbolchilari')
tr_narxi = models.PositiveIntegerField()
millat = models.CharField(max_length=50)
pozitsiya = models.CharField(max_length=50, choices=pozit)

def __str__(self):


return self.ism

class Transfer(models.Model):


player = models.ForeignKey(Player, on_delete=models.CASCADE)
eski = models.ForeignKey(Club, on_delete=models.CASCADE, related_name='sotuvlari')
yangi = models.ForeignKey(Club, on_delete=models.CASCADE, related_name='sotib_olganlari')
narxi = models.PositiveIntegerField()
tax_narxi = models.PositiveIntegerField()
mavsum = models.CharField(max_length=40)

def __str__(self):


return f'{self.player}'

class Hozirgi_mavsum(models.Model):


hozirgi_mavsum = models.CharField(max_length=100)

def __str__(self):


return self.hozirgi_mavsum



Download 2,25 Mb.
1   ...   5   6   7   8   9   10   11   12   13




Download 2,25 Mb.

Bosh sahifa
Aloqalar

    Bosh sahifa



Dasturiy injiniring va raqamli iqtisodiyot

Download 2,25 Mb.