def fight(request): player1 = Player.objects.get(pseudo='Aku_Guerrier') ennemy1 = Ennemy.objects.get(name='Sephiroth') players = [PlayerDto(player1)] # players = [PlayerDto(player1), PlayerDto(player1), PlayerDto(player1)] ennemies = [EnnemyDto(ennemy1)] # ennemies = [EnnemyDto(ennemy1), EnnemyDto(ennemy1), EnnemyDto(ennemy1)] context = {'pagetitle': 'Combat', 'players': players, 'ennemies': ennemies} return myRender(request, 'fight.html', context)
def show(request): context = { 'pagetitle': 'Show', 'classes': Classe.objects.all(), 'attacks': Attack.objects.all(), 'attacksbyclass': AttackByClasse.objects.all(), 'armorpieces': ArmorPiece.objects.all(), 'players': Player.objects.all(), 'playerarmors': PlayerArmor.objects.all(), 'ennemies': Ennemy.objects.all(), 'ennemyattacks': EnnemyAttack.objects.all() } return myRender(request, 'test.html', context)
def shop(request): context = {'pagetitle': 'Magasin'} return myRender(request, 'shop.html', context)
def player_view(request, player_pseudo): player = Player.objects.get(pseudo=player_pseudo) context = {'pagetitle': 'Joueur', 'player': PlayerDto(player)} return myRender(request, 'player.html', context)