Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rezultati izpita, baza stuff, slovenjenje

  • Loading branch information...
commit f26420bda5045f911366c3a110919ef66bea4048 1 parent 9af2209
@HairyFotr HairyFotr authored
View
7 estudentDjango/codelist/models.py
@@ -3,6 +3,7 @@
from django.utils.translation import ugettext as _
from settings import PROJECT_PATH
from urllib import urlopen, urlencode
+from django.db.transaction import commit_on_success # pohitri insert
import os
@@ -20,10 +21,8 @@ class Meta:
def __unicode__(self):
return self.descriptor
-
-
-
@classmethod
+ @commit_on_success
def updateAll(cls):
UPDATE_URL = 'http://www.stat.si/klasje/tabela.aspx?CVN=3888'
@@ -90,6 +89,7 @@ def __unicode__(self):
return self.descriptor
@classmethod
+ @commit_on_success
def updateAll(cls):
UPDATE_FILE = os.path.join(PROJECT_PATH, 'poste.txt')
@@ -120,6 +120,7 @@ def __unicode__(self):
return self.descriptor
@classmethod
+ @commit_on_success
def updateAll(cls):
UPDATE_FILE = os.path.join(PROJECT_PATH, 'obcine.txt')
View
BIN  estudentDjango/locale/sl/LC_MESSAGES/django.mo
Binary file not shown
View
172 estudentDjango/locale/sl/LC_MESSAGES/django.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-04-17 01:22+0200\n"
+"POT-Creation-Date: 2012-04-17 22:41+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -43,164 +43,168 @@ msgstr "Avtentikacija"
msgid "auth"
msgstr "avtentikacija"
-#: codelist/admin.py:19
+#: codelist/admin.py:33
msgid "Countries added successfully"
msgstr "Države so bile uspešno dodane"
-#: codelist/admin.py:49
+#: codelist/admin.py:63
msgid "Study Programs added successfully"
msgstr "Študijski programi so bili uspešno dodani"
-#: codelist/admin.py:79
+#: codelist/admin.py:93
msgid "Post added successfully"
msgstr "Pošte so bile uspešno dodane"
-#: codelist/admin.py:109
+#: codelist/admin.py:123
msgid "Region added successfully"
msgstr "Občine so bile uspešno dodane"
-#: codelist/admin.py:136
+#: codelist/admin.py:150
msgid "Faculty added successfully"
msgstr "Fakultete so bile uspešno dodane"
-#: codelist/admin.py:162
+#: codelist/admin.py:176
msgid "Course added successfully"
msgstr "Predmeti so bile uspešno dodane"
-#: codelist/admin.py:189
+#: codelist/admin.py:203
msgid "Instructor added successfully"
msgstr "Predavatelji so bili uspešno dodani"
-#: codelist/models.py:11
+#: codelist/models.py:12
msgid "country code"
msgstr "Šifra države"
-#: codelist/models.py:12
+#: codelist/models.py:13
msgid "country name"
msgstr "Naziv države"
-#: codelist/models.py:13
+#: codelist/models.py:14
msgid "country name original"
msgstr "Naziv v angleščini"
-#: codelist/models.py:14 codelist/models.py:50 codelist/models.py:80
-#: codelist/models.py:110 codelist/models.py:139 codelist/models.py:163
-#: codelist/models.py:203
+#: codelist/models.py:15 codelist/models.py:52 codelist/models.py:82
+#: codelist/models.py:113 codelist/models.py:143 codelist/models.py:167
+#: codelist/models.py:207
msgid "valid"
msgstr "veljavno"
-#: codelist/models.py:17
+#: codelist/models.py:18
msgid "countries"
msgstr "države"
-#: codelist/models.py:18 student/models.py:36
+#: codelist/models.py:19 student/models.py:74
msgid "country"
msgstr "državo"
-#: codelist/models.py:48
+#: codelist/models.py:50
msgid "program code"
msgstr "Koda studijskega programa"
-#: codelist/models.py:49
+#: codelist/models.py:51
msgid "program name"
msgstr "Ime študijskega"
-#: codelist/models.py:53
+#: codelist/models.py:55
msgid "study programs"
msgstr "Študijski programi"
-#: codelist/models.py:54 student/models.py:44
+#: codelist/models.py:56 student/models.py:85
msgid "study program"
msgstr "Študijski program"
-#: codelist/models.py:78
+#: codelist/models.py:80
msgid "post code"
msgstr "Poštna številka"
-#: codelist/models.py:79
+#: codelist/models.py:81
msgid "post name"
msgstr "Naziv pošte"
-#: codelist/models.py:83
+#: codelist/models.py:85
msgid "posts"
msgstr "pošte"
-#: codelist/models.py:84
+#: codelist/models.py:86 student/models.py:73
msgid "post"
msgstr "pošto"
-#: codelist/models.py:108
+#: codelist/models.py:111
msgid "region code"
msgstr "Šifra Občine"
-#: codelist/models.py:109
+#: codelist/models.py:112
msgid "region name"
msgstr "Ime občine"
-#: codelist/models.py:113
+#: codelist/models.py:116
msgid "regions"
msgstr "občine"
-#: codelist/models.py:114
+#: codelist/models.py:117 student/models.py:72
msgid "region"
msgstr "občina"
-#: codelist/models.py:137
+#: codelist/models.py:141
msgid "faculty code"
msgstr "Šifra fakultete"
-#: codelist/models.py:138
+#: codelist/models.py:142
msgid "faculty name"
msgstr "Naziv fakultete"
-#: codelist/models.py:142
+#: codelist/models.py:146
msgid "faculties"
msgstr "fakultete"
-#: codelist/models.py:143
+#: codelist/models.py:147
msgid "faculty"
msgstr "fakulteta"
-#: codelist/models.py:157
+#: codelist/models.py:161
msgid "course code"
msgstr "Šifra predmeta"
-#: codelist/models.py:158
+#: codelist/models.py:162
msgid "course name"
msgstr "Naziv predmeta"
-#: codelist/models.py:159 codelist/models.py:229
+#: codelist/models.py:163 codelist/models.py:233
msgid "instructors"
msgstr "predavatelji"
-#: codelist/models.py:162
+#: codelist/models.py:166
msgid "course type"
msgstr "Tip predmeta"
-#: codelist/models.py:196 codelist/models.py:204
+#: codelist/models.py:200 codelist/models.py:208
msgid "courses"
msgstr "Predmeti"
-#: codelist/models.py:197 student/models.py:50
+#: codelist/models.py:201 student/models.py:111
msgid "course"
msgstr "Predmet"
-#: codelist/models.py:200
+#: codelist/models.py:204
msgid "instructor code"
msgstr "Šifra Predavatelja"
-#: codelist/models.py:201 student/models.py:9
+#: codelist/models.py:205 student/models.py:21
msgid "name"
msgstr "ime"
-#: codelist/models.py:202 student/models.py:10
+#: codelist/models.py:206 student/models.py:22
msgid "surname"
msgstr "priimek"
-#: codelist/models.py:230 student/models.py:51
+#: codelist/models.py:234 student/models.py:112
msgid "instructor"
msgstr "predavatelj"
+#: failedloginblocker/__init__.py:14
+msgid "Failedloginblocker"
+msgstr ""
+
#: failedloginblocker/__init__.py:15 failedloginblocker/__init__.py:19
msgid "Failed attempts"
msgstr "Poskusi prijave"
@@ -225,58 +229,106 @@ msgstr "Zadnji ponesrečen poskus"
msgid "Student"
msgstr "Študent"
-#: student/__init__.py:3 student/models.py:32 student/models.py:43
+#: student/__init__.py:3 student/models.py:45 student/models.py:84
msgid "student"
msgstr "študent"
-#: student/models.py:8
+#: student/models.py:20
msgid "enrollment number"
msgstr "vpisna številka"
-#: student/models.py:11
+#: student/models.py:23
msgid "social security number"
msgstr "EMŠO"
-#: student/models.py:12
+#: student/models.py:24
msgid "tax number"
msgstr "davčna številka"
-#: student/models.py:13 student/models.py:40
-msgid "address"
-msgstr "Naslov stalnega bivališča"
-
-#: student/models.py:14
-msgid "temporary address"
-msgstr "Naslov začasnega bivališča"
+#: student/models.py:25
+msgid "email"
+msgstr "email"
-#: student/models.py:16
+#: student/models.py:26
msgid "password"
msgstr "geslo"
-#: student/models.py:31
+#: student/models.py:44
msgid "students"
msgstr "študent"
-#: student/models.py:35
+#: student/models.py:53
+msgid "male"
+msgstr "Moški"
+
+#: student/models.py:54
+msgid "female"
+msgstr "Ženski"
+
+#: student/models.py:57
+msgid "gender"
+msgstr "Spol"
+
+#: student/models.py:58
+msgid "date of birth"
+msgstr "Rojstni datum"
+
+#: student/models.py:59
+msgid "country of birth"
+msgstr "Država rojstva"
+
+#: student/models.py:60
+msgid "place of birth"
+msgstr "Kraj rojstva"
+
+#: student/models.py:61
+msgid "region of birth"
+msgstr "Pokrajina rojstva"
+
+#: student/models.py:68
+msgid "permanent address"
+msgstr "Naslov stalnega bivališča"
+
+#: student/models.py:69
+msgid "temporary address"
+msgstr "Naslov začasnega bivališča"
+
+#: student/models.py:71
msgid "street"
msgstr "Ulica (naselje) in hišna številka"
-#: student/models.py:39
+#: student/models.py:77
+msgid "send address"
+msgstr "Naslov za pošiljanje"
+
+#: student/models.py:80
msgid "addresses"
msgstr "Naslovi"
-#: student/models.py:46 student/models.py:47
+#: student/models.py:81
+msgid "address"
+msgstr "Naslov stalnega bivališča"
+
+#: student/models.py:105 student/models.py:106
msgid "enrollment"
msgstr "vpis"
-#: student/models.py:58
+#: student/models.py:120
msgid "exam dates"
msgstr "Izpitni roki"
-#: student/models.py:59
+#: student/models.py:121
msgid "exam date"
msgstr "izpitni rok"
+#: student/models.py:146
+msgid "exam results"
+msgstr "Rezultati rokov"
+
+#: student/models.py:147
+msgid "exam result"
+msgstr "rezultat roka"
+
#: templates/admin/404.html:4 templates/admin/404.html.py:8
msgid "Page not found"
msgstr ""
View
9 estudentDjango/startserver.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [ "$1" == "db" ]
+then
+ rm student.db
+ python manage.py syncdb
+fi
+
+python manage.py runserver
View
1  estudentDjango/student/admin.py
@@ -31,3 +31,4 @@ class EnrollmentAdmin(admin.ModelAdmin):
admin.site.register(Address)
admin.site.register(Enrollment, EnrollmentAdmin)
admin.site.register(ExamDate)
+admin.site.register(ExamResult)
View
33 estudentDjango/student/models.py
@@ -17,7 +17,6 @@ def generateEnrollment(): #@NoSelf
else:
return
-
enrollment_number = models.IntegerField(_("enrollment number"), primary_key=True, unique=True, default=generateEnrollment)
name = models.CharField(_(_("name")), max_length=255)
surname = models.CharField(_("surname"), max_length=255)
@@ -26,6 +25,9 @@ def generateEnrollment(): #@NoSelf
email = models.EmailField(_("email"), max_length=255)
password = models.CharField(_('password'), max_length=128, blank = True, null = True)
+ courses = models.ManyToManyField("codelist.Course")
+ program = models.OneToOneField("codelist.StudyProgram")
+
def save(self, *args, **kwargs):
self.password = get_hexdigest(ALGO, "sssalt", self.password)
super(Student, self).save(*args, **kwargs)
@@ -109,6 +111,7 @@ class ExamDate(models.Model):
course = models.ForeignKey("codelist.Course", related_name=("course"), verbose_name = _("course"))
instructor = models.OneToOneField("codelist.Instructor", verbose_name=_("instructor"))
date = models.DateField();
+ students = models.ManyToManyField('Student', blank=True)
def __unicode__(self):
return str(self.date) + ' ' + str(self.course)
@@ -117,4 +120,32 @@ class Meta:
verbose_name_plural = _("exam dates")
verbose_name = _("exam date")
+class ExamResult(models.Model):
+ exam = models.OneToOneField('ExamDate')
+ student = models.OneToOneField('Student')
+ RESULTS = (
+ ('NR', 'Ni rezultatov'),
+ ('VP', 'Vrnjena prijava'),
+ ('1', 'nezadostno 1'),
+ ('2', 'nezadostno 2'),
+ ('3', 'nezadostno 3'),
+ ('4', 'nezadostno 4'),
+ ('5', 'nezadostno 5'),
+ ('6', 'zadostno 6'),
+ ('7', 'dobro 7'),
+ ('8', 'prav dobro 8'),
+ ('9', 'odlicno 9'),
+ ('10', 'odlicno 10'),
+ )
+ result = models.CharField(max_length=2, choices=RESULTS, default='NR')
+
+ def __unicode__(self):
+ return str(self.exam.date) + ' ' + str(self.student) + ' (' + str(self.result) + ')'
+
+ class Meta:
+ verbose_name_plural = _("exam results")
+ verbose_name = _("exam result")
+
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.