Version initiale de test
This commit is contained in:
0
collection/games/__init__.py
Normal file
0
collection/games/__init__.py
Normal file
5
collection/games/admin.py
Normal file
5
collection/games/admin.py
Normal file
@ -0,0 +1,5 @@
|
||||
from django.contrib import admin
|
||||
from games.models import Console
|
||||
|
||||
|
||||
admin.site.register(Console)
|
5
collection/games/apps.py
Normal file
5
collection/games/apps.py
Normal file
@ -0,0 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class GamesConfig(AppConfig):
|
||||
name = 'games'
|
23
collection/games/migrations/0001_initial.py
Normal file
23
collection/games/migrations/0001_initial.py
Normal file
@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11 on 2017-08-16 19:55
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Console',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=254)),
|
||||
],
|
||||
),
|
||||
]
|
0
collection/games/migrations/__init__.py
Normal file
0
collection/games/migrations/__init__.py
Normal file
11
collection/games/models.py
Normal file
11
collection/games/models.py
Normal file
@ -0,0 +1,11 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Console(models.Model):
|
||||
"""
|
||||
All console, system or box that can be used to play video games.
|
||||
"""
|
||||
name = models.CharField(max_length=254)
|
||||
|
||||
def __str__(self):
|
||||
return '%s' % self.name
|
3
collection/games/tests.py
Normal file
3
collection/games/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
3
collection/games/views.py
Normal file
3
collection/games/views.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
Reference in New Issue
Block a user