-
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.
Merge pull request #77 from PenseNisso/feature/sugestao_empresa
Merge branch feature/sugestao_empresa on develop
- Loading branch information
Showing
11 changed files
with
211 additions
and
8 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,6 +1,7 @@ | ||
from django.contrib import admin | ||
|
||
from company.models import Company | ||
from company.models import Company, CompanySuggestionModel | ||
|
||
# Register your models here. | ||
admin.site.register(Company) | ||
admin.site.register(CompanySuggestionModel) |
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,16 @@ | ||
from django import forms | ||
|
||
|
||
class CompanySuggestion(forms.Form): | ||
name = forms.CharField(max_length=100, label="Nome da Empresa:", required=True) | ||
field_of_operation = forms.CharField( | ||
max_length=50, label="Área de Atuação:", required=True | ||
) | ||
link = forms.URLField(max_length=30, required=False) | ||
|
||
description = forms.CharField( | ||
max_length=400, | ||
widget=forms.Textarea(), | ||
label="Descrição sobre a empresa e sua área de atuação:", | ||
required=False, | ||
) |
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,28 @@ | ||
# Generated by Django 4.2.5 on 2023-12-12 15:11 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('company', '0002_alter_company_options'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='CompanySuggestionModel', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=100)), | ||
('field_of_operation', models.CharField(max_length=50)), | ||
('link', models.URLField(max_length=30, null=True)), | ||
('description', models.TextField(max_length=400, null=True)), | ||
('created_at', models.DateTimeField(auto_now_add=True)), | ||
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='suggestions_sent', to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
14 changes: 14 additions & 0 deletions
14
company/migrations/0004_merge_0003_companysuggestionmodel_0003_rate.py
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,14 @@ | ||
# Generated by Django 4.2.5 on 2023-12-12 18:54 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('company', '0003_companysuggestionmodel'), | ||
('company', '0003_rate'), | ||
] | ||
|
||
operations = [ | ||
] |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% extends "global/base.html" %} {% block title %} - Sugerir Empresa {% endblock %} | ||
{% block content %} | ||
|
||
<div class="flex flex-column justify-center items-center bg-blue-600 text-white w-full h-10 text-center my-6"> | ||
<h1 class="text-2xl font-bold">Sugerir uma empresa</h1> | ||
</div> | ||
|
||
<div> | ||
<form action="/empresas/suggest" method="post"> | ||
{% csrf_token %} | ||
{{ form }} | ||
<input type="submit" value="Enviar"> | ||
</form> | ||
</div> | ||
|
||
{% endblock content %} |
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,11 @@ | ||
{% extends "global/base.html" %} {% block title %} - Sugestão Enviada {% endblock %} | ||
{% block content %} | ||
|
||
<div class="flex flex-column justify-center items-center bg-blue-600 text-white w-full h-10 text-center my-6"> | ||
<h1 class="text-2xl font-bold">Sugestão enviada!</h1> | ||
</div> | ||
<div> | ||
Agradeçemos enormemente a sua colaboração! Se tudo estiver certo, você poderá ver sua sugestão no explorador de empresas dentro dos próximos dias! | ||
</div> | ||
|
||
{% endblock content %} |
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