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
76011664
Commit
76011664
authored
Oct 17, 2017
by
KUNAL GOYAL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
incomplete institute login
parent
7ad61144
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
1 deletion
+41
-1
project/.DS_Store
project/.DS_Store
+0
-0
project/__pycache__/alloc.cpython-36.pyc
project/__pycache__/alloc.cpython-36.pyc
+0
-0
project/allocation/__pycache__/urls.cpython-36.pyc
project/allocation/__pycache__/urls.cpython-36.pyc
+0
-0
project/allocation/__pycache__/views.cpython-36.pyc
project/allocation/__pycache__/views.cpython-36.pyc
+0
-0
project/allocation/templates/allocation/admin1.html
project/allocation/templates/allocation/admin1.html
+20
-0
project/allocation/templates/allocation/index.html
project/allocation/templates/allocation/index.html
+5
-1
project/allocation/urls.py
project/allocation/urls.py
+3
-0
project/allocation/views.py
project/allocation/views.py
+13
-0
project/db.sqlite3
project/db.sqlite3
+0
-0
No files found.
project/.DS_Store
View file @
76011664
No preview for this file type
project/__pycache__/alloc.cpython-36.pyc
0 → 100644
View file @
76011664
File added
project/allocation/__pycache__/urls.cpython-36.pyc
View file @
76011664
No preview for this file type
project/allocation/__pycache__/views.cpython-36.pyc
View file @
76011664
No preview for this file type
project/allocation/templates/allocation/admin1.html
0 → 100644
View file @
76011664
{% extends "admin/base.html" %}
{% load i18n admin_urls static admin_list %}
{% block branding %}
<h1
id=
"site-name"
>
Institute Homepage
</h1>
{% endblock %}
{% block welcome-msg %}
{% trans 'Welcome,' %}
<!-- <strong>{{ university.name }}</strong>. -->
{% endblock %}
{% block userlinks %}
{% if user.has_usable_password %}
<a
href=
"{% url 'admin:password_change' %}"
>
{% trans 'Change password' %}
</a>
/
{% endif %}
<a
href=
"{% url 'admin:logout' %}"
>
{% trans 'Log out' %}
</a>
{% endblock %}
{% block content %}
<h1></h1>
{% endblock %}
\ No newline at end of file
project/allocation/templates/allocation/index.html
View file @
76011664
...
...
@@ -43,7 +43,11 @@
</p>
{% endif %}
<p>
<b>
Name:
</b>
{{applicant.name}}
<br>
<b>
Rank:
</b>
{{applicant.rank}}
<b>
Rank:
</b>
{{applicant.rank}}
<br>
<b>
Allocated choice:
</b>
{% for choice in applicant.alloted_choice.all %}
{{choice}}
{% endfor %}
</p>
<form
action=
"/allocation/submit"
method=
"post"
>
{% csrf_token %}
...
...
project/allocation/urls.py
View file @
76011664
...
...
@@ -7,6 +7,9 @@ app_name = 'allocation'
urlpatterns
=
[
url
(
r'^$'
,
views
.
index
,
name
=
'index'
),
url
(
r'^submit$'
,
views
.
submit
,
name
=
'submit'
),
url
(
r'^admin$'
,
views
.
admin1
,
name
=
'admin1'
),
url
(
r'^admin/choices$'
,
views
.
ChoiceListView
,
name
=
'choice_list'
),
url
(
r'^admin/applicants$'
,
views
.
ApplicantListView
,
name
=
'applicant_list'
),
#url(r'^login/$', auth_views.login,name='login'),
#url(r'^logout/$', auth_views.logout, name='logout1'),
]
\ No newline at end of file
project/allocation/views.py
View file @
76011664
...
...
@@ -7,6 +7,7 @@ from allocation.models import Applicant,Application,Choice
#from allocation.forms import PreferenceForm
from
django.forms
import
modelform_factory
from
django.forms
import
modelformset_factory
from
django.views
import
generic
# @login_required(login_url='/admin/login')
# def index(request): #for /allocation
...
...
@@ -49,6 +50,18 @@ def submit(request):
instances
=
formset
.
save
()
return
HttpResponse
(
"successful"
)
def
admin1
(
request
):
return
render
(
request
,
'allocation/admin1.html'
)
class
ChoiceListView
(
generic
.
ListView
):
model
=
Choice
class
ApplicantListView
(
generic
.
ListView
):
model
=
Applicant
...
...
project/db.sqlite3
View file @
76011664
No preview for this file type
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