Skip to content
Snippets Groups Projects
Commit c0695cec authored by Chif Gergo's avatar Chif Gergo
Browse files

stats app letrehozva es 2 osztaly elkezdve: User, Kepzes_alkalom

parent db40f8a2
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,7 @@ INSTALLED_APPS = [
'django.contrib.staticfiles',
'django_extensions',
'rest_framework',
'stats'
]
MIDDLEWARE = [
......
from django.contrib import admin
from .models import User, Kepzes_alkalom
admin.site.register(User)
admin.site.register(Kepzes_alkalom)
# Register your models here.
from django.apps import AppConfig
class StatsConfig(AppConfig):
name = 'stats'
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-24 23:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('user_name', models.CharField(max_length=50)),
('year_of_kepzes', models.IntegerField()),
('megjegyzes', models.TextField()),
],
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-25 17:36
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stats', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Kepzes_alkalom',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('idopont', models.DateField()),
('letszam', models.IntegerField()),
],
),
migrations.RenameField(
model_name='user',
old_name='user_name',
new_name='felhaszbalo_nev',
),
migrations.RenameField(
model_name='user',
old_name='year_of_kepzes',
new_name='kepzes_eve',
),
migrations.RemoveField(
model_name='user',
name='megjegyzes',
),
migrations.AddField(
model_name='kepzes_alkalom',
name='resztvevok',
field=models.ManyToManyField(to='stats.User'),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-25 17:38
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('stats', '0002_auto_20170925_1936'),
]
operations = [
migrations.RenameField(
model_name='user',
old_name='felhaszbalo_nev',
new_name='felhasznalo_nev',
),
]
from django.db import models
# Create your models here.
class User(models.Model):
felhasznalo_nev = models.CharField(max_length=50)
kepzes_eve = models.IntegerField()
email_cim = models.EmailField()
profilkep = models.ImageField()
def __str__(self):
return self.felhasznalo_nev
class Kepzes_alkalom(models.Model):
idopont = models.DateField()
letszam = models.IntegerField()
resztvevok = models.ManyToManyField(User)
from django.test import TestCase
# Create your tests here.
from django.shortcuts import render
# Create your views here.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment