cleanups
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
# from django.contrib import admin
|
|
||||||
|
|
||||||
# Register your models here.
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
# from django.db import models
|
|
||||||
|
|
||||||
# Create your models here.
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
# from django.test import TestCase
|
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
# from django.test import TestCase
|
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
|||||||
@@ -1,12 +1,3 @@
|
|||||||
"""
|
|
||||||
ASGI config for fet2020 project.
|
|
||||||
|
|
||||||
It exposes the ASGI callable as a module-level variable named ``application``.
|
|
||||||
|
|
||||||
For more information on this file, see
|
|
||||||
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from django.core.asgi import get_asgi_application
|
from django.core.asgi import get_asgi_application
|
||||||
|
|||||||
@@ -1,16 +1,3 @@
|
|||||||
|
|
||||||
"""
|
|
||||||
Django settings for fet2020 project.
|
|
||||||
|
|
||||||
Generated by 'django-admin startproject' using Django 3.0.5.
|
|
||||||
|
|
||||||
For more information on this file, see
|
|
||||||
https://docs.djangoproject.com/en/3.0/topics/settings/
|
|
||||||
|
|
||||||
For the full list of settings and their values, see
|
|
||||||
https://docs.djangoproject.com/en/3.0/ref/settings/
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import environ
|
import environ
|
||||||
from urllib.parse import urljoin
|
from urllib.parse import urljoin
|
||||||
|
|||||||
@@ -1,18 +1,3 @@
|
|||||||
"""test1 URL Configuration
|
|
||||||
|
|
||||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
||||||
https://docs.djangoproject.com/en/3.0/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.contrib import admin
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
from django.conf.urls.static import static
|
from django.conf.urls.static import static
|
||||||
@@ -20,6 +5,7 @@ from django.conf import settings
|
|||||||
from django.views.generic import RedirectView
|
from django.views.generic import RedirectView
|
||||||
from . import views
|
from . import views
|
||||||
from posts.views import PostViewSet
|
from posts.views import PostViewSet
|
||||||
|
from members.urls import member_urlpatterns, jobs_urlpatterns
|
||||||
from members.views import MemberViewSet, JobViewSet, JobGroupViewSet, JobMemberViewSet
|
from members.views import MemberViewSet, JobViewSet, JobGroupViewSet, JobMemberViewSet
|
||||||
from rest_framework import routers
|
from rest_framework import routers
|
||||||
|
|
||||||
@@ -41,6 +27,8 @@ urlpatterns = [
|
|||||||
path('ckeditor/', include('ckeditor_uploader.urls')),
|
path('ckeditor/', include('ckeditor_uploader.urls')),
|
||||||
path('api/', include(router.urls)),
|
path('api/', include(router.urls)),
|
||||||
path('members/', include('members.urls'), name='members'),
|
path('members/', include('members.urls'), name='members'),
|
||||||
|
path('jobs/', include(jobs_urlpatterns), name='jobs'),
|
||||||
|
path('member/', include(member_urlpatterns), name='member'),
|
||||||
path('blackboard/', include('blackboard.urls'), name='blackboard'),
|
path('blackboard/', include('blackboard.urls'), name='blackboard'),
|
||||||
path('tasks/', include('tasks.urls'), name='tasks'),
|
path('tasks/', include('tasks.urls'), name='tasks'),
|
||||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|||||||
@@ -1,12 +1,3 @@
|
|||||||
"""
|
|
||||||
WSGI config for fet2020 project.
|
|
||||||
|
|
||||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
|
||||||
|
|
||||||
For more information on this file, see
|
|
||||||
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from django.core.wsgi import get_wsgi_application
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
# from django.test import TestCase
|
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
|||||||
@@ -6,6 +6,12 @@ from . import views
|
|||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('', views.index, name='members'),
|
path('', views.index, name='members'),
|
||||||
path('<str:filter>', views.members_view),
|
path('<str:filter>', views.members_view),
|
||||||
path('jobs/<str:slug>', views.jobs_view),
|
]
|
||||||
path('member/<str:member_name>', views.profile_view, name='member'),
|
|
||||||
|
member_urlpatterns = [
|
||||||
|
path('<str:member_name>', views.profile_view, name='member'),
|
||||||
|
]
|
||||||
|
|
||||||
|
jobs_urlpatterns = [
|
||||||
|
path('<str:slug>', views.jobs_view, name='jobs'),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
# from django.test import TestCase
|
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
# from django.test import TestCase
|
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
{% extends "admin/app_index.html" %}
|
|
||||||
|
|
||||||
{% block sidebar %}
|
|
||||||
<h1>Hello</h1>
|
|
||||||
<ul><li>asdf</li></ul>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{% extends "admin/change_list.html" %}
|
|
||||||
|
|
||||||
{% block object-tools-items %}
|
|
||||||
|
|
||||||
{{ block.super }}
|
|
||||||
<li><a href="#">sdf</a></li>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
{% extends "admin/base_site.html" %}
|
|
||||||
{% block content %}
|
|
||||||
<h1> Preview </h1>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,7 +1 @@
|
|||||||
{% extends "admin/index.html" %}
|
{% extends "admin/index.html" %}
|
||||||
{% block content%}
|
|
||||||
<div style="float:left; width:100%">
|
|
||||||
{{block.super}}
|
|
||||||
Hello
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -48,19 +48,19 @@ footer {
|
|||||||
<div class="top-bar-right">
|
<div class="top-bar-right">
|
||||||
<ul class="dropdown vertical medium-horizontal menu" data-responsive-menu="drilldown medium-dropdown" data-animate-heigt="true">
|
<ul class="dropdown vertical medium-horizontal menu" data-responsive-menu="drilldown medium-dropdown" data-animate-heigt="true">
|
||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated %}
|
||||||
<li class=""><a role="menuitem" style="color: black; background: lightgrey">Hallo {{request.user.username}}</a></li>
|
<li><a role="menuitem" style="color: black; background: lightgrey">Hallo {{request.user.username}}</a></li>
|
||||||
<li class=""><a href="/admin" style="background: lightgrey;">Admin</a></li>
|
<li><a href="/admin" style="background: lightgrey;">Admin</a></li>
|
||||||
<li class=""><a href="{%url 'tasks'%}" style="background: lightgrey;">Tasks</a></li>
|
<li><a href="{%url 'tasks'%}" style="background: lightgrey;">Tasks</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li class=""><a href="{% url 'posts.index' %}">Aktuelles</a></li>
|
<li><a href="{% url 'posts.index' %}">Aktuelles</a></li>
|
||||||
<!-- show active members first -->
|
<!-- show active members first -->
|
||||||
<li class=""><a href="{% url 'members'%}A">Fachschaft</a></li>
|
<li><a href="{% url 'members'%}A">Fachschaft</a></li>
|
||||||
<li class=""><a href="/fotos/">Fotos</a></li>
|
<li><a href="/fotos/">Fotos</a></li>
|
||||||
<li class=""><a href="/blackboard">Blackboard</a></li>
|
<li><a href="/blackboard">Blackboard</a></li>
|
||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated %}
|
||||||
<li class=""><a href="{%url 'logout'%}">Logout</a></li>
|
<li><a href="{%url 'logout'%}">Logout</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class=""><a href="{%url 'login'%}">Login</a></li>
|
<li><a href="{%url 'login'%}">Login</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
{% for job in pinned_job_groups %}
|
{% for job in pinned_job_groups %}
|
||||||
<div class="cell large-2 medium-4 small-6">
|
<div class="cell large-2 medium-4 small-6">
|
||||||
<a class="button expanded {% if job.slug in request.path %} active {% endif %}" href="/members/jobs/{{job.slug}}">
|
<a class="button expanded {% if job.slug in request.path %} active {% endif %}" href="{% url 'jobs' job.slug %}">
|
||||||
{{job.name}}
|
{{job.name}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
{% for job in unpinned_job_groups %}
|
{% for job in unpinned_job_groups %}
|
||||||
<div class="cell large-2 medium-4 small-6">
|
<div class="cell large-2 medium-4 small-6">
|
||||||
<a class="button expanded {% if job.slug in request.path %} active {% endif %}" href="/members/jobs/{{job.slug}}">
|
<a class="button expanded {% if job.slug in request.path %} active {% endif %}" href="{% url 'jobs' job.slug %}">
|
||||||
{{ job.name|softhyphen|safe }}
|
{{ job.name|softhyphen|safe }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{# only thumb and name of member #}
|
{# only thumb and name of member #}
|
||||||
<a class="thumbnail member-thumb" href="/members/member/{{member.nickname}}" style="width:150px;height:150px">
|
<a class="thumbnail member-thumb" href="{% url 'member' member.nickname %}" style="width:150px;height:150px">
|
||||||
<img src="{{member.image.thumb.url}}" alt="" />
|
<img src="{{member.image.thumb.url}}" alt="" />
|
||||||
<div class="thumb-layer">
|
<div class="thumb-layer">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user