Commit 020e7aaf authored by Rafal's avatar Rafal

new dashboard

parent 2e993074
...@@ -46,9 +46,9 @@ INSTALLED_APPS = ( ...@@ -46,9 +46,9 @@ INSTALLED_APPS = (
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', # 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware', # 'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware', # 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware',
) )
...@@ -57,7 +57,7 @@ REST_FRAMEWORK = { ...@@ -57,7 +57,7 @@ REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.AllowAny',), 'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.AllowAny',),
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',), 'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',),
'DEFAULT_AUTHENTICATION_CLASSES': ( 'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.SessionAuthentication', # 'rest_framework.authentication.SessionAuthentication',
), ),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
'PAGE_SIZE': 10 'PAGE_SIZE': 10
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<div class="modal-body" id="modal-content"> <div class="modal-body" id="modal-content">
<form action="/login/" method="post" class="form-signin"> <form action="/login/" method="post" class="form-signin">
{% csrf_token %}
<input type="text" class="form-control" placeholder="Nazwa projektu" required autofocus name="name"> <input type="text" class="form-control" placeholder="Nazwa projektu" required autofocus name="name">
<textarea class="form-control" type="description" id="article_content" name="content" placeholder="Zawartosc" maxlength="140" rows="7"></textarea> <textarea class="form-control" type="description" id="article_content" name="content" placeholder="Zawartosc" maxlength="140" rows="7"></textarea>
</form> </form>
......
...@@ -151,7 +151,7 @@ def main_page(request): ...@@ -151,7 +151,7 @@ def main_page(request):
def dashboard(request): def dashboard(request):
context = RequestContext(request) context = RequestContext(request)
user_projects = UserProject.objects.filter(author = request.user) user_projects = UserProject.objects.filter(author=request.user)
data = {} data = {}
data['user_projects'] = user_projects data['user_projects'] = user_projects
data['user_id'] = request.user.id data['user_id'] = request.user.id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment