Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
General_Allocation_Portal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
codemafia
General_Allocation_Portal
Commits
f2b74fa1
Commit
f2b74fa1
authored
Oct 21, 2017
by
amanjain2898@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allocate-button
parent
0d405535
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
98 additions
and
11 deletions
+98
-11
project/__pycache__/alloc.cpython-35.pyc
project/__pycache__/alloc.cpython-35.pyc
+0
-0
project/allocation/__pycache__/urls.cpython-35.pyc
project/allocation/__pycache__/urls.cpython-35.pyc
+0
-0
project/allocation/__pycache__/views.cpython-35.pyc
project/allocation/__pycache__/views.cpython-35.pyc
+0
-0
project/allocation/static/allocation/BG.png
project/allocation/static/allocation/BG.png
+0
-0
project/allocation/static/allocation/home_page.css
project/allocation/static/allocation/home_page.css
+44
-0
project/allocation/static/allocation/logo.png
project/allocation/static/allocation/logo.png
+0
-0
project/allocation/templatetags/__init__.py
project/allocation/templatetags/__init__.py
+0
-0
project/allocation/templatetags/__pycache__/__init__.cpython-35.pyc
...location/templatetags/__pycache__/__init__.cpython-35.pyc
+0
-0
project/allocation/templatetags/__pycache__/tag.cpython-35.pyc
...ct/allocation/templatetags/__pycache__/tag.cpython-35.pyc
+0
-0
project/allocation/templatetags/tag.py
project/allocation/templatetags/tag.py
+8
-0
project/allocation/urls.py
project/allocation/urls.py
+1
-1
project/allocation/views.py
project/allocation/views.py
+7
-7
project/db.sqlite3
project/db.sqlite3
+0
-0
project/templates/admin/change_form.html
project/templates/admin/change_form.html
+23
-0
project/templates/admin/change_list.html
project/templates/admin/change_list.html
+11
-0
project/templates/core/home_page.html
project/templates/core/home_page.html
+4
-3
No files found.
project/__pycache__/alloc.cpython-35.pyc
0 → 100644
View file @
f2b74fa1
File added
project/allocation/__pycache__/urls.cpython-35.pyc
View file @
f2b74fa1
No preview for this file type
project/allocation/__pycache__/views.cpython-35.pyc
View file @
f2b74fa1
No preview for this file type
project/allocation/static/allocation/BG.png
0 → 100644
View file @
f2b74fa1
372 KB
project/allocation/static/allocation/home_page.css
0 → 100644
View file @
f2b74fa1
.container
{
position
:
relative
;
}
.container
{
content
:
""
;
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
/*z-index: 1;*/
background-image
:
url('BG.png')
;
/*background-size: 2000px 700px;*/
background-size
:
100%
75%
;
background-repeat
:
no-repeat
;
background-attachment
:
fixed
;
opacity
:
0.60
;
}
.content
{
position
:
relative
;
margin-top
:
300px
;
font-size
:
60px
;
opacity
:
20
;
}
.tool1
{
margin-top
:
680px
;
background-color
:
green
;
}
.tool2
{
margin-top
:
700px
;
background-color
:
#5DBCD2
;
}
.tool3
{
margin-top
:
720px
;
background-color
:
#5DBCD2
;
}
.tool4
{
margin-top
:
720px
;
background-color
:
#5DBCD2
;
}
\ No newline at end of file
project/allocation/static/allocation/logo.png
0 → 100644
View file @
f2b74fa1
10.9 KB
project/allocation/templatetags/__init__.py
0 → 100644
View file @
f2b74fa1
project/allocation/templatetags/__pycache__/__init__.cpython-35.pyc
0 → 100644
View file @
f2b74fa1
File added
project/allocation/templatetags/__pycache__/tag.cpython-35.pyc
0 → 100644
View file @
f2b74fa1
File added
project/allocation/templatetags/tag.py
0 → 100644
View file @
f2b74fa1
from
django
import
template
register
=
template
.
Library
()
@
register
.
assignment_tag
def
hello_world
(
name
):
value
=
name
.
split
(
'/'
)[
-
4
]
if
value
==
"institute"
:
return
True
;
return
False
\ No newline at end of file
project/allocation/urls.py
View file @
f2b74fa1
...
...
@@ -10,7 +10,7 @@ urlpatterns = [
url
(
r'^admin$'
,
views
.
admin1
,
name
=
'admin1'
),
url
(
r'^import_db$'
,
views
.
import_db
,
name
=
'import_db1'
),
url
(
r'^applicant_make$'
,
views
.
applicant_make
,
name
=
'applicant_make'
),
url
(
r'^button_action$'
,
views
.
button_action
,
name
=
'button_action'
),
#url(r'^admin/choices$', views.ChoiceListView.as_view(), name='choice_list'),
#url(r'^admin/applicants$', views.ApplicantListView.as_view(), name='applicant_list'),
#url(r'^login/$', auth_views.login,name='login'),
...
...
project/allocation/views.py
View file @
f2b74fa1
...
...
@@ -7,7 +7,6 @@ from allocation.models import *
from
django.forms
import
modelform_factory
from
django.forms
import
modelformset_factory
from
django.views
import
generic
from
allocation.models
import
Choice
from
allocation.models
import
Applicant
from
django.shortcuts
import
render
,
redirect
...
...
@@ -15,6 +14,7 @@ from django.conf import settings
from
django.core.files.storage
import
FileSystemStorage
from
django.contrib.auth
import
authenticate
,
login
from
django
import
forms
from
alloc
import
*
import
csv
# @login_required(login_url='/admin/login')
# def index(request): #for /allocation
...
...
@@ -25,16 +25,16 @@ import csv
# form = ArticleForm(instance=applicant)
# return render(request, 'allocation/index.html', {'applicant': applicant, 'form': form})
def
index
(
request
):
return
HttpResponse
(
"Hello, world. You're at the allocation index."
)
def
index1
(
request
):
return
render
(
request
,
'core/home_page.html'
)
def
home
(
request
):
documents
=
Document
.
objects
.
all
()
return
render
(
request
,
'core/home.html'
,
{
'documents'
:
documents
})
return
HttpResponse
(
"On home"
)
def
button_action
(
request
):
value
=
request
.
POST
[
"prikey"
]
value
=
int
(
value
.
split
(
'/'
)[
-
3
])
name
=
Institute
.
objects
.
get
(
pk
=
value
)
.
name
allocator
(
name
)
return
HttpResponse
(
"success"
)
def
import_db
(
request
):
if
request
.
method
==
"POST"
:
...
...
project/db.sqlite3
View file @
f2b74fa1
No preview for this file type
project/templates/admin/change_form.html
0 → 100644
View file @
f2b74fa1
{% extends "admin/change_form.html" %}
{% load i18n %}
{% load tag %}
{% block object-tools-items %}
{{ block.super }}
{% hello_world request.get_full_path as name %}
{% if name == True %}
<li>
<form
method=
"POST"
action=
"/allocation/button_action"
enctype=
"multipart/form-data"
>
{% csrf_token %}
<input
type=
"hidden"
name=
"prikey"
value=
"{{ request.get_full_path }}"
>
<button
type=
"submit"
>
Allocate
</button>
</form>
</li>
{% endif %}
{% endblock %}
\ No newline at end of file
project/templates/admin/change_list.html
View file @
f2b74fa1
...
...
@@ -26,4 +26,15 @@
{% endif %}
<!-- {% if request.get_full_path == "/admin/allocation/institute/1/change/" %}
<li>
<form method="POST" action="/allocation/button_action" enctype="multipart/form-data">
{% csrf_token %}
<button type="submit"> Allocate</button>
</form>
</li>
{% endif %} -->
{% endblock %}
project/templates/core/home_page.html
View file @
f2b74fa1
{% load static %}
<html>
<head>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
allocation/home_page.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
{% static 'allocation/home_page.css' %}"
/
>
</head>
<body>
<table
>
<tr>
<td
rowspan=
"2"
><a
class=
"logoText"
><img
src=
"
logo.png"
width=
"150"
height=
"150
"
alt=
"logo"
></a></td>
<td
rowspan=
"2"
><a
class=
"logoText"
><img
src=
"
{% static 'allocation/logo.png' %}"
width=
"100%"
height=
"100%
"
alt=
"logo"
></a></td>
<td
style=
"vertical-align: bottom; padding-left:5px; padding-bottom: 2px; font-size: 20px"
><a
class=
"logoText"
><B>
codeMAFIA
</B></a></td>
</tr>
<tr>
...
...
@@ -17,7 +18,7 @@
<div
class=
"content"
><h1
align=
"center"
style=
"color:black"
>
General Allocation Portal
</h1></div>
</div>
<div
class=
"tool1"
style=
"margin-top:
57
0px; text-align: center; font-size: 30px;"
>
<div
class=
"tool1"
style=
"margin-top:
46
0px; text-align: center; font-size: 30px;"
>
</div>
<div
class=
"tool2"
style=
"margin-top: 10px; text-align: center; font-size: 50px; color: white"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment