diff --git a/apps/receitas/urls.py b/apps/receitas/urls.py index 4e6a66d..9b98db7 100644 --- a/apps/receitas/urls.py +++ b/apps/receitas/urls.py @@ -3,5 +3,6 @@ urlpatterns = [ path('', views.index, name='index'), - path('', views.receita, name='receita') + path('receitas/', views.receita, name='receita'), + path('receitas/criar', views.create, name='receita.create'), ] \ No newline at end of file diff --git a/apps/receitas/views.py b/apps/receitas/views.py index e1ab991..a576780 100644 --- a/apps/receitas/views.py +++ b/apps/receitas/views.py @@ -14,3 +14,6 @@ def index(request): def receita(request, receita_id): return render(request, 'receitas/receita.html', {'receita': get_object_or_404(Receita, pk=receita_id)}) + +def create(request): + return render(request, 'receitas/create.html') \ No newline at end of file diff --git a/apps/templates/_base.html b/apps/templates/_base.html index 84a8404..bb7a655 100644 --- a/apps/templates/_base.html +++ b/apps/templates/_base.html @@ -21,6 +21,14 @@ + +
+ + + +
+ + {% include 'partials/_header.html' %} {% block content %} {% endblock %} @@ -28,7 +36,6 @@ {% include 'partials/_footer.html' %} - diff --git a/apps/templates/partials/_header.html b/apps/templates/partials/_header.html index aff0aa8..f396336 100644 --- a/apps/templates/partials/_header.html +++ b/apps/templates/partials/_header.html @@ -74,9 +74,10 @@
- \ No newline at end of file + + diff --git a/apps/templates/receitas/create.html b/apps/templates/receitas/create.html new file mode 100644 index 0000000..753fb01 --- /dev/null +++ b/apps/templates/receitas/create.html @@ -0,0 +1,62 @@ +{% extends '_base.html' %} +{% load static %} +{% block content %} + + +
+
+
+
+
+

Crie sua receita, {{ user.username }} :)

+
+
+
+ +
+
+

Todos os campos são obrigatórios

+
+
+ {% csrf_token %} +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+
+
+
+ +{% endblock %} \ No newline at end of file