diff --git a/apps/base/templates/index.html b/apps/base/templates/index.html
index 91b00fb..bbc8f45 100644
--- a/apps/base/templates/index.html
+++ b/apps/base/templates/index.html
@@ -181,6 +181,18 @@
+
+
دورهی ۹۷-۹۸
+
+ - حورا ابوطالبی دبیر
+ - رسول قاسمی نایب دبیر - ورزش
+ - هدی ترابی روابط عمومی
+ - امین عیسائی آموزش
+ - پارسا صلواتی فنی - مالی و اموال
+ - علی بابایی تأسیسات
+
+
+
دورهی ۹۶-۹۷
diff --git a/apps/course/management/commands/updatecourses.py b/apps/course/management/commands/updatecourses.py
index db9a9a0..ac8aa0f 100755
--- a/apps/course/management/commands/updatecourses.py
+++ b/apps/course/management/commands/updatecourses.py
@@ -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'))
diff --git a/apps/locker/models.py b/apps/locker/models.py
index 1858570..ef36538 100644
--- a/apps/locker/models.py
+++ b/apps/locker/models.py
@@ -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):
diff --git a/apps/locker/views.py b/apps/locker/views.py
index b695992..1448f15 100644
--- a/apps/locker/views.py
+++ b/apps/locker/views.py
@@ -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):
diff --git a/gunicorn.conf.py b/gunicorn.conf.py
new file mode 100644
index 0000000..934542c
--- /dev/null
+++ b/gunicorn.conf.py
@@ -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"
+
diff --git a/wsgi.py b/wsgi.py
new file mode 100644
index 0000000..bed0901
--- /dev/null
+++ b/wsgi.py
@@ -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()
+