├── core ├── __init__.py ├── migrations │ ├── __init__.py │ └── 0001_initial.py ├── templatetags │ ├── __init__.py │ └── format_duration.py ├── templates │ ├── index.html │ ├── base_login.html │ ├── includes │ │ └── messages.html │ ├── tarefa.html │ ├── projetos.html │ ├── funcionarios.html │ ├── base.html │ └── tarefas.html ├── apps.py ├── forms.py ├── admin.py ├── static │ └── css │ │ └── estilo.css ├── urls.py ├── views.py ├── models.py └── tests │ └── test_insercoes.py ├── accounts ├── __init__.py ├── migrations │ └── __init__.py ├── tests │ ├── __init__.py │ └── test_login.py ├── models.py ├── admin.py ├── apps.py ├── urls.py ├── forms.py ├── templates │ └── accounts │ │ ├── register.html │ │ └── login.html └── views.py ├── projectmanager ├── __init__.py ├── wsgi.py ├── urls.py └── settings.py ├── requirements.txt ├── Documentação ├── Diagrama.png ├── Diagrama.png.bak ├── Diagrama de Classes.asta └── README.md ├── .gitignore ├── Pipfile ├── contrib └── env_gen.py ├── how_to.md ├── manage.py └── README.md /core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /accounts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /projectmanager/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /accounts/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /accounts/tests/__init__.py: -------------------------------------------------------------------------------- 1 | from .test_login import LoginTestCase -------------------------------------------------------------------------------- /accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | dj-database-url 2 | django-widget-tweaks 3 | django 4 | python-decouple 5 | pytz -------------------------------------------------------------------------------- /Documentação/Diagrama.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Marlysson/Project-Manager/HEAD/Documentação/Diagrama.png -------------------------------------------------------------------------------- /core/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html'%} 2 | 3 | {% block content %} 4 | 5 | 6 | {% endblock %} -------------------------------------------------------------------------------- /Documentação/Diagrama.png.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Marlysson/Project-Manager/HEAD/Documentação/Diagrama.png.bak -------------------------------------------------------------------------------- /core/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CoreConfig(AppConfig): 5 | name = 'core' 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | */__pycache__ 2 | */*/__pycache__ 3 | *.sqlite3 4 | .env 5 | .venv 6 | .vscode/* 7 | *.pyc 8 | Pipfile.lock -------------------------------------------------------------------------------- /accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | name = 'accounts' 6 | -------------------------------------------------------------------------------- /Documentação/Diagrama de Classes.asta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Marlysson/Project-Manager/HEAD/Documentação/Diagrama de Classes.asta -------------------------------------------------------------------------------- /core/forms.py: -------------------------------------------------------------------------------- 1 | from django.forms import ModelForm 2 | from .models import Funcionario 3 | 4 | 5 | class FuncionarioForm(ModelForm): 6 | 7 | class Meta: 8 | model = Funcionario 9 | fields = ["nome", "idade", "salario", "cargo"] 10 | -------------------------------------------------------------------------------- /core/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import * 3 | 4 | 5 | admin.site.register(Projeto) 6 | admin.site.register(Funcionario) 7 | admin.site.register(Equipe) 8 | admin.site.register(Tarefa) 9 | admin.site.register(Item) 10 | admin.site.register(Comentario) 11 | -------------------------------------------------------------------------------- /core/templatetags/format_duration.py: -------------------------------------------------------------------------------- 1 | from django import template 2 | 3 | register = template.Library() 4 | 5 | @register.filter 6 | def duration(td): 7 | segundos = int(td.total_seconds()) 8 | horas = segundos // 3600 9 | minutos = (segundos % 3600) // 60 10 | 11 | return '{}h:{}min:{}sec'.format(horas, minutos,segundos) -------------------------------------------------------------------------------- /Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | 3 | url = "https://pypi.python.org/simple" 4 | verify_ssl = true 5 | name = "pypi" 6 | 7 | 8 | [packages] 9 | 10 | dj-database-url = "*" 11 | django-widget-tweaks = "*" 12 | django = "*" 13 | python-decouple = "*" 14 | pytz = "*" 15 | 16 | 17 | [dev-packages] 18 | 19 | 20 | 21 | [requires] 22 | 23 | python_version = "3.6" 24 | -------------------------------------------------------------------------------- /accounts/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import RegisterView 3 | from django.contrib.auth import views as auth_views 4 | 5 | urlpatterns = [ 6 | path('register/', RegisterView.as_view(), name='register'), 7 | path('login/', auth_views.LoginView.as_view(template_name='accounts/login.html'), name='login'), 8 | path('logout/', auth_views.LogoutView.as_view(), name='logout'), 9 | 10 | ] 11 | -------------------------------------------------------------------------------- /projectmanager/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for projectmanager project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "projectmanager.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /accounts/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from django.contrib.auth.models import User 3 | 4 | class UserCreationForm(forms.ModelForm): 5 | ''' Cadastro de User ''' 6 | 7 | password = forms.CharField(widget=forms.PasswordInput) 8 | 9 | class Meta: 10 | model = User 11 | fields = ('username', 'first_name', 'email', 'password') 12 | 13 | 14 | class UserLoginForm(forms.ModelForm): 15 | ''' Cadastro de User ''' 16 | 17 | password = forms.CharField(widget=forms.PasswordInput) 18 | 19 | class Meta: 20 | model = User 21 | fields = ('username', 'password') 22 | -------------------------------------------------------------------------------- /accounts/templates/accounts/register.html: -------------------------------------------------------------------------------- 1 | {% extends 'base_login.html' %} 2 | {% load widget_tweaks %} 3 | 4 | {% block content %} 5 |
{{ tarefa.descricao }}
9 | 10 | 11 | 12 | 24 | 25 | Duração: {{ tarefa.duracao_total|duration }} 26 |Ainda não há projetos. Aproveite para criar um.
22 | 23 | {% endfor %} 24 | 25 | 26 | 27 | 28 || Nome | 11 |Idade | 12 |Cargo | 13 |Salário | 14 |
| {{ funcionario.nome }} | 19 |{{ funcionario.idade }} | 20 |{{ funcionario.cargo }} | 21 |{{ funcionario.salario }} | 22 |
Não há funcionarios ainda.
30 | 31 | {% endif %} 32 | 33 | 34 | 35 | 36 |