Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
kkkkkkkkatya authored Jun 4, 2024
2 parents 2c0bdfa + 762de47 commit c5bdde9
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 8 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,13 @@ Add your project documentation here.
- Design database schema for storing reported content :heavy_check_mark:
- Define API endpoints for reporting and moderation :heavy_check_mark:
- Write unit tests for reporting system functionalities :heavy_check_mark:
-


## Anti-Lab 2
- Barvinskyi
- [Project](https://github.com/VladBarvinskyi323/Barvinskyi.universitu.FitnessTracker)
- [Fork](https://github.com/VladBarvinskyi323/Baryliuk.University.OnlineBookClub)


## Anti Lab 2
- Name: Victoria Yatsiuk
Expand Down
Binary file modified books/__pycache__/views.cpython-311.pyc
Binary file not shown.
13 changes: 10 additions & 3 deletions books/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,16 @@ def a_book(request, id):
print(f"image.url: {book.images.url}")
image_url = book.images.url

return render(request, 'books/a_book.html',
{'book': book, 'error':error, 'id':id,
'image_url':image_url, 'action':action, 'interest_names': interest_names})
context = {
'book': book,
'error': error,
'id': id,
'image_url': image_url,
'action': action,
'interest_names': interest_names
}

return render(request, 'books/a_book.html', context)


from django.contrib.auth.decorators import login_required
Expand Down
Binary file modified db.sqlite3
Binary file not shown.
Binary file modified forum/__pycache__/views.cpython-311.pyc
Binary file not shown.
12 changes: 9 additions & 3 deletions forum/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,15 @@ def edit(request, id):
else:
form = CreateInForum(instance=forum)

return render(request, 'forum/edit.html',
{'form': form, 'error':error,'name':forum.name,
'date_created':forum.date_created, 'id':id})
context = {
'form': form,
'error':error,
'name':forum.name,
'date_created':forum.date_created,
'id':id
}

return render(request, 'forum/edit.html',context)


# add comments to forum
Expand Down
Binary file modified registry/__pycache__/views.cpython-311.pyc
Binary file not shown.
5 changes: 4 additions & 1 deletion registry/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ def welcome_email(request):
message = f'Hi {username}, thank you for choosing our book club. Now you can be the part of a reading family! '
from_email = settings.EMAIL_HOST_USER
recipient_list = [email]
send_mail(subject, message, from_email, recipient_list, fail_silently=False)
try:
send_mail(subject, message, from_email, recipient_list, fail_silently=False)
except Exception as e:
messages.error(request, f"Error sending email: {e}")
return redirect("main:home")


Expand Down

0 comments on commit c5bdde9

Please sign in to comment.