I hereby claim:
- I am copser on github.
- I am copser (https://keybase.io/copser) on keybase.
- I have a public key ASBvrQ4FvWfrXNGCVbuXGMPS7_MhPfyRKj0Ze17D1OHBBwo
To claim this, I am signing this object:
| """ | |
| Django ORM Optimization Tips | |
| Caveats: | |
| * Only use optimizations that obfuscate the code if you need to. | |
| * Not all of these tips are hard and fast rules. | |
| * Use your judgement to determine what improvements are appropriate for your code. | |
| """ | |
| # --------------------------------------------------------------------------- |
| stages: | |
| - prepare | |
| - test | |
| - build | |
| - deploy | |
| before_script: | |
| - sudo git clean -ffdx | |
| # prepare env |
| [2018-06-27 11:20:25,339: ERROR/MainProcess] Task save_messages_async[b1b360d6-c684-4501-92e2-195efd70099f] raised unexpected: MultipleObjectsReturned('get() returned more than one ConversationId -- it returned 2!',) | |
| Traceback (most recent call last): | |
| File "/srv/bspotted.net/venv/lib/python3.4/site-packages/celery/app/trace.py", line 240, in trace_task | |
| R = retval = fun(*args, **kwargs) | |
| File "/srv/bspotted.net/venv/lib/python3.4/site-packages/celery/app/trace.py", line 438, in __protected_call__ | |
| return self.run(*args, **kwargs) | |
| File "/srv/bspotted.net/app/inbox/tasks.py", line 33, in save_messages_async | |
| save_messages_one(location.email) | |
| File "/srv/bspotted.net/app/inbox/utils.py", line 111, in save_messages_one | |
| conversation_parent = ConversationId.objects.get(conversation_id=message_id, email=page.email) |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. | |
| Vagrant.configure("2") do |config| | |
| # The most common configuration options are documented and commented below. | |
| # For a complete reference, please see the online documentation at |
| INFO global: Vagrant version: 2.0.0 | |
| INFO global: Ruby version: 2.3.4 | |
| INFO global: RubyGems version: 2.5.2.1 | |
| INFO global: VAGRANT_OLD_ENV_DISPLAY=":0" | |
| INFO global: VAGRANT_OLD_ENV_XDG_VTNR="2" | |
| INFO global: VAGRANT_OLD_ENV_ZSH="/home/copser/.oh-my-zsh" | |
| INFO global: VAGRANT_OLD_ENV_TEXTDOMAIN="im-config" | |
| INFO global: VAGRANT_OLD_ENV_XMODIFIERS="@im=ibus" | |
| INFO global: VAGRANT_OLD_ENV_LC_TELEPHONE="sr_RS" | |
| INFO global: VAGRANT_OLD_ENV_XDG_RUNTIME_DIR="/run/user/1000" |
I hereby claim:
To claim this, I am signing this object:
| <div id="messages"> | |
| {% for message in messages %} | |
| <div {% if message.tags %}class="alert alert-dismissable alert-{{ message.tags }}"{% endif %}> | |
| <a class="close" data-dismiss="alert" href="#">×</a> | |
| {{ message }} | |
| </div> | |
| {% endfor %} | |
| </div> |
| """ | |
| Pseudo-random django secret key generator. | |
| - Does print SECRET key to terminal which can be seen as unsafe. | |
| """ | |
| import string | |
| import random | |
| from __future__ import print_function |
| Traceback (most recent call last): | |
| File "manage.py", line 10, in <module> | |
| execute_from_command_line(sys.argv) | |
| File "/home/petarp/.virtualenvs/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line | |
| utility.execute() | |
| File "/home/petarp/.virtualenvs/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute | |
| django.setup() | |
| File "/home/petarp/.virtualenvs/env/local/lib/python2.7/site-packages/django/__init__.py", line 21, in setup | |
| apps.populate(settings.INSTALLED_APPS) | |
| File "/home/petarp/.virtualenvs/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate |
| petarp@petarp-Aspire-5315:~/Documents/TDD/superlists$ python3 functional_tests.py | |
| F | |
| ====================================================================== | |
| FAIL: test_can_start_a_list_and_retrieve_it_later (__main__.NewVisitorTest) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "functional_tests.py", line 45, in test_can_start_a_list_and_retrieve_it_later | |
| self.check_for_row_in_list_table('1: Buy peacock feathers') | |
| File "functional_tests.py", line 17, in check_for_row_in_list_table | |
| self.assertIn(row_text, [row.text for row in rows]) |