Skip to content

Commit

Permalink
copy members to previous members in index page
Browse files Browse the repository at this point in the history
  • Loading branch information
Shora Senfi committed Jun 17, 2019
1 parent 8451a2d commit c9d5c42
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 13 deletions.
12 changes: 12 additions & 0 deletions apps/base/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,18 @@ <h4 class="modal-title ml-auto">
</button>

</div>
<div class="modal-body">
<h4>دوره&zwnj;ی ۹۷-۹۸ </h4>
<ul>
<li>حورا ابوطالبی <span class="text-muted">دبیر</span></li>
<li>رسول قاسمی <span class="text-muted">نایب دبیر - ورزش</span></li>
<li>هدی ترابی <span class="text-muted">روابط عمومی</span></li>
<li>امین عیسائی <span class="text-muted">آموزش</span></li>
<li>پارسا صلواتی <span class="text-muted">فنی - مالی و اموال</span></li>
<li>علی بابایی <span class="text-muted">تأسیسات</span></li>
</ul>
</div>

<div class="modal-body">
<h4>دوره&zwnj;ی ۹۶-۹۷ </h4>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion apps/course/management/commands/updatecourses.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def create_course(course_name, course_number):

class Command(BaseCommand):
def handle(self, *args, **options):
url = "http://term.inator.ir/courses/list/38/"
url = "kttp://term.inator.ir/courses/list/38/"
data = urlopen(url)
courses_list = json.loads(data.read().decode('utf8'))

Expand Down
6 changes: 5 additions & 1 deletion apps/locker/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@

# Create your models here.
class rack(models.Model):
CONDITION = Choices((0, 'available'),
(1, 'unavailable'),
)
name = models.CharField(max_length=3)
receiver = models.ForeignKey(Member,blank=True,null=True, on_delete=models.CASCADE)
payment = models.BooleanField(default=False)
receivie_date = models.DateTimeField(auto_now_add=True)
condition = models.BooleanField(default=True)
condition = models.PositiveSmallIntegerField(choices=CONDITION,
default=0)
def __str__(self):
return self.name
class sell(models.Model):
Expand Down
21 changes: 10 additions & 11 deletions apps/locker/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,16 @@ def calculate_difference(x,y):
@login_required
def lock(request):
theRacks = rack.objects.filter(receiver=request.user)
broken_lockers = ['A23', 'A42', 'B13', 'B22', 'B23', 'B32', 'B41', 'C21',
'C41', 'D11', 'D12', 'D23', 'E11', 'E12', 'E13', 'E21', 'E22',
'E41', 'E42', 'F11', 'F12', 'F13', 'F21', 'F23', 'F32', 'F41',
'F42', 'F43', 'G11', 'G12', 'G13', 'G22', 'G41', 'G42', 'G43',
'H11', 'H12', 'H23', 'H33', 'H42', 'I23', 'I33', 'J11', 'J12',
'J13', 'J21', 'J23', 'J41', 'K11', 'K12', 'K21', 'K22', 'K23',
'K32', 'L13', 'L22', 'L31', 'L32', 'L33', 'L42', 'L43', 'O11',
'O12', 'O13', 'O21', 'O31', 'O33', 'N13', 'N21', 'N22', 'N23',
'N32', 'N33', 'N41', 'Q11', 'Q12', 'Q21', 'Q22', 'Q31', 'Q32',
'Q33', 'Q41', 'Q42', 'P13', 'P21', 'P22', 'P23', 'P31', 'P33',
'P42', 'P43',]
broken_lockers = ['A42', 'B23', 'B41',
'D11',
'F42', 'G12', 'G22', 'G42', 'G43',
'H12', 'J12',
'K23',
'K32', 'K42',
'O13', 'N22',
'N32', 'N41', 'Q21',
'P13', 'P22', 'P23', 'P31',
]
racks = rack.objects.all()
for track in racks:
if sell.objects.filter(locker=track):
Expand Down
9 changes: 9 additions & 0 deletions gunicorn.conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from __future__ import unicode_literals
import multiprocessing

bind = "unix:/home/shora/website-django/gunicorn.sock"
workers = 4
errorlog = "/home/shora/logs/shora_gunicorn.log"
loglevel = "debug"
proc_name = "shora"

17 changes: 17 additions & 0 deletions wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
WSGI config for website-django 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/1.11/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "shora.settings")

application = get_wsgi_application()

0 comments on commit c9d5c42

Please sign in to comment.