From b80c80abb0df45c95412457548fc99270a134bc5 Mon Sep 17 00:00:00 2001 From: "rfigsousa@gmail.com" Date: Tue, 16 Jan 2018 17:45:43 -0300 Subject: [PATCH] Primeiro commit app tarefas --- manage.py | 15 +++ projeto_simples/__init__.py | 0 .../__pycache__/__init__.cpython-36.pyc | Bin 0 -> 162 bytes .../__pycache__/settings.cpython-36.pyc | Bin 0 -> 2289 bytes projeto_simples/settings.py | 120 ++++++++++++++++++ projeto_simples/urls.py | 21 +++ projeto_simples/wsgi.py | 16 +++ tarefas/__init__.py | 0 tarefas/admin.py | 3 + tarefas/apps.py | 5 + tarefas/migrations/__init__.py | 0 tarefas/models.py | 3 + tarefas/tests.py | 3 + tarefas/views.py | 3 + 14 files changed, 189 insertions(+) create mode 100644 manage.py create mode 100644 projeto_simples/__init__.py create mode 100644 projeto_simples/__pycache__/__init__.cpython-36.pyc create mode 100644 projeto_simples/__pycache__/settings.cpython-36.pyc create mode 100644 projeto_simples/settings.py create mode 100644 projeto_simples/urls.py create mode 100644 projeto_simples/wsgi.py create mode 100644 tarefas/__init__.py create mode 100644 tarefas/admin.py create mode 100644 tarefas/apps.py create mode 100644 tarefas/migrations/__init__.py create mode 100644 tarefas/models.py create mode 100644 tarefas/tests.py create mode 100644 tarefas/views.py diff --git a/manage.py b/manage.py new file mode 100644 index 0000000..f0649f1 --- /dev/null +++ b/manage.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "projeto_simples.settings") + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) diff --git a/projeto_simples/__init__.py b/projeto_simples/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/projeto_simples/__pycache__/__init__.cpython-36.pyc b/projeto_simples/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ddf6d58b55f5be8d74036f52857552eb6212dbe4 GIT binary patch literal 162 zcmXr!<>eBIi;H3ag2x~N1{i@12OutH0TL+;!3>&=ek&P@K*9*(m%p=BOlWaxQE^Oh zQGR-AOk!?QW@=tZYH>_PYEgc6X?$v4SxiAuepYHpetdCeZb1%E3Y{MxpP83g5+AQu WP5H%cB`8A$7NKgF^eUW# zC0K?PI1d-#qFvU{!6khOF55W}U=^;wRk#M%ZGq z0&*}H=pUp(t`luUTf@zfJ%}E!Z4TePK3v=KqRpYTHhut)BgR8(!?l9Z4+KohH8<`I zx9)9e(dy(pco2^VbReabi!NuSAsRbxokV7*d5+ha^P<|w-(?$DO7j0&trop8-e{~|8^IAV01Yf7?ds039 z`GhG84x~CxuP8a3GyN%(i;1P1&qKyNR*hOI+vXgzhnN*=-nl&~-kjHuA320Wtv4gn zdV_qIetjO8F6oXFYO^`N)l5f8Vc@W+HbvtE+YFmZ8XyeuU`BhXk@lB1RWtokN`l|H zfp8Wk=LanMHVbmvMglSj?dZERSO(-RHV2RHO>K{fn$-0p$Vt7UM;YVeT7JY~rdt={ z^0r)msdO5;&}jD5xFYZF8tJOs-PM}ijv8ezBI%IXR5Hh7ta3vo&5>@+({EOg|y5|pu-qZgS2q%0bnj2-#`78 zls&np#7n(yS2Oy(R=wMK9xrN2d$%QPiW*+h>7qlYP@2P`q^r+aHp^e-j$Sd$*st z0#5B`e`V76D6ahM`Vczg={bzSdN>J%O7T`%C<+CkRLIXpNtmsY-%?SS>(y$hn2c%#{U@XJA8Bk0xBvhE literal 0 HcmV?d00001 diff --git a/projeto_simples/settings.py b/projeto_simples/settings.py new file mode 100644 index 0000000..4d5d628 --- /dev/null +++ b/projeto_simples/settings.py @@ -0,0 +1,120 @@ +""" +Django settings for projeto_simples project. + +Generated by 'django-admin startproject' using Django 2.0. + +For more information on this file, see +https://docs.djangoproject.com/en/2.0/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/2.0/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'z9h4jgbz8!4hv^w!9nz4hc!p0d8zstuc2mcrj5edacma2&h9+9' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'projeto_simples.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'projeto_simples.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/2.0/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/2.0/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/2.0/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/projeto_simples/urls.py b/projeto_simples/urls.py new file mode 100644 index 0000000..e05461b --- /dev/null +++ b/projeto_simples/urls.py @@ -0,0 +1,21 @@ +"""projeto_simples URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/2.0/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path + +urlpatterns = [ + path('admin/', admin.site.urls), +] diff --git a/projeto_simples/wsgi.py b/projeto_simples/wsgi.py new file mode 100644 index 0000000..e0cdb3b --- /dev/null +++ b/projeto_simples/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for projeto_simples project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "projeto_simples.settings") + +application = get_wsgi_application() diff --git a/tarefas/__init__.py b/tarefas/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tarefas/admin.py b/tarefas/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/tarefas/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/tarefas/apps.py b/tarefas/apps.py new file mode 100644 index 0000000..8e9ae3b --- /dev/null +++ b/tarefas/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class TarefasConfig(AppConfig): + name = 'tarefas' diff --git a/tarefas/migrations/__init__.py b/tarefas/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tarefas/models.py b/tarefas/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/tarefas/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/tarefas/tests.py b/tarefas/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/tarefas/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/tarefas/views.py b/tarefas/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/tarefas/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.