Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.


def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
print_hi('PyCharm')

# See PyCharm help at https://www.jetbrains.com/help/pycharm/
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django.contrib import admin
from .models import FeedbackMessage

@admin.register(FeedbackMessage)
class FeedbackMessageAdmin(admin.ModelAdmin):
list_display = ('name', 'email', 'message', 'created_at')
search_fields = ('name', 'email', 'message')
list_filter = ('created_at',)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class MainConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'main'
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User

from .models import FeedbackMessage

class ContactForm(forms.Form):
name = forms.CharField(label='Имя', max_length=100)
email = forms.EmailField(label='Email')
message = forms.CharField(label='Сообщение', widget=forms.Textarea)

class GuestFeedbackForm(forms.ModelForm):
class Meta:
model = FeedbackMessage
fields = ['name', 'email', 'message']
widgets = {
'message': forms.Textarea(attrs={'rows': 4}),
}

class AuthenticatedFeedbackForm(forms.ModelForm):
class Meta:
model = FeedbackMessage
fields = ['message']
widgets = {
'message': forms.Textarea(attrs={'rows': 4}),
}

class RegisterForm(UserCreationForm):
email = forms.EmailField(required=True)

class Meta:
model = User
fields = ["username", "email", "password1", "password2"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 5.2.1 on 2025-05-12 18:38

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='ContactMessage',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('email', models.EmailField(max_length=254)),
('message', models.TextField()),
('sent_at', models.DateTimeField(auto_now_add=True)),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.2.1 on 2025-05-12 19:25

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('main', '0001_initial'),
]

operations = [
migrations.CreateModel(
name='FeedbackMessage',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('email', models.EmailField(max_length=254)),
('message', models.TextField()),
('created_at', models.DateTimeField(auto_now_add=True)),
],
),
]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from django.db import models

class ContactMessage(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField()
message = models.TextField()
sent_at = models.DateTimeField(auto_now_add=True)

def __str__(self):
return f'{self.name} ({self.email}) — {self.sent_at.strftime("%d.%m.%Y %H:%M")}'

class FeedbackMessage(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField()
message = models.TextField()
created_at = models.DateTimeField(auto_now_add=True)

def __str__(self):
return f'{self.name} ({self.email})'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
*,
*::before,
*::after {
box-sizing: border-box;
}

body {
margin: 0;
font-family: 'Segoe UI', sans-serif;
background: #f4f4f4;
display: flex;
flex-direction: column;
min-height: 100vh;
}

header {
background-color: #2c3e50;
color: white;
padding: 20px 0;
text-align: center;
}

.django-logo {
position: absolute;
top: 10px;
left: 20px;
width: 50px;
height: auto;
animation: pulse 2s infinite ease-in-out;
z-index: 10;
}

.django-logo-auth{
position: relative;
animation: pulse 2s infinite ease-in-out;
z-index: 10;
height: 70px;
}

@keyframes pulse {
0%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
}

nav {
margin-top: 10px;
}

nav a {
color: white;
margin: 0 10px;
text-decoration: none;
padding: 8px 14px;
border-radius: 5px;
transition: background 0.3s ease;
}

nav a:hover {
background-color: #34495e;
}

nav .active {
background-color: #1abc9c !important;
color: white !important;
}

header div{
margin-top: 14px;
}

main {
flex: 1;
padding: 30px;
display: flex;
justify-content: center;
align-items: center;
}

main > div, main form {
background: white;
padding: 25px 30px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 600px;
}

h2 {
margin-top: 0;
color: #2c3e50;
}

button {
background-color: #1abc9c;
color: white;
border: none;
padding: 10px 18px;
border-radius: 5px;
cursor: pointer;
transition: background 0.3s ease;
}

button:hover {
background-color: #16a085;
}

footer {
background-color: #2c3e50;
color: white;
text-align: center;
padding: 15px 0;
margin-top: auto;
}
.footer-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}

.social-links a {
color: #eee;
margin: 0 10px;
font-size: 20px;
transition: color 0.3s;
}

.social-links a:hover {
color: #1da1f2; /* голубоватый акцент при наведении */
}


.error-box {
background-color: #ffe0e0;
color: #b10000;
border: 1px solid #b10000;
border-radius: 8px;
padding: 10px 15px;
margin-bottom: 15px;
font-size: 14px;
}

.login div {
margin-bottom: 14px;
}

.form-group {
margin-bottom: 15px;
}
.error {
color: #b10000;
font-size: 13px;
margin-top: 4px;
}


.fancy-list {
list-style: none;
padding-left: 0;
}

.fancy-list li {
margin-bottom: 10px;
padding-left: 24px;
position: relative;
font-size: 16px;
}

.fancy-list li::before {
content: "✔️";
position: absolute;
left: 0;
color: #1abc9c;
}

.swiper {
width: 100%;
height: auto;
padding-bottom: 40px;
}

.swiper-slide {
background: white;
border-radius: 10px;
padding: 25px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}


Loading