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
def _get_model(self): | |
DynamicClass = cache.get('DynamicModel_' + self.table_name) | |
if DynamicClass is None: | |
# get the custom columns required for this table.. | |
attrs = dict((c.column_name, models.CharField(max_length=100, blank=True, null=True)) for c in self.custom_fields.all()) | |
class Meta: | |
db_table = self.table_name | |
app_label = self._meta.app_label | |
managed = False |
This file has been truncated, but you can view the full file.
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
vagrant@djangocore:~$ PYTHONPATH=/django /home/vagrant/.virtualenvs/py2.7/bin/python -m cProfile -s cumulative /django/tests/runtests.py --settings=djangocore_test_postgresql | |
Testing against Django installed in '/django/django' | |
Creating test database for alias 'default'... | |
Creating test database for alias 'other'... | |
..........................................................................................................................................................................................................................................................................................................................................................................x........................................................................................................................................................................................s.............................................................................................................................................................. |
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
field=None value=1L | |
field=<django.db.models.fields.AutoField: id> value=u'159059725' | |
field=<django.db.models.fields.CharField: isbn> value=u'The Definitive Guide to Django: Web Development Done Right' | |
field=<django.db.models.fields.CharField: name> value=447L | |
field=<django.db.models.fields.IntegerField: pages> value=4.5 | |
field=<django.db.models.fields.FloatField: rating> value=Decimal('30.00') | |
field=<django.db.models.fields.DecimalField: price> value=1L | |
field=<django.db.models.fields.related.ForeignKey: contact> value=1L | |
field=<django.db.models.fields.related.ForeignKey: publisher> value=datetime.date(2007, 12, 6) | |
field=<django.db.models.fields.DateField: pubdate> value=1L |
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
def g(letters=None): | |
if letters: return 'gal' | |
goal = ['go'] | |
def o(letters=None): | |
assert letters is None or letters == 'al' | |
if letters: | |
goal.append(letters) | |
return ''.join(goal) | |
goal.append('o') | |
return o |
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
(django)[vagrant@peppermint django]$ ./runoracletests.py expressions | |
Testing against Django installed in '/django/django' | |
Creating test database for alias 'default'... | |
Creating test user... | |
Creating test database for alias 'other'... | |
Creating test user... | |
..s.................s.................. | |
---------------------------------------------------------------------- | |
Ran 39 tests in 386.525s |
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
import base64 | |
import hashlib | |
import hmac | |
import requests | |
import time | |
from django.contrib.auth import get_user_model | |
from django.conf import settings | |
from django.core.cache import cache | |
from django.utils.http import unquote |
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
diff --git django/db/models/functions.py django/db/models/functions.py | |
index c3dea1f..30046ea 100644 | |
--- django/db/models/functions.py | |
+++ django/db/models/functions.py | |
@@ -2,7 +2,7 @@ | |
Classes that represent database functions. | |
""" | |
from django.db.models.expressions import Func, Value | |
-from django.db.models import IntegerField | |
+from django.db.models import IntegerField, Transform |
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
sudo apt-get update | |
sudo apt-get install gcc libffi-dev vim | |
sudo apt-get install python3.3 python3.3-dev python3.3-minimal | |
workon py2.7 | |
pip install -r /home/vagrant/.hosthome/Development/django/tests/requirements/py2.txt | |
deactivate | |
rm /home/vagrant/.virtualenvs/py3.3/bin/python | |
cd /home/vagrant/.virtualenvs/ | |
mkvirtualenv py3.3 --python=`which python3.3` | |
workon py3.3 |
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
diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py | |
index 64b5ba0..8b69406 100644 | |
--- a/django/db/models/expressions.py | |
+++ b/django/db/models/expressions.py | |
@@ -487,11 +487,7 @@ class Value(ExpressionNode): | |
def as_sql(self, compiler, connection): | |
val = self.value | |
if self._output_field_or_none is not None: | |
- from django.db.models.sql.compiler import SQLUpdateCompiler | |
- if isinstance(compiler, SQLUpdateCompiler): |
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
-- queries.tests.Queries1Tests.test_ticket2496 | |
SELECT * FROM ( | |
SELECT "_SUB".*, | |
ROWNUM AS "_RN" FROM (SELECT "QUERIES_ITEM"."ID", | |
"QUERIES_ITEM"."NAME", | |
"QUERIES_ITEM"."CREATED", | |
"QUERIES_ITEM"."MODIFIED", | |
"QUERIES_ITEM"."CREATOR_ID", | |
"QUERIES_ITEM"."NOTE_ID", | |
"QUERIES_AUTHOR"."ID", |
OlderNewer