Здесь будет текст
31 |├── yatube ├── api │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── apps.py │ ├── permissions.py │ ├── urls.py │ ├── serializers.py │ └── views.py ├── core │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── templatetags │ │ ├── __init__.py │ │ └── user_filters.py │ ├── context_processors │ │ ├── __init__.py │ │ └── year.py │ ├── apps.py │ └── views.py ├── about │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── apps.py │ ├── urls.py │ └── views.py ├── posts │ ├── __init__.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_models.py │ │ ├── test_urls.py │ │ ├── test_forms.py │ │ └── test_views.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0003_auto_20211017_1611.py │ │ ├── 0008_auto_20220122_1420.py │ │ ├── 0005_post_image.py │ │ ├── 0007_follow.py │ │ ├── 0001_initial.py │ │ ├── 0002_auto_20211016_1532.py │ │ ├── 0006_comment.py │ │ └── 0004_auto_20211126_1732.py │ ├── apps.py │ ├── forms.py │ ├── admin.py │ ├── urls.py │ ├── models.py │ └── views.py ├── users │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── apps.py │ ├── views.py │ ├── forms.py │ └── urls.py ├── yatube │ ├── __init__.py │ ├── wsgi.py │ ├── urls.py │ └── settings.py ├── static │ └── img │ │ └── logo.png ├── tmpxm0zp75c │ ├── posts │ │ └── small.gif │ └── cache │ │ └── 92 │ │ └── fc │ │ └── 92fc9ce05ed8d55fe1a4fc232d150188.jpg ├── templates │ ├── core │ │ ├── 500.html │ │ ├── 403.html │ │ ├── 403csrf.html │ │ └── 404.html │ ├── includes │ │ ├── footer.html │ │ └── header.html │ ├── posts │ │ ├── includes │ │ │ ├── comments.html │ │ │ ├── switcher.html │ │ │ └── paginator.html │ │ ├── group_list.html │ │ ├── follow.html │ │ ├── index.html │ │ ├── profile.html │ │ ├── post_detail.html │ │ └── create_post.html │ ├── about │ │ ├── author.html │ │ └── tech.html │ ├── users │ │ ├── logged_out.html │ │ ├── password_change_done.html │ │ ├── password_reset_done.html │ │ ├── password_reset_complete.html │ │ ├── password_reset_form.html │ │ ├── signup.html │ │ ├── password_change_form.html │ │ ├── login.html │ │ └── password_reset_confirm.html │ └── base.html ├── test.py └── manage.py ├── requirements.txt ├── README.md ├── LICENSE └── .gitignore /yatube/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/about/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/posts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/users/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/yatube/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/api/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/posts/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/about/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/core/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/core/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/posts/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/users/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yatube/core/context_processors/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==2.2.19 2 | pytz==2021.3 3 | sqlparse==0.4.2 4 | -------------------------------------------------------------------------------- /yatube/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vladimi-lan/yatube_project/HEAD/yatube/static/img/logo.png -------------------------------------------------------------------------------- /yatube/api/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ApiConfig(AppConfig): 5 | name = 'api' 6 | -------------------------------------------------------------------------------- /yatube/core/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CoreConfig(AppConfig): 5 | name = 'core' 6 | -------------------------------------------------------------------------------- /yatube/about/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AboutConfig(AppConfig): 5 | name = 'about' 6 | -------------------------------------------------------------------------------- /yatube/posts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PostsConfig(AppConfig): 5 | name = 'posts' 6 | -------------------------------------------------------------------------------- /yatube/users/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class UsersConfig(AppConfig): 5 | name = 'users' 6 | -------------------------------------------------------------------------------- /yatube/tmpxm0zp75c/posts/small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vladimi-lan/yatube_project/HEAD/yatube/tmpxm0zp75c/posts/small.gif -------------------------------------------------------------------------------- /yatube/templates/core/500.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}Custom 500{% endblock %} 3 | {% block content %} 4 |
Страницы с адресом {{ path }} не существует
6 | Идите на главную 7 | {% endblock %} -------------------------------------------------------------------------------- /yatube/about/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | 6 | app_name = 'about' 7 | 8 | urlpatterns = [ 9 | path('author/', views.AboutAuthorView.as_view(), name='author'), 10 | path('tech/', views.AboutTechView.as_view(), name='tech'), 11 | ] 12 | -------------------------------------------------------------------------------- /yatube/about/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from django.views.generic.base import TemplateView 3 | 4 | 5 | class AboutAuthorView(TemplateView): 6 | template_name = 'about/author.html' 7 | 8 | class AboutTechView(TemplateView): 9 | template_name = 'about/tech.html' 10 | -------------------------------------------------------------------------------- /yatube/users/views.py: -------------------------------------------------------------------------------- 1 | from django.views.generic import CreateView 2 | from django.urls import reverse_lazy 3 | from .forms import CreationForm 4 | 5 | class SignUp(CreateView): 6 | form_class = CreationForm 7 | success_url = reverse_lazy('posts:index') 8 | template_name = 'users/signup.html' -------------------------------------------------------------------------------- /yatube/api/permissions.py: -------------------------------------------------------------------------------- 1 | from rest_framework import permissions 2 | 3 | 4 | class IsOwnerOrReadOnly(permissions.BasePermission): 5 | def has_object_permission(self, request, view, obj): 6 | if request.method in permissions.SAFE_METHODS: 7 | return True 8 | return obj.author == request.user 9 | -------------------------------------------------------------------------------- /yatube/core/templatetags/user_filters.py: -------------------------------------------------------------------------------- 1 | from django import template 2 | # В template.Library зарегистрированы все встроенные теги и фильтры шаблонов; 3 | # добавляем к ним и наш фильтр. 4 | register = template.Library() 5 | 6 | 7 | @register.filter 8 | def addclass(field, css): 9 | return field.as_widget(attrs={'class': css}) 10 | -------------------------------------------------------------------------------- /yatube/users/forms.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.forms import UserCreationForm 2 | from django.contrib.auth import get_user_model 3 | 4 | 5 | User = get_user_model() 6 | 7 | class CreationForm(UserCreationForm): 8 | class Meta(UserCreationForm.Meta): 9 | model = User 10 | fields = ('first_name', 'last_name', 'username', 'email') 11 | -------------------------------------------------------------------------------- /yatube/templates/posts/includes/comments.html: -------------------------------------------------------------------------------- 1 | {% for comment in comments %} 2 |10 | {{ comment.text }} 11 |
12 |
8 | Тут я размещу информацию о себе используя свои умения верстать.
9 | Картинки, блоки, элементы бустрап. А может быть, просто напишу несколько абзацев текста.
10 |
11 | мой GitHub
12 |
13 |
14 | Вы вышли из своей учётной записи. Ждём вас снова! 15 |
16 |Пароль изменён успешно
15 |Проверьте свою почту, вам должно прийти письмо со ссылкой для восстановления пароля
15 |Ваш пароль был сохранен. Используйте его для входа
15 | войти 16 |Здесь будет текст
31 |{% if group.description %} {{ group.description }} {% endif %}
11 | {% for post in page_obj %} 12 |{{ post.text }}
24 | {% if not forloop.last %}{{ post.text }}
27 | Подробная информация{{ post.text }}
27 | Подробная информация{{ post.text }}
36 | подробная информацияСсылка сброса пароля содержит ошибку или устарела.
56 |41 | {{ post.text }} 42 |
43 | {% if user == post.author %} 44 | 45 | редактировать запись 46 | 47 | {% endif %} 48 | {% if user.is_authenticated %} 49 |