Skip to content

Commit

Permalink
api(core): move arquivos e pastas para o core
Browse files Browse the repository at this point in the history
- O nome da pasta api foi alterado para core
- Foi iniciado um app chamado api
  • Loading branch information
mateusvrs committed Sep 27, 2023
1 parent acbbba7 commit 361ec8d
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 127 deletions.
3 changes: 3 additions & 0 deletions api/api/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 api/api/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


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

# Create your models here.
124 changes: 0 additions & 124 deletions api/api/settings.py

This file was deleted.

3 changes: 3 additions & 0 deletions api/api/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 api/api/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.
Empty file added api/core/__init__.py
Empty file.
3 changes: 2 additions & 1 deletion api/api/asgi.py → api/core/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"""

import os
from decouple import config

from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', config('SETTINGS_FILE_PATH'))

application = get_asgi_application()
File renamed without changes.
3 changes: 2 additions & 1 deletion api/api/wsgi.py → api/core/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"""

import os
from decouple import config

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', config('SETTINGS_FILE_PATH'))

application = get_wsgi_application()
3 changes: 2 additions & 1 deletion api/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"""Django's command-line utility for administrative tasks."""
import os
import sys
from decouple import config


def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', config('SETTINGS_FILE_PATH'))
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
Expand Down

0 comments on commit 361ec8d

Please sign in to comment.