-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correção da Sprint 5, Health Check e Links do Git Pages
- Loading branch information
Showing
32 changed files
with
173 additions
and
50 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Empty file.
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,12 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. | ||
from django.contrib import admin | ||
from .models import GeracaoPdf | ||
|
||
|
||
class GeracaoPdfAdmin(admin.ModelAdmin): | ||
list_display = () | ||
|
||
|
||
admin.site.register(GeracaoPdf, GeracaoPdfAdmin) |
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,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class GeracaoPdfConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'models.geracaoPdf' |
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,23 @@ | ||
# Generated by Django 3.2.6 on 2021-09-13 23:11 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='GeracaoPdf', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('infosPdf', models.CharField(max_length=1000)), | ||
('cabecalhoPdf', models.CharField(max_length=100)), | ||
('textoEntradaPdf', models.TextField()), | ||
], | ||
), | ||
] |
25 changes: 25 additions & 0 deletions
25
backend/models/geracaoPdf/migrations/0002_auto_20210914_0138.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,25 @@ | ||
# Generated by Django 3.2.6 on 2021-09-14 04:38 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('geracaoPdf', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='geracaopdf', | ||
name='cabecalhoPdf', | ||
), | ||
migrations.RemoveField( | ||
model_name='geracaopdf', | ||
name='infosPdf', | ||
), | ||
migrations.RemoveField( | ||
model_name='geracaopdf', | ||
name='textoEntradaPdf', | ||
), | ||
] |
Empty file.
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,7 @@ | ||
from django.db import models | ||
|
||
|
||
class GeracaoPdf(models.Model): | ||
|
||
def _str_(self): | ||
return 'No fields' |
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,8 @@ | ||
from rest_framework import serializers | ||
from .models import GeracaoPdf | ||
|
||
|
||
class GeracaoPdfSerializer(serializers.ModelSerializer): | ||
class Meta: | ||
model = GeracaoPdf | ||
fields = () |
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,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
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,32 @@ | ||
from reportlab.pdfgen import canvas | ||
from rest_framework import viewsets | ||
from django.http import HttpResponse | ||
from .models import GeracaoPdf | ||
from .serializers import GeracaoPdfSerializer | ||
from rest_framework.decorators import action | ||
|
||
# Create your views here. | ||
|
||
|
||
class GeracaoPdfView(viewsets.ModelViewSet): | ||
|
||
serializer_class = GeracaoPdfSerializer | ||
queryset = GeracaoPdf.objects.all() | ||
|
||
@action(methods=['get'], detail=False) | ||
def generatePDF(self, request): | ||
# Create the HttpResponse object with the appropriate PDF headers. | ||
response = HttpResponse(content_type='application/pdf') | ||
response['Content-Disposition'] = 'attachment; filename="somefilename.pdf"' | ||
|
||
# Create the PDF object, using the response object as its "file." | ||
p = canvas.Canvas(response) | ||
|
||
# Draw things on the PDF. Here's where the PDF generation happens. | ||
# See the ReportLab documentation for the full list of functionality. | ||
p.drawString(100, 100, "Hello world.") | ||
|
||
# Close the PDF object cleanly, and we're done. | ||
p.showPage() | ||
p.save() | ||
return response |
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
File renamed without changes
File renamed without changes
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,15 +1,9 @@ | ||
Django==3.2.6 | ||
<<<<<<< Updated upstream | ||
psycopg2-binary>=2.8 | ||
======= | ||
>>>>>>> Stashed changes | ||
gunicorn==20.1.0 | ||
pymongo==3.12.0 | ||
djongo==1.3.6 | ||
django-cors-headers==3.8.0 | ||
djangorestframework==3.12.4 | ||
<<<<<<< Updated upstream | ||
|
||
======= | ||
docker==5.0.0 | ||
>>>>>>> Stashed changes | ||
|
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,4 +1,4 @@ | ||
# Abertura da Sprint (nº) | ||
# Abertura da Sprint 0 | ||
|
||
## Histórico de revisão | ||
|
||
|
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,4 +1,4 @@ | ||
# Fechamento da Sprint (nº) | ||
# Fechamento da Sprint 0 | ||
|
||
## Backlog da Sprint | ||
|
||
|
Oops, something went wrong.