Commit dfad726e authored by Isataev Adlet's avatar Isataev Adlet

Создал полностью CRUD для мероприятий

parent cbad5e75
......@@ -3,3 +3,4 @@ Django==3.2.9
pytz==2021.3
sqlparse==0.4.2
Pillow==8.4.0
django-crispy-forms==1.13.0
......@@ -37,7 +37,8 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'webapp'
'webapp',
'crispy_forms'
]
MIDDLEWARE = [
......@@ -125,5 +126,7 @@ STATIC_URL = '/static/'
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
CRISPY_TEMPLATE_PACK = 'bootstrap4'
MEDIA_ROOT = os.path.join(BASE_DIR, "uploads")
MEDIA_URL = "/uploads/"
......@@ -17,7 +17,14 @@ from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path
from webapp import views as webapp_views
urlpatterns = [
path('admin/', admin.site.urls),
path("", webapp_views.index_view, name="index"),
path("events/", webapp_views.EventView.as_view(), name="list_events"),
path("events/create/", webapp_views.EventCreateView.as_view(), name="create_events"),
path("events/<int:pk>/", webapp_views.EventDetailView.as_view(), name="detail_events"),
path("events/<int:pk>/edit/", webapp_views.EventUpdateView.as_view(), name="update_events"),
path("events/<int:pk>/delete/", webapp_views.EventDeleteView.as_view(), name="delete_events")
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django import forms
from webapp.models import Event
class EventForm(forms.ModelForm):
date = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'YYYY-MM-DD HH-MM-SS'}))
class Meta:
model = Event
fields = ["place", "date"]
......@@ -21,7 +21,7 @@ class Event(models.Model):
date = models.DateTimeField(verbose_name="Дата")
def __str__(self):
return f'{self.place}'
return f'{self.place} - {self.date}'
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css"
integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
<title>{% block title %}{% endblock %}</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="{% url 'index' %}">Speed Dating</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="{% url 'list_events' %}">Мероприятия<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'create_events' %}">Создать мероприятие</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Редактировать профиль</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Войти</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Регистрация</a>
</li>
</ul>
</div>
</nav>
<div class="container">
{% block content %}{% endblock %}
</div>
</body>
</html>
\ No newline at end of file
{% extends "base.html" %}
{% load crispy_forms_filters %}
{% block title %}Create Event{% endblock %}
{% block content %}
<h1>Создать Мероприятие</h1>
<form action="{% url "create_events" %}" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form|crispy }}
<button>Создать</button>
</form>
{% endblock %}
\ No newline at end of file
{% extends "base.html" %}
{% block title %}Delete {{ event.place }}{% endblock %}
{% block content %}
<h2>Удалить "{{ event.place }}"</h2>
<a href="{% url "list_events" %}">Cancel</a>
<form action="{% url "delete_events" event.pk %}" method="post">
{% csrf_token %}
<button>Yes</button>
</form>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block title %}Events{% endblock %}
{% block content %}
{{ event.place.name }}
<img src="{{ event.place.photo.url }}" alt="">
{{ event.place.address }}
{{ event.place.description }}
{{ event.date }}
<a href="{% url "update_events" event.pk %}">Редактировать</a>
<a href="{% url "delete_events" event.pk %}">Удалить</a>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block title %}Events{% endblock %}
{% block content %}
{% for event in events %}
<a href="{% url 'detail_events' event.pk %}">{{ event.place }}</a>
{{ event.date }}
<hr>
{% endfor %}
{% endblock %}
\ No newline at end of file
{% extends "base.html" %}
{% load crispy_forms_filters %}
{% block title %}Update Event{% endblock %}
{% block content %}
<h1>Редактировать Мероприятие</h1>
<form action="{% url "update_events" event.pk %}" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form|crispy }}
<button>Редактировать</button>
</form>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block title %}Home{% endblock %}
{% block content %}
<div id="carouselExampleSlidesOnly" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="https://blogs.egu.eu/network/water-underground/files/2017/05/1-2-1400x800.jpg"
class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoGCBUVExcVExUXFxcYGhoaGxoaGiMaHxkgHxocIB8fHRkfHyslHB0pHxofJDUkKSwuMjIyGyE3PDcxOysxMi4BCwsLDw4PHRERHTEoISg2MTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMf/AABEIAKgBLAMBIgACEQEDEQH/xAAbAAACAgMBAAAAAAAAAAAAAAAEBQMGAAIHAf/EAEkQAAIBAgQDBAYGCAUCBAcAAAECEQADBBIhMQVBURMiYXEGMoGRobEHI0LB0fAUM1JicoKy4RZzosLxY5IVQ7PTJDRTg5Oj0v/EABkBAAMBAQEAAAAAAAAAAAAAAAABAgMEBf/EACwRAAICAgIBAwMEAgMBAAAAAAABAhED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Q5CR0zDY66eyayspMA7H8Ns2cr5bzWbnqXUuA6jdWQqMrjmpbyJFDqmGbX9Idf8y0fmjXPlXtZUlGycEDx2eIwzzy7QWz7ripUWM4bdsOVuKyNEwdQw6hhIYeR0rKyhj8gWYc189T+FbDJ4+/+1ZWUyT//2Q=="
class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQSVVw81pDKgc8dERNylXcwyzXX0oNiSHyGqQ&usqp=CAU"
class="d-block w-100" alt="...">
</div>
</div>
</div>
<div>
<h1>Что такое Speed Dating</h1>
<p>
Участников, как правило, подбирают по равноценным социальным группам. Некоторые организаторы вводят
возрастные ограничения. На классической спид-дейтинг-вечеринке каждый участник будет иметь 10–15
встреч наедине с представителями противоположного пола. Девушки размещаются за столиками с номерами.
Мужчины через каждые 3–7 минут последовательно пересаживаются от одной девушки к другой. После каждой
встречи гости отмечают свои впечатления о собеседнике в «карте симпатий» или напрямую обмениваются
контактами. Далее организаторы сравнивают «карты симпатий», и, в случае совпадения «+»,
рассылают контакты участникам.
</p>
</div>
{% endblock %}
\ No newline at end of file
from django.shortcuts import render
from django.views.generic import ListView
from django.urls import reverse, reverse_lazy
from django.views import View
from django.views.generic import CreateView, DetailView, UpdateView, DeleteView
from webapp.forms import EventForm
from webapp.models import Event
class EventView(ListView):
def index_view(request):
return render(request, "index.html")
class EventView(View):
def get(self, request, *args, **kwargs):
events = Event.objects.all()
context = {"events": events}
return render(request, "event_list.html", context)
class EventCreateView(CreateView):
model = Event
template_name = "event_create.html"
form_class = EventForm
def get_success_url(self):
return reverse("detail_events", kwargs={"pk": self.object.pk})
class EventDetailView(DetailView):
model = Event
template_name = "event_list.html"
ordering = ["date"]
template_name = "event_detail.html"
context_object_name = "event"
class EventUpdateView(UpdateView):
model = Event
template_name = "event_update.html"
form_class = EventForm
def get_success_url(self):
return reverse("detail_events", kwargs={"pk": self.object.pk})
class EventDeleteView(DeleteView):
model = Event
template_name = "event_delete.html"
success_url = reverse_lazy("list_events")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment