Skip to content

Commit

Permalink
Merge pull request #3 from zombiepaladin/sudo-main
Browse files Browse the repository at this point in the history
Sprint 4 final PR
  • Loading branch information
Ia-in03 authored Nov 18, 2024
2 parents e4652bd + b8b37ed commit c5e7c71
Show file tree
Hide file tree
Showing 32 changed files with 183 additions and 42 deletions.
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
include README.md
include README.md

recursive-include ksu_events/templates *
Binary file added dist/ksu_events-0.1.0-py3-none-any.whl
Binary file not shown.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions ksu_events/ksu_cas_auth/apps.py → ksu_cas_auth/apps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.apps import AppConfig


class KsuCasAuthConfig(AppConfig):
name = 'ksu_events.ksu_cas_auth'
name = 'ksu_cas_auth'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ksu_events/ksu_cas_auth/urls.py → ksu_cas_auth/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
urlpatterns = [
path('login/', cas_views.LoginView.as_view(), name='cas_ng_login'),
path('logout/', cas_views.LogoutView.as_view(), name='cas_ng_logout'),
]
]
File renamed without changes.
1 change: 1 addition & 0 deletions ksu_events/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.3.9"
File renamed without changes.
5 changes: 5 additions & 0 deletions ksu_events/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class KsuEventsConfig(AppConfig):
name = 'ksu_events'
5 changes: 0 additions & 5 deletions ksu_events/ksu_events/apps.py

This file was deleted.

2 changes: 0 additions & 2 deletions ksu_events/ksu_events/models/__init__.py

This file was deleted.

Empty file.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions ksu_events/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from ksu_events.models.model_events import Event
from ksu_events.models.model_subevents import SubEvent
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.db import models
from django.core.exceptions import ValidationError

from ksu_events.ksu_events.models.mixins import TimeStampMixin
from ksu_events.models.mixins import TimeStampMixin

class EventManager(models.Manager):
def get_active_season(self):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.db import models
from ksu_events.ksu_events.models.mixins import TimeStampMixin
from ksu_events.ksu_events.models.model_events import Event
from ksu_events.models.mixins import TimeStampMixin
from ksu_events.models.model_events import Event

class SubEvent(TimeStampMixin, models.Model):

Expand Down
4 changes: 2 additions & 2 deletions ksu_events/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'ksu_events.ksu_events',
'ksu_events.ksu_cas_auth',
'ksu_events',
'ksu_cas_auth',
]

MIDDLEWARE = [
Expand Down
102 changes: 102 additions & 0 deletions ksu_events/static/ksu_events/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Arial, sans-serif;
}

body {
background-color: #111827;
color: #ffffff;
}

header {
position: relative;
text-align: center;
}

nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 2rem;
background-color: #1F2937;
}

nav .logo {
font-size: 1.5rem;
font-weight: bold;
}

.nav-links {
list-style: none;
display: flex;
gap: 1.5rem;
}

.nav-links a {
color: #ffffff;
text-decoration: none;
font-size: 1rem;
}

.sign-in {
background-color: #4CAF50;
padding: 0.5rem 1rem;
border-radius: 5px;
cursor: pointer;
}

.hero {
position: relative;
padding: 5rem 2rem;
background: url('hackk-state.png') center/cover no-repeat;
color: #ffffff;
}

.hero h1 {
font-size: 2rem;
margin-bottom: 1rem;
}

.hero p {
font-size: 1rem;
margin-bottom: 1.5rem;
max-width: 600px;
margin: 0 auto;
}

.hero button {
background-color: #007bff;
color: #ffffff;
padding: 0.75rem 1.5rem;
font-size: 1rem;
border: none;
border-radius: 5px;
cursor: pointer;
}

main {
padding: 2rem;
}

.info {
display: flex;
justify-content: space-around;
text-align: center;
padding: 2rem 0;
}

.info-box {
max-width: 300px;
}

.info-box h2 {
font-size: 1.5rem;
margin-bottom: 1rem;
}

.info-box p {
font-size: 1rem;
color: #D1D5DB;
}
52 changes: 52 additions & 0 deletions ksu_events/templates/ksu_events/home_page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hack K-State</title>
<link rel="stylesheet" href="style.css">
</head>

<body>
<header>
<nav>
<div class="logo">Hack K-State</div>
<ul class="nav-links">
<li><a href="#">Home</a></li>
<li><a href="#">Schedule</a></li>
<li><a href="#">FAQ</a></li>
<li><a href="#">Rules</a></li>
<li><a href="#">Last Year's Projects</a></li>
</ul>
<div class="sign-in">Sign in</div>
</nav>
<div class="hero">
<h1>Check out last year's projects!</h1>
<p>From mobile apps to video games, Hack K-State 2021 had over 35 submitted projects and a combined total of
138 college and high school students participating from around the world.</p>
<button>View Projects</button>
</div>
</header>

<main>
<section class="info">
<div class="info-box">
<h2>What is a hackathon?</h2>
<p>A hackathon is an invention and innovation competition for technology...</p>
</div>
<div class="info-box">
<h2>What is Hack K-State?</h2>
<p>Hack K-State is a 36-hour hackathon at Kansas State University...</p>
</div>
<div class="info-box">
<h2>Who can attend?</h2>
<p>Hack K-State is one of the few hackathons in the region that brings high school and college students
together...</p>
</div>
</section>
</main>
</body>

</html>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.test import TestCase
from django.core.exceptions import ValidationError
from django.utils import timezone
from ksu_events.ksu_events.models import Event
from ksu_events.models import Event

class HackathonModelTest(TestCase):
def setUp(self):
Expand Down
File renamed without changes.
22 changes: 3 additions & 19 deletions ksu_events/urls.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
"""
URL configuration for ksu_events project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/5.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from . import views

urlpatterns = [
path('admin/', admin.site.urls),
]
path('', views.home, name='home_view'),
]
7 changes: 4 additions & 3 deletions ksu_events/ksu_events/views.py → ksu_events/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
from django.contrib.auth.decorators import login_required


def home(request):
return HttpResponse("Hello world, this msg is from the events pkg")
def home(request):
return render(request, 'ksu_events/home_page.html')
#return HttpResponse("Hello world, this msg is from the events pkg")


@login_required
def redirect(request):
user = request.user
username = user.username

return HttpResponse(username + " has successfully logged in with KSU CAS Auth.")
6 changes: 3 additions & 3 deletions poetry.lock

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

0 comments on commit c5e7c71

Please sign in to comment.