Compare commits
No commits in common. "api-first" and "add-mad-to-db" have entirely different histories.
api-first
...
add-mad-to
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,7 +1,6 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*.pyc
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
@ -52,8 +51,3 @@ docs/_build/
|
||||
|
||||
*__pycache__/*
|
||||
*.pyc
|
||||
|
||||
run.sh
|
||||
venv/
|
||||
*.bak
|
||||
scratch*
|
||||
|
BIN
api/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
api/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
api/__pycache__/admin.cpython-312.pyc
Normal file
BIN
api/__pycache__/admin.cpython-312.pyc
Normal file
Binary file not shown.
BIN
api/__pycache__/apps.cpython-312.pyc
Normal file
BIN
api/__pycache__/apps.cpython-312.pyc
Normal file
Binary file not shown.
BIN
api/__pycache__/models.cpython-312.pyc
Normal file
BIN
api/__pycache__/models.cpython-312.pyc
Normal file
Binary file not shown.
BIN
api/migrations/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
api/migrations/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
api/serializers/__pycache__/event.cpython-312.pyc
Normal file
BIN
api/serializers/__pycache__/event.cpython-312.pyc
Normal file
Binary file not shown.
BIN
api/views/__pycache__/event.cpython-312.pyc
Normal file
BIN
api/views/__pycache__/event.cpython-312.pyc
Normal file
Binary file not shown.
BIN
common/__pycache__/build_response.cpython-312.pyc
Normal file
BIN
common/__pycache__/build_response.cpython-312.pyc
Normal file
Binary file not shown.
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
BIN
korabo/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
korabo/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
korabo/__pycache__/settings.cpython-312.pyc
Normal file
BIN
korabo/__pycache__/settings.cpython-312.pyc
Normal file
Binary file not shown.
BIN
korabo/__pycache__/urls.cpython-312.pyc
Normal file
BIN
korabo/__pycache__/urls.cpython-312.pyc
Normal file
Binary file not shown.
BIN
korabo/__pycache__/wsgi.cpython-312.pyc
Normal file
BIN
korabo/__pycache__/wsgi.cpython-312.pyc
Normal file
Binary file not shown.
@ -82,12 +82,8 @@ WSGI_APPLICATION = 'korabo.wsgi.application'
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'NAME': os.getenv('DB_NAME'),
|
||||
'USER': os.getenv('DB_USER'),
|
||||
'PASSWORD': os.getenv('DB_PASS'),
|
||||
'HOST': os.getenv('DB_HOST'),
|
||||
'PORT': os.getenv('DB_PORT'),
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,6 +131,3 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
LOGOUT_REDIRECT_URL = '/'
|
||||
|
||||
MEDIA_URL = "/media/"
|
||||
MEDIA_ROOT = BASE_DIR / "media"
|
||||
|
@ -1,7 +1,6 @@
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
|
||||
from api.views.event import EventView
|
||||
from api.views.event_division import EventDivisionView
|
||||
from api.views.event_comment import EventCommentView
|
||||
@ -21,6 +20,3 @@ urlpatterns = [
|
||||
path('change_password/', views.change_password, name='change_password'),
|
||||
path('password_change_done/', views.password_change_done, name='password_change_done')
|
||||
]
|
||||
|
||||
if settings.DEBUG: # new
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 48 KiB |
@ -12,4 +12,3 @@ requests==2.32.3
|
||||
soupsieve==2.6
|
||||
sqlparse==0.5.1
|
||||
urllib3==2.3.0
|
||||
pillow==11.1.0
|
||||
|
BIN
web/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
web/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
web/__pycache__/admin.cpython-312.pyc
Normal file
BIN
web/__pycache__/admin.cpython-312.pyc
Normal file
Binary file not shown.
BIN
web/__pycache__/apps.cpython-312.pyc
Normal file
BIN
web/__pycache__/apps.cpython-312.pyc
Normal file
Binary file not shown.
BIN
web/__pycache__/models.cpython-312.pyc
Normal file
BIN
web/__pycache__/models.cpython-312.pyc
Normal file
Binary file not shown.
BIN
web/__pycache__/views.cpython-312.pyc
Normal file
BIN
web/__pycache__/views.cpython-312.pyc
Normal file
Binary file not shown.
@ -1,18 +0,0 @@
|
||||
# Generated by Django 4.2.16 on 2025-04-06 01:54
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('web', '0004_remove_event_participants_alter_eventcomment_event_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='event',
|
||||
name='cover_image',
|
||||
field=models.ImageField(blank=True, default=None, null=True, upload_to='event_cover_images/'),
|
||||
),
|
||||
]
|
BIN
web/migrations/__pycache__/0001_initial.cpython-312.pyc
Normal file
BIN
web/migrations/__pycache__/0001_initial.cpython-312.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
web/migrations/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
web/migrations/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
web/models/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
web/models/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
web/models/__pycache__/availability.cpython-312.pyc
Normal file
BIN
web/models/__pycache__/availability.cpython-312.pyc
Normal file
Binary file not shown.
BIN
web/models/__pycache__/base.cpython-312.pyc
Normal file
BIN
web/models/__pycache__/base.cpython-312.pyc
Normal file
Binary file not shown.
BIN
web/models/__pycache__/event.cpython-312.pyc
Normal file
BIN
web/models/__pycache__/event.cpython-312.pyc
Normal file
Binary file not shown.
BIN
web/models/__pycache__/event_comment.cpython-312.pyc
Normal file
BIN
web/models/__pycache__/event_comment.cpython-312.pyc
Normal file
Binary file not shown.
BIN
web/models/__pycache__/event_comment_reaction.cpython-312.pyc
Normal file
BIN
web/models/__pycache__/event_comment_reaction.cpython-312.pyc
Normal file
Binary file not shown.
BIN
web/models/__pycache__/event_division.cpython-312.pyc
Normal file
BIN
web/models/__pycache__/event_division.cpython-312.pyc
Normal file
Binary file not shown.
BIN
web/models/__pycache__/shared_event.cpython-312.pyc
Normal file
BIN
web/models/__pycache__/shared_event.cpython-312.pyc
Normal file
Binary file not shown.
@ -10,7 +10,6 @@ class Event(BaseModel):
|
||||
id = models.AutoField(primary_key=True)
|
||||
name = models.TextField(blank=False, null=False)
|
||||
description = models.TextField(blank=False, null=False)
|
||||
cover_image = models.ImageField(blank=True, null=True, default=None, upload_to='event_cover_images/')
|
||||
division = models.ForeignKey(EventDivision, on_delete=models.CASCADE)
|
||||
start_date = models.DateTimeField(blank=False, null=False)
|
||||
end_date = models.DateTimeField(blank=False, null=False)
|
||||
|
@ -1,36 +1,26 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Event Name</td>
|
||||
<td>Already Responded</td>
|
||||
<td>Start Date</td>
|
||||
<td>End Date</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for event in events %}
|
||||
<tr>
|
||||
<td>Event Name</td>
|
||||
<td>Already Responded</td>
|
||||
<td>Start Date</td>
|
||||
<td>End Date</td>
|
||||
<td>img</td>
|
||||
<td><a href="{% url 'event' event.id %}">{{event.name}}</a></td>
|
||||
<td>{{event.responses}}</td>
|
||||
<td>{{event.start_date|date:"m/d/Y"}}</td>
|
||||
<td>{{event.end_date|date:"m/d/Y"}}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for event in events %}
|
||||
<div class="accordion-item">
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="event-{{ event.id }}">
|
||||
<button class="accordion-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#event-collapse-{{ event.id }}"
|
||||
aria-expanded="true"
|
||||
aria-controls="event-collapse-{{ event.id }}">{{ event.name }}</button>
|
||||
</h2>
|
||||
<div id="event-collapse-{{ event.id }}"
|
||||
class="accordion-collapse collapse"
|
||||
aria-labelledby="event-{{ event.id }}"
|
||||
data-bs-parent="#accordionExample">
|
||||
<div class="accordion-body">{{ event.description }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -18,7 +18,6 @@ def index(request):
|
||||
'name': active_event.name,
|
||||
'start_date': active_event.start_date.date(),
|
||||
'end_date': active_event.end_date.date(),
|
||||
'cover_image': active_event.cover_image,
|
||||
'responses': ', '.join([x.user.username for x in active_event.availability_set.all()])
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user