Skip to content

Instantly share code, notes, and snippets.

🔥
This is fine.

Jarek jotes

🔥
This is fine.
Block or report user

Report or block jotes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View a.patch
diff --git a/pontoon/base/migrations/0120_bug_1423679_update_plurals_20180417_1135.py b/pontoon/base/migrations/0120_bug_1423679_update_plurals_20180417_1135.py
index 27c22a1e..706766a0 100644
--- a/pontoon/base/migrations/0120_bug_1423679_update_plurals_20180417_1135.py
+++ b/pontoon/base/migrations/0120_bug_1423679_update_plurals_20180417_1135.py
@@ -2,310 +2,7 @@
# Generated by Django 1.11.11 on 2018-04-17 11:35
from __future__ import unicode_literals
-import copy
-
View gist:dbe7ba3e28873ceef9e37bb6583de7d8
pontoon=# select id,active, approved, fuzzy, string from base_translation where entity_id=153288 and (approved=true or fuzzy=true) and locale_id=191;
id | active | approved | fuzzy | string
---------+--------+----------+-------+------------------------------------
1915269 | t | t | f | Следующие ревизии откачены:
1915222 | f | f | t | Были запрошены следующие проверки:
View gist:6c15a57a152d478a53131772e9eb8f5a
app@b54875f5d73a:/app$ ./manage.py migrate
[nltk_data] Downloading package perluniprops to /home/app/nltk_data...
[nltk_data] Unzipping misc/perluniprops.zip.
Operations to perform:
Apply all migrations: account, admin, auth, base, checks, contenttypes, guardian, notifications, sessions, sites, socialaccount, sync, tags, tour, waffle
Running migrations:
Applying base.0120_bug_1423679_update_plurals_20180417_1135...Traceback (most recent call last):
File "./manage.py", line 20, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
View foo.diff
diff --git a/pontoon/base/utils.py b/pontoon/base/utils.py
index 3774ea4c..1efa0a21 100644
--- a/pontoon/base/utils.py
+++ b/pontoon/base/utils.py
@@ -23,9 +23,7 @@ from xml.sax.saxutils import (
)
from django.db.models import Prefetch
-from django.http import (
- HttpResponseBadRequest,
View foo..diff
diff --git a/pontoon/base/utils.py b/pontoon/base/utils.py
index 3774ea4c..1efa0a21 100644
--- a/pontoon/base/utils.py
+++ b/pontoon/base/utils.py
@@ -23,9 +23,7 @@ from xml.sax.saxutils import (
)
from django.db.models import Prefetch
-from django.http import (
- HttpResponseBadRequest,
View -
diff --git a/pontoon/base/utils.py b/pontoon/base/utils.py
index 3774ea4c..1efa0a21 100644
--- a/pontoon/base/utils.py
+++ b/pontoon/base/utils.py
@@ -23,9 +23,7 @@ from xml.sax.saxutils import (
)
from django.db.models import Prefetch
-from django.http import (
- HttpResponseBadRequest,
@jotes
jotes / DI.m3u
Created Jun 29, 2016 — forked from sim642/DI.m3u
Digitally Imported premium streams
View DI.m3u
#EXTM3U
#EXTINF:-1,Digitally Imported - Ambient
http://pub1.diforfree.org:8000/di_ambient_hi
#EXTINF:-1,Digitally Imported - Big Room House
http://pub1.diforfree.org:8000/di_bigroomhouse_hi
#EXTINF:-1,Digitally Imported - Breaks
http://pub1.diforfree.org:8000/di_breaks_hi
View smth.py
@@ -122,9 +124,11 @@ def sync_project_repo(self, project_pk, repo_pk, project_sync_log_pk, now, obsol
if not no_pull:
pull_changes(db_project)
- locales = repo.locales
if locale:
- locales = [locale]
+ locales = [locale] if locale in repo.locales else []
+ else:
@jotes
jotes / gist:972a430d62cccab93be9
Created Jan 26, 2016
#pontoon bug 1216546 - progressive load of entities
View gist:972a430d62cccab93be9
Backend:
* pagination has to be done on real queryset instead of a serialized array
* all filters should be reflected on the backend side.
* has_suggestions and whole serialization of entitieos should be done as the last step of the entities view.
Frontend:
* We should take an mixed approach - load only entities when it's needed
* We should keep an state of currently loaded page
* Load entities only if there are entities to load1
* Search/filtering should reset a page counter.
View gist:55e6b15d4b99a511bd65
diff --git a/pontoon/base/errors.py b/pontoon/base/errors.py
index 6678096..a7e8e09 100644
--- a/pontoon/base/errors.py
+++ b/pontoon/base/errors.py
@@ -1,10 +1,13 @@
+import sys
from raygun4py import raygunprovider
from django.conf import settings
You can’t perform that action at this time.