Skip to content

Commit

Permalink
add_accounts_app
Browse files Browse the repository at this point in the history
  • Loading branch information
jelee2555 committed Aug 3, 2023
1 parent 7a40b12 commit 54fc683
Show file tree
Hide file tree
Showing 17 changed files with 68 additions and 0 deletions.
Empty file added accounts/__init__.py
Empty file.
Binary file added accounts/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added accounts/__pycache__/admin.cpython-311.pyc
Binary file not shown.
Binary file added accounts/__pycache__/apps.cpython-311.pyc
Binary file not shown.
Binary file added accounts/__pycache__/models.cpython-311.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions accounts/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions accounts/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class AccountsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'accounts'
Empty file added accounts/migrations/__init__.py
Empty file.
Binary file not shown.
26 changes: 26 additions & 0 deletions accounts/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from django.db import models

# Create your models here.
class User(models.Model):
user_id = models.IntegerField(primary_key=True)
nickname = models.CharField(max_length=10, blank=True, null=True)
password = models.CharField(max_length=20, blank=True, null=True)
email = models.CharField(max_length=100, blank=True, null=True)

class Meta:
managed = False
db_table = 'user'
db_table_comment = '사용자 데이터'

class Userinfo(models.Model):
user = models.ForeignKey(User, models.DO_NOTHING, blank=True, null=True)
height = models.IntegerField(blank=True, null=True)
weight = models.FloatField(blank=True, null=True)
bmi = models.FloatField(blank=True, null=True)
info = models.CharField(max_length=100, blank=True, null=True)
accvisibility = models.IntegerField(db_column='accVisibility', blank=True, null=True) # Field name made lowercase.

class Meta:
managed = False
db_table = 'userinfo'
db_table_comment = '사용자 정보'
Empty file added accounts/serializers.py
Empty file.
3 changes: 3 additions & 0 deletions accounts/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions accounts/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
Binary file modified broccoli/__pycache__/settings.cpython-311.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions broccoli/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
'django.contrib.staticfiles',
'rest_framework',
'usebody.apps.UsebodyConfig',
'accounts.apps.AccountsConfig',
]

MIDDLEWARE = [
Expand Down
26 changes: 26 additions & 0 deletions usebody/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.2.3 on 2023-08-03 05:58

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Usebody',
fields=[
('usebody_id', models.IntegerField(primary_key=True, serialize=False)),
('usebody_name', models.CharField(blank=True, max_length=10, null=True)),
],
options={
'db_table': 'usebody',
'db_table_comment': '부위 데이터',
'managed': False,
},
),
]
Binary file not shown.

0 comments on commit 54fc683

Please sign in to comment.