-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
1,802 additions
and
776 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
name: Docker Image CI | ||
# name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
# on: | ||
# push: | ||
# branches: [main] | ||
# pull_request: | ||
# branches: [main] | ||
|
||
jobs: | ||
build-image: | ||
runs-on: ubuntu-latest | ||
# jobs: | ||
# build-image: | ||
# runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout to repository | ||
uses: actions/checkout@v2 | ||
# steps: | ||
# - name: Checkout to repository | ||
# uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
# - name: Set up Docker Buildx | ||
# uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: k1g99 | ||
password: ${{ secrets.CR_PAT }} | ||
# - name: Login to GitHub Container Registry | ||
# uses: docker/login-action@v2 | ||
# with: | ||
# registry: ghcr.io | ||
# username: k1g99 | ||
# password: ${{ secrets.CR_PAT }} | ||
|
||
- name: Build and push container image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ghcr.io/fgfnet/fnet:latest | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
# - name: Build and push container image | ||
# uses: docker/build-push-action@v4 | ||
# with: | ||
# context: . | ||
# file: ./Dockerfile | ||
# push: true | ||
# tags: ghcr.io/fgfnet/fnet:latest | ||
# cache-from: type=gha | ||
# cache-to: type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,4 +79,5 @@ media | |
*.py[cod] | ||
*$py.class | ||
|
||
.DS_Store | ||
.DS_Store | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
from django.urls import path | ||
|
||
from ..views.admin import FGAPI | ||
from ..views.admin import FGAPI, FGUploadAPI | ||
|
||
urlpatterns = [ | ||
path('fg/', FGAPI.as_view(), name="fg_admin_api"), | ||
path('fg/upload/', FGUploadAPI.as_view(), name="fg_upload_api") | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ | |
|
||
DEBUG = False | ||
|
||
SECRET_KEY = get_env("DJANGO_SECRET_KEY") | ||
|
||
ALLOWED_HOSTS = ["*"] | ||
|
||
DATA_DIR = "/data" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from django.contrib import admin | ||
|
||
from .models import Freshman | ||
# Register your models here. | ||
admin.site.register(Freshman) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.2.10 on 2023-02-15 19:04 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('lc', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Freshman', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=30)), | ||
('phone_number', models.CharField(max_length=13, null=True)), | ||
('register', models.BooleanField(default=False)), | ||
('department', models.CharField(choices=[('NC', '자연과학계열'), ('EN', '공학계열'), ('SS', '사회과학계열'), ('HS', '인문과학계열')], max_length=10)), | ||
('lc', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='lc.lc')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,28 @@ | ||
from django.db import models | ||
from django.db.models.deletion import CASCADE | ||
from django.db.models.fields import CharField, BooleanField | ||
from django.db.models.fields.related import ForeignKey | ||
from lc.models import LC | ||
|
||
# Create your models here. | ||
class Freshman(models.Model): | ||
NATURAL_SCIENCE = 'NC' | ||
ENGINEERING = 'EN' | ||
SOCIAL_SCIENCE = 'SS' | ||
HUMANITIES_SCIENCE = 'HS' | ||
|
||
DEPARTMENT_CHOICES = [ | ||
(NATURAL_SCIENCE, '자연과학계열'), | ||
(ENGINEERING, '공학계열'), | ||
(SOCIAL_SCIENCE, '사회과학계열'), | ||
(HUMANITIES_SCIENCE, '인문과학계열'), | ||
] | ||
|
||
lc = ForeignKey(LC, on_delete=CASCADE, null=True) | ||
name = CharField(max_length=30) | ||
phone_number = CharField(max_length=13, null=True) | ||
register = BooleanField(default=False) | ||
department = CharField(max_length=10, choices=DEPARTMENT_CHOICES) # n(자연과학),e(공학),s(사회과학),h(인문과학) | ||
|
||
def __str__(self): | ||
return self.name |
Oops, something went wrong.