-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Rename NextMeeting database model (#32)
- Loading branch information
1 parent
19e0c00
commit 699945c
Showing
4 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from django.contrib import admin | ||
|
||
from .models import NextMeeting | ||
from .models import Meeting | ||
|
||
admin.site.register(NextMeeting) | ||
admin.site.register(Meeting) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 5.0.4 on 2024-04-21 14:36 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('gwardia', '0002_alter_nextmeeting_date_of_meeting'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameModel( | ||
old_name='NextMeeting', | ||
new_name='Meeting', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
from django.shortcuts import render | ||
from django.utils import timezone | ||
|
||
from .models import NextMeeting | ||
from .models import Meeting | ||
|
||
|
||
def index(request): | ||
upcoming_meetings = NextMeeting.objects.filter(date_of_meeting__gte=timezone.now()).order_by("date_of_meeting") | ||
upcoming_meetings = Meeting.objects.filter(date_of_meeting__gte=timezone.now()).order_by("date_of_meeting") | ||
context = {"upcoming_five_meetings": upcoming_meetings[:5]} | ||
return render(request, "gwardia/index.html", context) |