-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
324ddb0
commit d395da4
Showing
6,093 changed files
with
1,477,698 additions
and
1,591 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
from django.contrib import admin | ||
from .models import Region, University, Specialty, Subject, Variant | ||
|
||
# Register your models here. | ||
admin.site.register(Region) | ||
admin.site.register(University) | ||
admin.site.register(Specialty) | ||
admin.site.register(Subject) | ||
admin.site.register(Variant) |
File renamed without changes.
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Generated by Django 2.1.3 on 2018-11-12 09:31 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Region', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('yandex_id', models.IntegerField(unique=True)), | ||
('name', models.CharField(max_length=128)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Specialty', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('yandex_id', models.IntegerField(unique=True)), | ||
('name', models.CharField(max_length=128)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Subject', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=128)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='University', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('yandex_id', models.IntegerField(unique=True)), | ||
('name', models.CharField(max_length=128)), | ||
('city', models.CharField(default='None', max_length=128)), | ||
('region', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Region')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Variant', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('department', models.CharField(max_length=128, null=True)), | ||
('education_type', models.CharField(max_length=128, null=True)), | ||
('budget_plan', models.IntegerField(null=True)), | ||
('budget_passing_score', models.IntegerField(null=True)), | ||
('paid_plan', models.IntegerField(null=True)), | ||
('paid_passing_score', models.IntegerField(null=True)), | ||
('cost', models.IntegerField(null=True)), | ||
('specialty', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Specialty')), | ||
('subjects', models.ManyToManyField(to='core.Subject')), | ||
('university', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.University')), | ||
], | ||
), | ||
] |
22 changes: 22 additions & 0 deletions
22
server/education/core/migrations/0002_auto_20181120_2054.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 2.1.3 on 2018-11-20 20:54 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='university', | ||
name='city', | ||
), | ||
migrations.AddField( | ||
model_name='university', | ||
name='place', | ||
field=models.IntegerField(default=None), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
server/education/core/migrations/0003_auto_20181120_2054.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.1.3 on 2018-11-20 20:54 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0002_auto_20181120_2054'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='university', | ||
name='place', | ||
field=models.IntegerField(default=None, null=True), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
server/education/core/migrations/0004_auto_20181120_2058.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.1.3 on 2018-11-20 20:58 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0003_auto_20181120_2054'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='university', | ||
name='name', | ||
field=models.CharField(max_length=1024), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
server/education/core/migrations/0005_auto_20181120_2109.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.1.3 on 2018-11-20 21:09 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0004_auto_20181120_2058'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='university', | ||
name='name', | ||
field=models.CharField(default=None, max_length=1024, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.1.3 on 2018-11-20 22:04 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0005_auto_20181120_2109'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='specialty', | ||
name='place', | ||
field=models.IntegerField(default=None, null=True), | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
server/education/core/migrations/0007_auto_20181125_1231.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 2.1.3 on 2018-11-25 12:31 | ||
|
||
import django.contrib.postgres.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0006_specialty_place'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='variant', | ||
name='applicants', | ||
field=django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), default=[], size=None), | ||
), | ||
migrations.AddField( | ||
model_name='variant', | ||
name='rating', | ||
field=models.FloatField(null=True), | ||
), | ||
] |
19 changes: 19 additions & 0 deletions
19
server/education/core/migrations/0008_auto_20181125_1232.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 2.1.3 on 2018-11-25 12:32 | ||
|
||
import django.contrib.postgres.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0007_auto_20181125_1231'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='variant', | ||
name='applicants', | ||
field=django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), default=list, size=None), | ||
), | ||
] |
Binary file added
BIN
+1.54 KB
server/education/core/migrations/__pycache__/0001_initial.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+641 Bytes
server/education/core/migrations/__pycache__/0002_auto_20181120_2054.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+614 Bytes
server/education/core/migrations/__pycache__/0003_auto_20181120_2054.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+608 Bytes
server/education/core/migrations/__pycache__/0004_auto_20181120_2058.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+628 Bytes
server/education/core/migrations/__pycache__/0005_auto_20181120_2109.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+608 Bytes
server/education/core/migrations/__pycache__/0006_specialty_place.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+787 Bytes
server/education/core/migrations/__pycache__/0007_auto_20181125_1231.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+739 Bytes
server/education/core/migrations/__pycache__/0008_auto_20181125_1232.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+171 Bytes
server/education/core/migrations/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,55 @@ | ||
from django.db import models | ||
from django.contrib.postgres.fields import ArrayField | ||
|
||
|
||
class Region(models.Model): | ||
yandex_id = models.IntegerField(unique=True) | ||
name = models.CharField(max_length=128) | ||
|
||
def __str__(self): | ||
return self.name | ||
|
||
|
||
class University(models.Model): | ||
yandex_id = models.IntegerField(unique=True) | ||
name = models.CharField(max_length=1024, default=None, null=True) | ||
place = models.IntegerField(default=None, null=True) | ||
# city = models.CharField(max_length=128, default=None) | ||
region = models.ForeignKey(Region, on_delete=models.CASCADE) | ||
|
||
def __str__(self): | ||
return self.name | ||
|
||
|
||
class Specialty(models.Model): | ||
yandex_id = models.IntegerField(unique=True) | ||
name = models.CharField(max_length=128) | ||
place = models.IntegerField(default=None, null=True) | ||
|
||
def __str__(self): | ||
return self.name | ||
|
||
|
||
class Subject(models.Model): | ||
name = models.CharField(max_length=128) | ||
|
||
def __str__(self): | ||
return self.name | ||
|
||
|
||
class Variant(models.Model): | ||
university = models.ForeignKey(University, on_delete=models.CASCADE) | ||
specialty = models.ForeignKey(Specialty, on_delete=models.CASCADE) | ||
department = models.CharField(max_length=128, null=True) | ||
education_type = models.CharField(max_length=128, null=True) | ||
subjects = models.ManyToManyField(Subject) | ||
budget_plan = models.IntegerField(null=True) | ||
budget_passing_score = models.IntegerField(null=True) | ||
paid_plan = models.IntegerField(null=True) | ||
paid_passing_score = models.IntegerField(null=True) | ||
cost = models.IntegerField(null=True) | ||
rating = models.FloatField(null=True) | ||
applicants = ArrayField(models.IntegerField(), default=list) | ||
|
||
def __str__(self): | ||
return self.specialty.name |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
/*! | ||
* jQuery Cookie Plugin v1.4.1 | ||
* https://github.com/carhartl/jquery-cookie | ||
* | ||
* Copyright 2013 Klaus Hartl | ||
* Released under the MIT license | ||
*/ | ||
(function (factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
// AMD | ||
define(['jquery'], factory); | ||
} else if (typeof exports === 'object') { | ||
// CommonJS | ||
factory(require('jquery')); | ||
} else { | ||
// Browser globals | ||
factory(jQuery); | ||
} | ||
}(function ($) { | ||
|
||
var pluses = /\+/g; | ||
|
||
function encode(s) { | ||
return config.raw ? s : encodeURIComponent(s); | ||
} | ||
|
||
function decode(s) { | ||
return config.raw ? s : decodeURIComponent(s); | ||
} | ||
|
||
function stringifyCookieValue(value) { | ||
return encode(config.json ? JSON.stringify(value) : String(value)); | ||
} | ||
|
||
function parseCookieValue(s) { | ||
if (s.indexOf('"') === 0) { | ||
// This is a quoted cookie as according to RFC2068, unescape... | ||
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); | ||
} | ||
|
||
try { | ||
// Replace server-side written pluses with spaces. | ||
// If we can't decode the cookie, ignore it, it's unusable. | ||
// If we can't parse the cookie, ignore it, it's unusable. | ||
s = decodeURIComponent(s.replace(pluses, ' ')); | ||
return config.json ? JSON.parse(s) : s; | ||
} catch(e) {} | ||
} | ||
|
||
function read(s, converter) { | ||
var value = config.raw ? s : parseCookieValue(s); | ||
return $.isFunction(converter) ? converter(value) : value; | ||
} | ||
|
||
var config = $.cookie = function (key, value, options) { | ||
|
||
// Write | ||
|
||
if (value !== undefined && !$.isFunction(value)) { | ||
options = $.extend({}, config.defaults, options); | ||
|
||
if (typeof options.expires === 'number') { | ||
var days = options.expires, t = options.expires = new Date(); | ||
t.setTime(+t + days * 864e+5); | ||
} | ||
|
||
return (document.cookie = [ | ||
encode(key), '=', stringifyCookieValue(value), | ||
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE | ||
options.path ? '; path=' + options.path : '', | ||
options.domain ? '; domain=' + options.domain : '', | ||
options.secure ? '; secure' : '' | ||
].join('')); | ||
} | ||
|
||
// Read | ||
|
||
var result = key ? undefined : {}; | ||
|
||
// To prevent the for loop in the first place assign an empty array | ||
// in case there are no cookies at all. Also prevents odd result when | ||
// calling $.cookie(). | ||
var cookies = document.cookie ? document.cookie.split('; ') : []; | ||
|
||
for (var i = 0, l = cookies.length; i < l; i++) { | ||
var parts = cookies[i].split('='); | ||
var name = decode(parts.shift()); | ||
var cookie = parts.join('='); | ||
|
||
if (key && key === name) { | ||
// If second argument (value) is a function it's a converter... | ||
result = read(cookie, value); | ||
break; | ||
} | ||
|
||
// Prevent storing a cookie that we couldn't decode. | ||
if (!key && (cookie = read(cookie)) !== undefined) { | ||
result[name] = cookie; | ||
} | ||
} | ||
|
||
return result; | ||
}; | ||
|
||
config.defaults = {}; | ||
|
||
$.removeCookie = function (key, options) { | ||
if ($.cookie(key) === undefined) { | ||
return false; | ||
} | ||
|
||
// Must not alter options, thus extending a fresh object... | ||
$.cookie(key, '', $.extend({}, options, { expires: -1 })); | ||
return !$.cookie(key); | ||
}; | ||
|
||
})); |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.