100+ results results for 'django' (549 ms)
8 9from django.core.exceptions import ImproperlyConfigured 10from django.core.management import call_command 12from django.test import simple, TransactionTestCase, skipUnlessDBFeature 13from django.test.simple import DjangoTestSuiteRunner, get_tests 14from django.test.testcases import connections_support_transactions 201 args = ['test', '--settings=regressiontests.settings', '--option_b', 'foo'] 202 out, err = self.run_django_admin(args) 203 self.assertNoOutput(err) 207 args = ['test', '--settings=regressiontests.settings', '--option_a=bar', '--option_b=foo', '--option_c=31337'] 208 out, err = self.run_django_admin(args) 209 self.assertNoOutput(err) 250 'default': { 251 'ENGINE': 'django.db.backends.sqlite3', 252 option: ':memory:',test_mutable_list.py https://github.com/aruder77/applause.git | Python | 399 lines
5# released under the New BSD license. 6from django.contrib.gis.geos.mutable_list import ListMixin 7from django.utils import unittestfields.py https://bitbucket.org/ema93sh/a.out.git | Python | 394 lines
1from django.db.models import IntegerField, PositiveIntegerField 2from django.conf import settings 12if 'django.contrib.contenttypes' not in settings.INSTALLED_APPS: 13 raise ImportError("djangoratings requires django.contrib.contenttypes in your INSTALLED_APPS") 14 14 15from django.contrib.contenttypes.models import ContentType 16 24try: 25 from django.utils.timezone import now 26except ImportError: 358 359 if not hasattr(cls, '_djangoratings'): 360 cls._djangoratings = [] 360 cls._djangoratings = [] 361 cls._djangoratings.append(self) 362tests.py https://bitbucket.org/ssaltzman/poet.git | Python | 378 lines
6 7from django.conf import settings 8from django.contrib.sessions.backends.db import SessionStore as DatabaseSession 8from django.contrib.sessions.backends.db import SessionStore as DatabaseSession 9from django.contrib.sessions.backends.cache import SessionStore as CacheSession 10from django.contrib.sessions.backends.cached_db import SessionStore as CacheDBSession 10from django.contrib.sessions.backends.cached_db import SessionStore as CacheDBSession 11from django.contrib.sessions.backends.file import SessionStore as FileSession 12from django.contrib.sessions.models import Session 12from django.contrib.sessions.models import Session 13from django.contrib.sessions.middleware import SessionMiddleware 14from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation 14from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation 15from django.http import HttpResponse 16from django.test import TestCase, RequestFactorybackends.py https://github.com/ginkel/reviewboard.git | Python | 391 lines
5 6from django.conf import settings 7from django.contrib.auth.models import User 117 # fallback exception catch because 118 # django.contrib.auth.authenticate() (our caller) catches only 119 # TypeErrorsforms.py https://github.com/shockflash/reviews.git | Python | 373 lines
3 4from django import forms 5from django.forms.util import ErrorDict 5from django.forms.util import ErrorDict 6from django.conf import settings 7from django.contrib.contenttypes.models import ContentType 7from django.contrib.contenttypes.models import ContentType 8from django.utils.crypto import salted_hmac, constant_time_compare 9from django.utils.encoding import force_unicode 9from django.utils.encoding import force_unicode 10from django.utils.hashcompat import sha_constructor 11from django.utils.text import get_text_list 11from django.utils.text import get_text_list 12from django.utils.translation import ungettext, ugettext_lazy as _ 13from django.forms.formsets import formset_factory0039_auto__add_field_entry_status.py https://gitlab.com/tsltd/django-timepiece | Python | 187 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 11 # Adding field 'Entry.status' 12 db.add_column('timepiece_entry', 'status', self.gf('django.db.models.fields.CharField')(default='unverified', max_length=24), keep_default=False) 13 23 'Meta': {'object_name': 'Group'}, 24 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 27 }, 29 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 30 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 31 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),0036_auto__del_field_entry_billable.py https://gitlab.com/tsltd/django-timepiece | Python | 187 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 17 # Adding field 'Entry.billable' 18 db.add_column('timepiece_entry', 'billable', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=False) 19 23 'Meta': {'object_name': 'Group'}, 24 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 27 }, 29 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 30 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 31 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),0032_auto__chg_field_project_business.py https://gitlab.com/tsltd/django-timepiece | Python | 186 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 11 # Changing field 'Project.business' 12 db.alter_column('timepiece_project', 'business_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['timepiece.Business'])) 13 17 # Changing field 'Project.business' 18 db.alter_column('timepiece_project', 'business_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['timepiece.Business'])) 19 23 'Meta': {'object_name': 'Group'}, 24 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 27 },views.py https://github.com/tfleish/caesar-web.git | Python | 355 lines
2 3from django.core import serializers 4from django.db.models import Q, Count, Max 4from django.db.models import Q, Count, Max 5from django.shortcuts import render, redirect, get_object_or_404 6from django.template import RequestContext 6from django.template import RequestContext 7from django.contrib.auth.models import User 8from django.contrib.auth.decorators import login_required 8from django.contrib.auth.decorators import login_required 9from django.contrib.admin.views.decorators import staff_member_required 10from django.http import HttpResponse__init__.py https://github.com/pombredanne/django-extensions.git | Python | 390 lines
21from django.template.defaultfilters import slugify 22from django.db.models import DateTimeField, CharField, SlugField 23 24try: 25 from django.utils.timezone import now as datetime_now 26 assert datetime_now 33except ImportError: 34 from django.utils.encoding import force_text as force_unicode # NOQA 35 266 def __init__(self, verbose_name=None, name=None, auto=True, version=4, node=None, clock_seq=None, namespace=None, uuid_name=None, *args, **kwargs): 267 warnings.warn("Django 1.8 features a native UUIDField, this UUIDField will be removed after Django 1.7 becomes unsupported.", DeprecationWarning) 268 344 def __init__(self, *args, **kwargs): 345 warnings.warn("Django 1.8 features a native UUIDField, this UUIDField will be removed after Django 1.7 becomes unsupported.", DeprecationWarning) 346 super(PostgreSQLUUIDField, self).__init__(*args, **kwargs)indexes.py https://github.com/simonw/django-haystack.git | Python | 350 lines
131 self.assertEqual(len(self.mi.prepare(mock)), 7) 132 self.assertEqual(sorted(self.mi.prepare(mock).keys()), ['author', 'content', 'django_ct', 'django_id', 'extra', 'id', 'pub_date']) 133 140 self.assertEqual(len(self.cmi.prepare(mock)), 9) 141 self.assertEqual(sorted(self.cmi.prepare(mock).keys()), ['author', 'content', 'django_ct', 'django_id', 'extra', 'hello', 'id', 'pub_date', 'whee']) 142 143 self.assertEqual(len(self.cmi.full_prepare(mock)), 10) 144 self.assertEqual(sorted(self.cmi.full_prepare(mock).keys()), ['author', 'author_exact', 'content', 'django_ct', 'django_id', 'extra', 'hello', 'id', 'pub_date', 'whee']) 145 166 self.assertEqual(len(self.cmi.prepare(mock)), 9) 167 self.assertEqual(sorted(self.cmi.prepare(mock).keys()), ['author', 'content', 'django_ct', 'django_id', 'extra', 'hello', 'id', 'pub_date', 'whee']) 168 265 self.assertEqual(len(prepared_data), 4) 266 self.assertEqual(sorted(prepared_data.keys()), ['content', 'django_ct', 'django_id', 'id']) 267test_cron.py https://github.com/mozilla/kitsune.git | Python | 413 lines
3 4from django.conf import settings 5from django.core.management import call_commandreaders.py https://github.com/JGuo/chicagofounders.git | Python | 377 lines
4from urllib import unquote 5from forum import settings as django_settings 6from django.shortcuts import render_to_response, get_object_or_404 7from django.http import HttpResponseRedirect, HttpResponse, Http404, HttpResponsePermanentRedirect 8from django.core.paginator import Paginator, EmptyPage, InvalidPage 9from django.template import RequestContext 10from django import template 11from django.utils.html import * 12from django.utils import simplejson 12from django.utils import simplejson 13from django.db.models import Q, Count 14from django.utils.translation import ugettext as _ 18from django.views.decorators.cache import cache_page 19from django.utils.http import urlquote as django_urlquote 20from django.template.defaultfilters import slugifytest_chat.py https://github.com/dimagi/commcare-hq.git | Python | 374 lines
3 4from django.test import TestCase 5models.py https://github.com/jcrobak/hue.git | Python | 432 lines
16except NameError: 17 from django.utils.itercompat import sorted 18 18 19from django.db import models 20 65 66# Django provides a rich database lookup API. 67>>> Article.objects.get(id__exact=1) 97 98# Django raises an Article.DoesNotExist exception for get() if the parameters 99# don't match any object. 114 115# Lookup by a primary key is the most common case, so Django provides a 116# shortcut for primary-key exact lookups.urlresolvers.py https://github.com/jcrobak/hue.git | Python | 373 lines
11 12from django.http import Http404 13from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist 13from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist 14from django.utils.datastructures import MultiValueDict 15from django.utils.encoding import iri_to_uri, force_unicode, smart_str 15from django.utils.encoding import iri_to_uri, force_unicode, smart_str 16from django.utils.functional import memoize 17from django.utils.importlib import import_module 17from django.utils.importlib import import_module 18from django.utils.regex_helper import normalize 19from django.utils.thread_support import currentThread 23except NameError: 24 from django.utils.itercompat import reversed # Python 2.3 fallback 25 from sets import Set as setviews.py https://bitbucket.org/thuydang/vfossorg_pj.git | Python | 404 lines
7 8from django.db.models import Q 9from django.http import ( 13) 14from django.shortcuts import get_object_or_404 15from django.utils import translation 15from django.utils import translation 16from django.views.generic import ListView 17from django.views.generic.detail import DetailView 90 # language. IMPORTANT: after .translated - we cannot use .filter 91 # on translated fields (parler/django limitation). 92 # if your mixin contains filtering after super call - please place it 205 def get_pagination_options(self): 206 # Django does not handle negative numbers well 207 # when using variables.forms.py https://gitlab.com/areema/myproject | Python | 385 lines
2 3from django import forms 4from django.contrib.auth import ( 6) 7from django.contrib.auth.hashers import ( 8 UNUSABLE_PASSWORD_PREFIX, identify_hasher, 9) 10from django.contrib.auth.models import User 11from django.contrib.auth.tokens import default_token_generator 11from django.contrib.auth.tokens import default_token_generator 12from django.contrib.sites.shortcuts import get_current_site 13from django.core.mail import EmailMultiAlternatives 13from django.core.mail import EmailMultiAlternatives 14from django.forms.utils import flatatt 15from django.template import loaderwidgets.py https://gitlab.com/benji-bou/urotechchallenge-Serenity | Python | 399 lines
1""" 2Form Widget classes specific to the Django admin site. 3""" 7 8from django import forms 9from django.db.models.deletion import CASCADE 9from django.db.models.deletion import CASCADE 10from django.forms.utils import flatatt 11from django.forms.widgets import RadioFieldRenderer 11from django.forms.widgets import RadioFieldRenderer 12from django.template.loader import render_to_string 13from django.urls import reverse 13from django.urls import reverse 14from django.urls.exceptions import NoReverseMatch 15from django.utils import sixtemplate_inheritance_helper.php https://gitlab.com/bandana/Astro-Veda | PHP | 382 lines
2 /** 3 * Django - like template inheritance emulation for PHP 4 * 6 * 7 * I liked djangos template inheritance - system, so I decided to create 8 * something similar for PHP. 232 233You could also check django's template inheritance documentation for another example. Django's template inheritance was my inspiration - actually I pretty much copied its functionality. I hope they don't mind. 234 234 235http://www.djangoproject.com/documentation/templates/#template-inheritance 236tests.py https://bitbucket.org/ssaltzman/poet.git | Python | 364 lines
4 5from django.contrib.syndication import feeds, views 6from django.core.exceptions import ImproperlyConfigured 6from django.core.exceptions import ImproperlyConfigured 7from django.test import TestCase 8from django.utils import tzinfo 8from django.utils import tzinfo 9from django.utils.feedgenerator import rfc2822_date, rfc3339_date 10 74 }) 75 self.assertCategories(chan, ['python', 'django']); 76 134 }) 135 self.assertCategories(chan, ['python', 'django']) 1360005_auto__add_randomentriesplugin.py https://github.com/emilian/django-blog-zinnia.git | Python | 151 lines
10 db.create_table('cmsplugin_randomentriesplugin', ( 11 ('cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)), 12 ('number_of_entries', self.gf('django.db.models.fields.IntegerField')(default=5)), 12 ('number_of_entries', self.gf('django.db.models.fields.IntegerField')(default=5)), 13 ('template_to_render', self.gf('django.db.models.fields.CharField')(max_length=250, blank=True)), 14 )) 24 'Meta': {'object_name': 'Group'}, 25 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 26 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 27 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 28 }, 30 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 31 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 32 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),db_api_tests.py https://github.com/ragsagar/askbot-devel.git | Python | 389 lines
5""" 6from django.core import exceptions 7from django.core.urlresolvers import reverse 7from django.core.urlresolvers import reverse 8from django.test.client import Client 9from django.conf import settings 9from django.conf import settings 10from django import forms 11from askbot.tests.utils import AskbotTestCasesimple.py https://bitbucket.org/pcelta/python-django.git | Python | 385 lines
3from django.conf import settings 4from django.core.exceptions import ImproperlyConfigured 5from django.db.models import get_app, get_apps 5from django.db.models import get_app, get_apps 6from django.test import _doctest as doctest 7from django.test.utils import setup_test_environment, teardown_test_environment 7from django.test.utils import setup_test_environment, teardown_test_environment 8from django.test.testcases import OutputChecker, DocTestRunner, TestCase 9from django.utils import unittest 10from django.utils.importlib import import_module 11from django.utils.module_loading import module_has_submodule 12 12 13__all__ = ('DjangoTestRunner', 'DjangoTestSuiteRunner') 14adminDesignerDashboard.py https://gitlab.com/g66shivam/gstudio | Python | 302 lines
1''' -- imports from installed packages -- ''' 2from django.http import StreamingHttpResponse, HttpResponseRedirect 3from django.shortcuts import render_to_response, render 3from django.shortcuts import render_to_response, render 4from django.template import RequestContext 5from django.contrib.auth.models import User 5from django.contrib.auth.models import User 6from django.contrib.auth.decorators import user_passes_test 7views.py https://github.com/kawazrepos/Kawaz.git | Python | 305 lines
1# -*- coding:utf-8 -*- 2from django.conf import settings 3from django.http import HttpResponse 4from django.shortcuts import get_object_or_404 5from django.core.urlresolvers import reverse 6from django.views.decorators.http import require_POST 6from django.views.decorators.http import require_POST 7from django.views.decorators.csrf import csrf_exempt 8from django.views.decorators.cache import never_cache 8from django.views.decorators.cache import never_cache 9from django.contrib.auth.models import User 10 32 33 See Django bug #6027: http://code.djangoproject.com/ticket/6027 34tutorial.rst https://github.com/thkrobe/django-tastypie.git | ReStructuredText | 331 lines
20 21This tutorial assumes that you have a basic understanding of Django as well as 22how proper REST-style APIs ought to work. We will only explain the portions 28 import datetime 29 from django.contrib.auth.models import User 30 from django.db import models 30 from django.db import models 31 from django.template.defaultfilters import slugify 32 62 * Python 2.4+ 63 * Django 1.0+ (tested on Django 1.1+) 64 * ``mimeparse`` 0.1.3+ (http://code.google.com/p/mimeparse/) 83 84.. _GitHub: http://github.com/toastdriven/django-tastypie 85.. _PyPI: http://pypi.python.org/0003_auto__add_field_layout_representacao.py https://bitbucket.org/marioidival/integrasis-discontinued.git | Python | 181 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 12 db.add_column(u'main_layout', 'representacao', 13 self.gf('django.db.models.fields.CharField')(default=' ', max_length=50), 14 keep_default=False) 24 'Meta': {'object_name': 'Group'}, 25 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 26 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 27 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 28 }, 30 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, 31 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 32 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),models.py https://github.com/farcaller/django.git | Python | 519 lines
5 6from django.contrib import admin 7from django.core.files.storage import FileSystemStorage 7from django.core.files.storage import FileSystemStorage 8from django.contrib.admin.views.main import ChangeList 9from django.core.mail import EmailMessage 9from django.core.mail import EmailMessage 10from django.db import models 11 259def redirect_to(modeladmin, request, selected): 260 from django.http import HttpResponseRedirect 261 return HttpResponseRedirect('/some-where-else/')0017_auto__add_field_change_action.py https://bitbucket.org/bootz/weblate.git | Python | 199 lines
22from south.v2 import SchemaMigration 23from django.db import models 24 30 db.add_column('trans_change', 'action', 31 self.gf('django.db.models.fields.IntegerField')(default=2), 32 keep_default=False) 42 'Meta': {'object_name': 'Group'}, 43 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 44 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 44 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 45 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 46 }, 48 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 49 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 50 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),0019_fill_in_translation_reference.py https://bitbucket.org/bootz/weblate.git | Python | 196 lines
22from south.v2 import DataMigration 23from django.db import models 24 37 'Meta': {'object_name': 'Group'}, 38 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 39 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 39 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 40 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 41 }, 43 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 44 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 45 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 45 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 46 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 47 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})cms_tags.py https://github.com/Doap/django-cms.git | Python | 418 lines
11from cms.utils.placeholder import validate_placeholder_name 12from django import template 13from django.conf import settings 13from django.conf import settings 14from django.contrib.sites.models import Site 15from django.core.cache import cache 15from django.core.cache import cache 16from django.core.mail import mail_managers 17from django.utils.safestring import mark_safe 17from django.utils.safestring import mark_safe 18from django.utils.translation import ugettext_lazy as _ 19from itertools import chaintests.py https://bitbucket.org/pcelta/python-django.git | Python | 366 lines
1from django.core.urlresolvers import reverse 2from django.http import QueryDict 2from django.http import QueryDict 3from django.test import TestCase 4 4 5from django.contrib.auth.models import User 6 6 7from django.contrib.formtools.wizard.views import (NamedUrlSessionWizardView, 8 NamedUrlCookieWizardView) 8 NamedUrlCookieWizardView) 9from django.contrib.formtools.tests.wizard.forms import get_request, Step1, Step2 10 12class NamedWizardTests(object): 13 urls = 'django.contrib.formtools.tests.wizard.namedwizardtests.urls' 14permissions.py https://gitlab.com/jslee1/kitsune | Python | 413 lines
1from django.conf import settings 2from django.contrib.auth.models import Permission as DjangoPermission 3from django.contrib.contenttypes.models import ContentType 3from django.contrib.contenttypes.models import ContentType 4from django.db.models import Q 5from django.db.models.base import Model, ModelBase 153 if cache_filled: 154 # Don't really like the name for this, but this matches how Django 155 # does it. 295 continue 296 # first check Django's permission system 297 if self.user: 297 if self.user: 298 perm = self.get_django_codename(check, obj, generic) 299 perms = perms or self.user.has_perm(perm)api.py https://gitlab.com/Guy1394/kitsune | Python | 450 lines
3 4from django.core.cache import cache 5from django.db import connections, router 5from django.db import connections, router 6from django.db.models import Count, F 7 8from rest_framework import filters, serializers, viewsets 9from rest_framework.filters import django_filters 10from rest_framework.views import APIView 424 425class CohortFilter(django_filters.FilterSet): 426 kind = django_filters.CharFilter(name='kind__code') 426 kind = django_filters.CharFilter(name='kind__code') 427 start = django_filters.DateFilter(lookup_type='gte') 428 end = django_filters.DateFilter(lookup_type='lte')newman_admin.py https://github.com/strogo/ella.git | Python | 371 lines
1from django.utils.translation import ugettext_lazy as _, ugettext 2from django.forms.models import BaseInlineFormSet 2from django.forms.models import BaseInlineFormSet 3from django.shortcuts import render_to_response 4from django.conf import settings 4from django.conf import settings 5from django.forms.util import ValidationError 6from django.template.defaultfilters import striptags 6from django.template.defaultfilters import striptags 7from django.forms import models as modelforms 8from django.utils.safestring import mark_safe 8from django.utils.safestring import mark_safe 9from django.conf.urls.defaults import patterns, url 10 109def get_source_text(model_field, instance): 110 from djangomarkup.models import SourceText, TextProcessor 111 from django.contrib.contenttypes.models import ContentType0034_auto__add_field_activity_billable__add_field_project_billable.py https://gitlab.com/tsltd/django-timepiece | Python | 194 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 11 # Adding field 'Activity.billable' 12 db.add_column('timepiece_activity', 'billable', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=False) 13 14 # Adding field 'Project.billable' 15 db.add_column('timepiece_project', 'billable', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=False) 16 29 'Meta': {'object_name': 'Group'}, 30 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 31 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 31 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 32 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 33 },basecompiler.py https://github.com/aruder77/applause.git | Python | 361 lines
1from django.conf import settings 2from django.db.models.sql import aggregates as sqlaggregates 2from django.db.models.sql import aggregates as sqlaggregates 3from django.db.models.sql.compiler import SQLCompiler 4from django.db.models.sql.constants import LOOKUP_SEP, MULTI, SINGLE 4from django.db.models.sql.constants import LOOKUP_SEP, MULTI, SINGLE 5from django.db.models.sql.where import AND, OR, Constraint 6from django.db.utils import DatabaseError, IntegrityError 6from django.db.utils import DatabaseError, IntegrityError 7from django.utils.tree import Node 8import random 94 def _normalize_lookup_value(self, value, annotation, lookup_type): 95 # Django fields always return a list (see Field.get_db_prep_lookup) 96 # except if get_db_prep_lookup got overridden by a subclass 152 153 # Django fields always return a list (see Field.get_db_prep_lookup) 154 # except if get_db_prep_lookup got overridden by a subclasscollectstatic.py https://gitlab.com/asmjahid/django | Python | 347 lines
5 6from django.contrib.staticfiles.finders import get_finders 7from django.contrib.staticfiles.storage import staticfiles_storage 7from django.contrib.staticfiles.storage import staticfiles_storage 8from django.core.files.storage import FileSystemStorage 9from django.core.management.base import BaseCommand, CommandError 9from django.core.management.base import BaseCommand, CommandError 10from django.core.management.color import no_style 11from django.utils.encoding import smart_text 11from django.utils.encoding import smart_text 12from django.utils.functional import cached_property 13from django.utils.six.moves import inputlegacy_api.py http://moca.googlecode.com/svn/ | Python | 367 lines
12 13from django.conf import settings 14from django.template import loader 14from django.template import loader 15from django.http import HttpResponse 16from django import forms 16from django import forms 17from django.core.mail import send_mail 18from django.shortcuts import render_to_responsemodels.py https://gitlab.com/mayakarya/django | Python | 490 lines
15 16from django.core import validators 17from django.core.exceptions import ValidationError 17from django.core.exceptions import ValidationError 18from django.core.files.storage import FileSystemStorage 19from django.db import models 19from django.db import models 20from django.utils import six 21from django.utils._os import upath 21from django.utils._os import upath 22from django.utils.encoding import python_2_unicode_compatible 23from django.utils.six.moves import rangemodels.py https://bitbucket.org/ajumell/django-helpers.git | Python | 396 lines
2# 3# EAV-Django is a reusable Django application which implements EAV data model 4# Copyright © 2009—2010 Andrey Mikhaylenko 5# 6# This file is part of EAV-Django. 7# 7# 8# EAV-Django is free software: you can redistribute it and/or modify 9# it under the terms of the GNU Lesser General Public License as published 12# 13# EAV-Django is distributed in the hope that it will be useful, 14# but WITHOUT ANY WARRANTY; without even the implied warranty of 18# You should have received a copy of the GNU Lesser General Public License 19# along with EAV-Django. If not, see <http://gnu.org/licenses/>. 20"""DbColumnWrapper.java https://github.com/DarioGT/OMS-PluginXML.git | Java | 515 lines
34 private DbORColumn m_dbCol; 35 private String djangoType; 36 413 414 public String getDjangoType() throws DbException { 415 DbORTypeClassifier type = m_dbCol.getType(); 457 458 djangoType =ft; 459 467 468 public String getDjangoColParams() throws DbException { 469 // TODO Auto-generated method stub 473 474 if (djangoType == "" ) getDjangoType(); 4750032_auto__add_field_dataupload_deletable.py https://github.com/pandaproject/panda.git | Python | 182 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 12 db.add_column('panda_dataupload', 'deletable', 13 self.gf('django.db.models.fields.BooleanField')(default=False), 14 keep_default=False) 22 'Meta': {'object_name': 'Group'}, 23 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 24 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 24 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 25 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 26 }, 28 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 29 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 30 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),__init__.py https://github.com/jsa/gaesdk-python.git | Python | 364 lines
8 9import django 10from django.apps import apps 10from django.apps import apps 11from django.conf import settings 12from django.core.exceptions import ImproperlyConfigured 12from django.core.exceptions import ImproperlyConfigured 13from django.core.management.base import ( 14 BaseCommand, CommandError, CommandParser, handle_default_options, 15) 16from django.core.management.color import color_style 17from django.utils import autoreload, lru_cache, six 17from django.utils import autoreload, lru_cache, six 18from django.utils._os import npath, upath 19from django.utils.encoding import force_textmodels.py https://bitbucket.org/lullis/newsblur.git | Python | 388 lines
3import urllib2 4from django.conf import settings 5from apps.rss_feeds.models import MFeedFetchHistory, MPageFetchHistory, MFeedPushHistorymetaweblog.py https://bitbucket.org/codepoet/milton.git | Python | 463 lines
2 3# http://www.allyourpixel.com/post/metaweblog-38-django/ 4 10 11from django.contrib.auth.models import User 12from django.core.urlresolvers import reverse 12from django.core.urlresolvers import reverse 13from django.core.files.base import ContentFile 140023_auto__add_field_countrystockstats_has_stock_data__add_field_countrysto.py https://github.com/ewheeler/vaxtrack.git | Python | 188 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 11 # Adding field 'CountryStockStats.has_stock_data' 12 db.add_column('vaxapp_countrystockstats', 'has_stock_data', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) 13 14 # Adding field 'CountryStockStats.has_forecast_data' 15 db.add_column('vaxapp_countrystockstats', 'has_forecast_data', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) 16 17 # Adding field 'CountryStockStats.has_delivery_data' 18 db.add_column('vaxapp_countrystockstats', 'has_delivery_data', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) 19 35 'Meta': {'object_name': 'Group'}, 36 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 37 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),widgets.py https://github.com/hhank/lettuce.git | Python | 303 lines
1""" 2Form Widget classes specific to the Django admin site. 3""" 4 5import django.utils.copycompat as copy 6 6 7from django import forms 8from django.forms.widgets import RadioFieldRenderer 8from django.forms.widgets import RadioFieldRenderer 9from django.forms.util import flatatt 10from django.utils.html import escape 10from django.utils.html import escape 11from django.utils.text import truncate_words 12from django.utils.translation import ugettext as _0005_auto__add_field_book_cover__add_field_book_description.py https://gitlab.com/wilane/Booktype | Python | 208 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 11 # Adding field 'Book.cover' 12 db.add_column('editor_book', 'cover', self.gf('django.db.models.fields.files.ImageField')(max_length=100, null=True), keep_default=False) 13 14 # Adding field 'Book.description' 15 db.add_column('editor_book', 'description', self.gf('django.db.models.fields.TextField')(default=''), keep_default=False) 16 29 'Meta': {'object_name': 'Group'}, 30 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 31 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 31 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 32 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 33 },admin.py https://github.com/greatestape/django-guardian.git | Python | 382 lines
1from django import forms 2from django.conf import settings 2from django.conf import settings 3from django.conf.urls.defaults import patterns, url 4from django.contrib import admin 4from django.contrib import admin 5from django.contrib import messages 6from django.contrib.admin.widgets import FilteredSelectMultiple 6from django.contrib.admin.widgets import FilteredSelectMultiple 7from django.contrib.auth.models import User, Group 8from django.core.urlresolvers import reverse 8from django.core.urlresolvers import reverse 9from django.shortcuts import render_to_response, get_object_or_404, redirect 10from django.template import RequestContext 10from django.template import RequestContext 11from django.utils.datastructures import SortedDict 12from django.utils.translation import ugettext, ugettext_lazy as _0001_initial.py https://github.com/cidadania/e-cidadania.git | Python | 169 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 12 db.create_table(u'debate_debate', ( 13 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), 14 ('title', self.gf('django.db.models.fields.CharField')(unique=True, max_length=200)), 14 ('title', self.gf('django.db.models.fields.CharField')(unique=True, max_length=200)), 15 ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), 16 ('theme', self.gf('django.db.models.fields.CharField')(max_length=100, null=True, blank=True)), 16 ('theme', self.gf('django.db.models.fields.CharField')(max_length=100, null=True, blank=True)), 17 ('space', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['spaces.Space'], null=True, blank=True)), 18 ('date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), 18 ('date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), 19 ('date_mod', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), 20 ('author', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)),streaming.py https://github.com/dtran320/tweepy.git | Python | 412 lines
20 21from django.utils.encoding import smart_unicode 22tests.py https://github.com/davedash/django.git | Python | 299 lines
1import os, unittest 2from django.contrib.gis.geos import * 3from django.contrib.gis.db.models import Collect, Count, Extent, F, Union 3from django.contrib.gis.db.models import Collect, Count, Extent, F, Union 4from django.contrib.gis.geometry.backend import Geometry 5from django.contrib.gis.tests.utils import mysql, oracle, postgis, spatialite, no_mysql, no_oracle, no_spatialite 5from django.contrib.gis.tests.utils import mysql, oracle, postgis, spatialite, no_mysql, no_oracle, no_spatialite 6from django.conf import settings 7from models import City, Location, DirectoryEntry, Parcel, Book, Author 222 import pickle 223 from django.contrib.gis.db.models.sql import GeoQuery 224 qs = City.objects.all()test_organization_users.py https://gitlab.com/adasauce/glitchtip-backend | Python | 394 lines
1import json 2from django.core import mail 3from django.shortcuts import reverseshipper.py https://github.com/Ryati/satchmo.git | Python | 395 lines
15from decimal import Decimal 16from django.template import Context, loader 17from django.utils.translation import ugettext as _simple.py https://bitbucket.org/apratim_ankur/city_lounge.git | Python | 384 lines
3 4from django.conf import settings 5from django.core.exceptions import ImproperlyConfigured 5from django.core.exceptions import ImproperlyConfigured 6from django.db.models import get_app, get_apps 7from django.test import _doctest as doctest 7from django.test import _doctest as doctest 8from django.test.utils import setup_test_environment, teardown_test_environment 9from django.test.testcases import OutputChecker, DocTestRunner 9from django.test.testcases import OutputChecker, DocTestRunner 10from django.utils import unittest 11from django.utils.importlib import import_module 11from django.utils.importlib import import_module 12from django.utils.module_loading import module_has_submodule 13forms.py https://github.com/kataev/bkz.git | Python | 419 lines
1# -*- coding: utf-8 -*- 2import django.forms as forms 3from django.forms.models import inlineformset_factory, modelformset_factory0040_auto__add_field_attribute_billable.py https://gitlab.com/tsltd/django-timepiece | Python | 188 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 11 # Adding field 'Attribute.billable' 12 db.add_column('timepiece_attribute', 'billable', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) 13 23 'Meta': {'object_name': 'Group'}, 24 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 27 }, 29 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 30 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 31 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),index.html.erb https://github.com/KyKyPy3/headbase.git | Ruby HTML | 268 lines
24 <div style="float:left;"> 25 <div class="blog_title" style="padding-bottom:.3em;padding-top:.5em;font-size:.9em;"><%= link_to "Which one first: Python or Django?", {:controller => "projects", :action => "show"} -%></div> 26 <div class="tags" style="padding:0;padding-left:5px;padding-right:5px;text-align:center;margin-top:.8em;float:left;">testing</div> 52 <div style="float:left;"> 53 <div class="blog_title" style="padding-bottom:.3em;padding-top:.5em;font-size:.9em;"><%= link_to "Which one first: Python or Django?", {:controller => "projects", :action => "show"} -%></div> 54 <div class="tags" style="padding:0;padding-left:5px;padding-right:5px;text-align:center;margin-top:.8em;float:left;">testing</div> 80 <div style="float:left;"> 81 <div class="blog_title" style="padding-bottom:.3em;padding-top:.5em;font-size:.9em;"><%= link_to "Which one first: Python or Django?", {:controller => "projects", :action => "show"} -%></div> 82 <div class="tags" style="padding:0;padding-left:5px;padding-right:5px;text-align:center;margin-top:.8em;float:left;">testing</div> 108 <div style="float:left;"> 109 <div class="blog_title" style="padding-bottom:.3em;padding-top:.5em;font-size:.9em;"><%= link_to "Which one first: Python or Django?", {:controller => "projects", :action => "show"} -%></div> 110 <div class="tags" style="padding:0;padding-left:5px;padding-right:5px;text-align:center;margin-top:.8em;float:left;">testing</div> 136 <div style="float:left;"> 137 <div class="blog_title" style="padding-bottom:.3em;padding-top:.5em;font-size:.9em;"><%= link_to "Which one first: Python or Django?", {:controller => "projects", :action => "show"} -%></div> 138 <div class="tags" style="padding:0;padding-left:5px;padding-right:5px;text-align:center;margin-top:.8em;float:left;">testing</div>text.py https://gitlab.com/e0/django | Python | 436 lines
7 8from django.utils import six 9from django.utils.encoding import force_text 9from django.utils.encoding import force_text 10from django.utils.functional import SimpleLazyObject, keep_lazy, keep_lazy_text 11from django.utils.safestring import SafeText, mark_safe 11from django.utils.safestring import SafeText, mark_safe 12from django.utils.six.moves import html_entities 13from django.utils.translation import pgettext, ugettext as _, ugettext_lazy 17 # people rely on it being here. 18 from django.utils.encoding import force_unicode # NOQA 19tests.py https://gitlab.com/purdue-epics-ims/boilerconnect | Python | 347 lines
1from dbtest.models import * 2from django.test import TestCase 3from django.core.files import File 3from django.core.files import File 4from django.core.urlresolvers import reverse 5from johnslist.settings import PIC_POPULATE_DIR 6#for login test 7from django.contrib.auth.models import AnonymousUser 8 8 9from django.test import Client 10 78class UserTestCase(TestCase): 79 #django calls this initialization function automatically 80 def setUp(self):0001_initial.py https://github.com/tymofij/adofex.git | Python | 181 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 12 db.create_table('copyright_copyright', ( 13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), 14 ('owner', self.gf('django.db.models.fields.CharField')(max_length=255)), 14 ('owner', self.gf('django.db.models.fields.CharField')(max_length=255)), 15 ('user', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='copyrights', null=True, to=orm['auth.User'])), 16 ('language', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['languages.Language'])), 16 ('language', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['languages.Language'])), 17 ('resource', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['resources.Resource'])), 18 ('years', self.gf('django.db.models.fields.CommaSeparatedIntegerField')(max_length=80)), 18 ('years', self.gf('django.db.models.fields.CommaSeparatedIntegerField')(max_length=80)), 19 ('comment', self.gf('django.db.models.fields.CharField')(max_length=255)), 20 ('imported_by', self.gf('django.db.models.fields.CharField')(max_length=1, null=True, blank=True)),models.py https://github.com/albatrossandco/brubeck_cms.git | Python | 311 lines
10 11# Imports from Django 12from django.conf import settings 12from django.conf import settings 13from django.contrib.contenttypes import generic 14from django.db import models 191from brubeck.core.emailing.views import render_email_and_send 192from django.contrib.comments.moderation import moderator 193formsets.py https://github.com/raminel/geraldo.git | Python | 289 lines
1from forms import Form 2from django.utils.encoding import StrAndUnicode 3from django.utils.safestring import mark_safe 3from django.utils.safestring import mark_safe 4from django.utils.translation import ugettext as _ 5from fields import IntegerField, BooleanFieldmap.py https://github.com/keiouu/django-eve-db.git | Python | 368 lines
3""" 4from django.db import models 5 95 Represents a constellation. Note that all sovereignty data is subject 96 to change, and is held in an external model. django-eve-api has a few 97 of these for your convenience.0001_initial.py https://github.com/foonnnnn/CollectorCity-Market-Place.git | Python | 207 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 12 db.create_table('blog_pages_post', ( 13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), 14 ('shop', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shops.Shop'])), 14 ('shop', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shops.Shop'])), 15 ('title', self.gf('django.db.models.fields.CharField')(max_length=60)), 16 ('body', self.gf('django.db.models.fields.TextField')()), 16 ('body', self.gf('django.db.models.fields.TextField')()), 17 ('date_time', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), 18 )) 22 db.create_table('blog_pages_home', ( 23 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), 24 ('shop', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['shops.Shop'], unique=True)),models.py https://github.com/ghing/Radregator.git | Python | 355 lines
1from django.db import models 2from django.contrib.sites.models import Site 153 # these averages. I imagine there's a way to do this using 154 # Django's ORM and aggregation. However, it's non-trivial, 155 # so I'm doing it this way to get things working. 324 """Extra information about the relationship between two comments. 325 see http://docs.djangoproject.com/en/1.2./topics/db/models/#extra-fields-on-many-to-many-relationships""" 326 left_comment = models.ForeignKey(Comment, related_name='+')indexes.py https://github.com/danner/django-haystack.git | Python | 402 lines
2import sys 3from django.db.models import signals 4from django.utils.encoding import force_unicode 4from django.utils.encoding import force_unicode 5from haystack.constants import ID, DJANGO_CT, DJANGO_ID 6from haystack.fields import * 126 ID: get_identifier(obj), 127 DJANGO_CT: "%s.%s" % (obj._meta.app_label, obj._meta.module_name), 128 DJANGO_ID: force_unicode(obj.pk), 268 269def index_field_from_django_field(f, default=CharField): 270 """ 305 # list of reserved field names 306 fields_to_skip = (ID, DJANGO_CT, DJANGO_ID, 'content', 'text') 307helpers.py https://github.com/jacobstr/django-uni-form.git | Python | 366 lines
5""" 6from django.core.urlresolvers import reverse, NoReverseMatch 7from django.forms.forms import BoundField 7from django.forms.forms import BoundField 8from django.template.loader import render_to_string 9from django.utils.safestring import mark_safe 265 external sites or internal sites without CSRF protection (as described in the 266 Django documentation). 267 Requires the presence of a csrf token in the current context with the identifier 274 275 >>> from django import forms 276 >>> from uni_form.helpers import FormHelper, Submit, Reset 276 >>> from uni_form.helpers import FormHelper, Submit, Reset 277 >>> from django.utils.translation import ugettext_lazy as _ 278 >>> class MyForm(forms.Form):0037_auto__chg_field_entry_activity.py https://gitlab.com/tsltd/django-timepiece | Python | 187 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 11 # Changing field 'Entry.activity' 12 db.alter_column('timepiece_entry', 'activity_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['timepiece.Activity'])) 13 17 # Changing field 'Entry.activity' 18 db.alter_column('timepiece_entry', 'activity_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['timepiece.Activity'])) 19 23 'Meta': {'object_name': 'Group'}, 24 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 27 },views.py https://github.com/lmorchard/badger-lib.git | Python | 416 lines
3 4from django.core.cache import cache 5from django.core.exceptions import ObjectDoesNotExist 5from django.core.exceptions import ObjectDoesNotExist 6from django.core.urlresolvers import reverse 7from django.http import Http404, HttpResponseRedirect, HttpResponseBadRequest, HttpResponseForbidden 7from django.http import Http404, HttpResponseRedirect, HttpResponseBadRequest, HttpResponseForbidden 8from django.shortcuts import render_to_response, get_object_or_404 9from django.template.context import RequestContext 9from django.template.context import RequestContext 10from django.utils.translation import ugettext, ugettext_lazy as _ 11 11 12from django.contrib.auth.models import User 130031_auto__del_field_project_new_business__add_field_project_business.py https://gitlab.com/tsltd/django-timepiece | Python | 183 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 20 'Meta': {'object_name': 'Group'}, 21 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 22 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 22 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 23 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 24 }, 26 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 27 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 28 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 28 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 29 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 30 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})views.py https://github.com/powellc/django-basic-apps.git | Python | 477 lines
1from django.shortcuts import get_object_or_404, render_to_response 2from django.http import HttpResponseRedirect 2from django.http import HttpResponseRedirect 3from django.template import RequestContext 4from django.core.urlresolvers import reverse 4from django.core.urlresolvers import reverse 5from django.contrib.auth.decorators import login_required 6from django.contrib.auth.models import User 6from django.contrib.auth.models import User 7from django.views.generic import date_based 8from django.db.models import Qsites.py https://bitbucket.org/nicoechaniz/django-cyclope-transifex | Python | 331 lines
27 28from django.http import Http404, HttpResponse, HttpResponseRedirect 29from django.shortcuts import render_to_response, get_object_or_404 29from django.shortcuts import render_to_response, get_object_or_404 30from django.template import RequestContext, loader 31from django.conf.urls.defaults import * 31from django.conf.urls.defaults import * 32from django.utils.translation import ugettext_lazy as _, ugettext 33from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured 33from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured 34from django.contrib.contenttypes.models import ContentType 35from django.db.models.signals import post_save 35from django.db.models.signals import post_save 36from django.utils import simplejson 37from django.contrib.sites.models import Sitetest_page.py git://github.com/bartTC/django-wakawaka.git | Python | 335 lines
1from django.contrib.auth.models import Permission 2from django.urls import reversestorage.py https://github.com/etianen/django.git | Python | 393 lines
8 9from django.conf import settings 10from django.core.cache import (caches, InvalidCacheBackendError, 11 cache as default_cache) 12from django.core.exceptions import ImproperlyConfigured 13from django.core.files.base import ContentFile 13from django.core.files.base import ContentFile 14from django.core.files.storage import FileSystemStorage, get_storage_class 15from django.utils.encoding import force_bytes, force_text 15from django.utils.encoding import force_bytes, force_text 16from django.utils.functional import LazyObject 17from django.utils.six.moves.urllib.parse import unquote, urlsplit, urlunsplit, urldefrag 18 19from django.contrib.staticfiles.utils import check_settings, matches_patterns 20models.py https://github.com/alexliyu/cloudsystem.git | Python | 447 lines
7 8from django.db import models 9from django.db.models.query import QuerySet 9from django.db.models.query import QuerySet 10from django.conf import settings 11from django.core.exceptions import ImproperlyConfigured 11from django.core.exceptions import ImproperlyConfigured 12from django.core.mail import send_mail 13from django.core.urlresolvers import reverse 13from django.core.urlresolvers import reverse 14from django.template import Context 15from django.template.loader import render_to_string 15from django.template.loader import render_to_string 16from django.utils.translation import ugettext_lazy as _ 17from django.utils.translation import ugettext, get_language, activateforms.py https://github.com/MichaelBlume/braintree_django.git | Python | 425 lines
6 An implementation of the Braintree transparent redirect system as native 7 Django forms that can easily be used in your own views and templates. 8""" 12 13from django import forms 14from django.forms.util import ErrorList 14from django.forms.util import ErrorList 15from django.forms import widgets 16 75 """ 76 Get the result (or None) of a transparent redirect given a Django 77 Request object. 172 and the values the error messages, which can be directly used to 173 set the field errors on the Django form object for display in 174 templates.views.py https://github.com/plasticcube/frano.git | Python | 365 lines
7 8from django.db import connection 9from django.db import transactionStudentGroupApi.py https://github.com/klpdotorg/KLP-MIS.git | Python | 348 lines
7""" 8from django.conf.urls.defaults import * 9from django.http import HttpResponse 9from django.http import HttpResponse 10from django.shortcuts import render_to_response 11from django_restapi.resource import Resource 13from schools.forms import * 14from django_restapi.model_resource import Collection, Entry 15from django_restapi.responder import * 15from django_restapi.responder import * 16from django_restapi.receiver import * 17from klprestApi.BoundaryApi import ChoiceEntry 17from klprestApi.BoundaryApi import ChoiceEntry 18from django.contrib.contenttypes.models import ContentType 190030_auto__del_field_project_business.py https://gitlab.com/tsltd/django-timepiece | Python | 186 lines
4from south.v2 import SchemaMigration 5from django.db import models 6 17 # Adding field 'Project.business' 18 db.add_column('timepiece_project', 'business', self.gf('django.db.models.fields.related.ForeignKey')(related_name='business_projects', null=True, to=orm['crm.Contact'], blank=True), keep_default=False) 19 23 'Meta': {'object_name': 'Group'}, 24 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 27 }, 29 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 30 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 31 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),i18n.py https://github.com/Tippr/django.git | Python | 424 lines
3 4from django.template import (Node, Variable, TemplateSyntaxError, 5 TokenParser, Library, TOKEN_TEXT, TOKEN_VAR) 5 TokenParser, Library, TOKEN_TEXT, TOKEN_VAR) 6from django.template.base import _render_value_in_context 7from django.template.defaulttags import token_kwargs 7from django.template.defaulttags import token_kwargs 8from django.utils import translation 9 18 def render(self, context): 19 from django.conf import settings 20 context[self.variable] = [(k, translation.ugettext(v)) for k, v in settings.LANGUAGES]serializers.py https://gitlab.com/urbanjunglestudio/whambush-api | Python | 463 lines
1from django.conf import settings 2from django.utils import timezone 2from django.utils import timezone 3from django.contrib.contenttypes.models import ContentType 4from django.contrib.sites.models import Site 4from django.contrib.sites.models import Site 5from django.contrib.comments.models import Comment 6from django.contrib.auth.models import AnonymousUser 6from django.contrib.auth.models import AnonymousUser 7from django.contrib.auth import authenticate 8from rest_framework import serializersviews.py https://github.com/areski/djime.git | Python | 263 lines
1from django.contrib.auth.decorators import login_required 2from django.contrib.auth.models import User 2from django.contrib.auth.models import User 3from django.core.urlresolvers import reverse 4from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect 4from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect 5from django.shortcuts import render_to_response, get_object_or_404 6from django.template import RequestContext 6from django.template import RequestContext 7from django.template.loader import render_to_string 8from django.utils.translation import ugettext as trans 8from django.utils.translation import ugettext as trans 9from django.utils.html import escape 10 18except ImportError: 19 from django.utils import simplejson as json 20loader.py https://gitlab.com/0072016/django-django | Python | 310 lines
6 7from django.apps import apps 8from django.conf import settings 8from django.conf import settings 9from django.db.migrations.graph import MigrationGraph 10from django.db.migrations.recorder import MigrationRecorder 10from django.db.migrations.recorder import MigrationRecorder 11from django.utils import six 12 30 read the python files, looking for a class called Migration, which should 31 inherit from django.db.migrations.Migration. See 32 django.db.migrations.migration for what that looks like. 256 "Migration {0} depends on nonexistent node ('{1}', '{2}'). " 257 "Django tried to replace migration {1}.{2} with any of [{3}] " 258 "but wasn't able to because some of the replaced migrations "tests.py https://github.com/jsdalton/django.git | Python | 331 lines
9 10from django.contrib.gis.gdal import HAS_GDAL 11from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql 11from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql 12from django.db import router 13from django.conf import settings 13from django.conf import settings 14from django.test import TestCase 15from django.utils._os import upath 17if HAS_GDAL: 18 from django.contrib.gis.utils.layermapping import (LayerMapping, 19 LayerMapError, InvalidDecimal, MissingForeignKey) 19 LayerMapError, InvalidDecimal, MissingForeignKey) 20 from django.contrib.gis.gdal import DataSource 21views.py https://github.com/martwine/Researchpages.git | Python | 348 lines
1from urllib import urlencode 2from django.db.models import Q 3from afternoon.views.generic.list_detail import object_list, object_detail 3from afternoon.views.generic.list_detail import object_list, object_detail 4from afternoon.django.errors.views import error 5from django.views.generic.create_update import update_object 7import dynamicforms 8from django.db.models.query import QuerySet 9from django.shortcuts import render_to_response, get_object_or_404 9from django.shortcuts import render_to_response, get_object_or_404 10from django.conf import settings 11from django import newforms as forms 11from django import newforms as forms 12from django.newforms import form_for_model, widgets, form_for_instance 13from django.template import RequestContextviews.py https://github.com/barbarae/kipp.git | Python | 373 lines
1import os 2from django.shortcuts import render_to_response 3from django.contrib.auth.decorators import login_required 3from django.contrib.auth.decorators import login_required 4from django.template import RequestContext 5from django.http import HttpResponseRedirect, HttpResponse, HttpResponseForbidden, HttpResponseBadRequest 5from django.http import HttpResponseRedirect, HttpResponse, HttpResponseForbidden, HttpResponseBadRequest 6from django.contrib.sessions.models import Session 7from django.conf import settings 7from django.conf import settings 8from django.db.models import Q 9from django.core.exceptions import PermissionDenied 9from django.core.exceptions import PermissionDenied 10from django.views.decorators.csrf import csrf_protect, csrf_exempt 11tests.py git://github.com/mozilla/zamboni-lib.git | Python | 370 lines
1import django.test 2from django import http 2from django import http 3from django.conf.urls.defaults import patterns 4from django.contrib.auth import logout 4from django.contrib.auth import logout 5from django.contrib.auth.models import User 6from django.contrib.sessions.models import Session 6from django.contrib.sessions.models import Session 7from django.core import signals 8from django.core.cache import cache 8from django.core.cache import cache 9from django.core.handlers.wsgi import WSGIRequest 10from django.db import close_connection 10from django.db import close_connection 11from django.template import context 12query.py https://github.com/SeanOC/django.git | Python | 313 lines
7from decimal import Decimal 8from django.db import connection 9from django.conf import settings 9from django.conf import settings 10from django.contrib.gis.measure import Distance 11from django.contrib.gis.db.backend.util import SpatialOperation, SpatialFunction 25 # if the POSTGIS_VERSION setting is available. 26 from django.contrib.gis.db.backend.postgis.management import postgis_version_tuple 27 version_tuple = postgis_version_tuple()views.py https://github.com/nikgarg/PicGuess.git | Python | 308 lines
1from django.http import HttpResponse, HttpResponseRedirect 2from django.shortcuts import render_to_response 2from django.shortcuts import render_to_response 3from django.template import RequestContext 4from django.contrib.auth import authenticate 4from django.contrib.auth import authenticate 5from django.db import connection, transaction 6from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned 6from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned 7from django.contrib.auth.forms import AuthenticationForm 8from django.contrib.auth import login, logoutviews.py https://github.com/drx/archfinch.git | Python | 450 lines
1from django.shortcuts import get_object_or_404, HttpResponse, HttpResponseRedirect, redirect 2from django.template import RequestContext 2from django.template import RequestContext 3from django.utils import simplejson 4from django.utils.http import base36_to_int, int_to_base36 4from django.utils.http import base36_to_int, int_to_base36 5from django.template.defaultfilters import slugify 6from django.template.loader import render_to_string 6from django.template.loader import render_to_string 7from django.db.models import Count 8from archfinch.main.models import Item, Opinion, Action, Similarity, Category, Tag, TagBlock, TagFollow 11from archfinch.users.models import User 12from django.contrib.auth.decorators import login_required 13from django.core.urlresolvers import reverse 13from django.core.urlresolvers import reverse 14from django.contrib.markup.templatetags.markup import markdown 15from django.views.decorators.csrf import csrf_exemptutils.py https://github.com/dhou/xiaonei-apps.git | Python | 294 lines
1from django.core.urlresolvers import reverse 2from google.appengine.api import memcache 7from ithink.models import SessionInfo 8from django.utils import simplejson 9import reBaseControllers.py https://github.com/Halicea/HaliceaMVCHelper.git | Python | 364 lines
1from google.appengine.api import urlfetch 2from django.utils import simplejson 3import urllib, osbase.py https://github.com/Tippr/django.git | Python | 335 lines
5import re 6from django.contrib.gis import gdal 7views.py https://github.com/herlo/ConMan.git | Python | 352 lines
1# Create your views here. 2from django import forms as forms 3from django.shortcuts import render_to_response,get_object_or_404 3from django.shortcuts import render_to_response,get_object_or_404 4from django.template import RequestContext 5from django.http import HttpRequest,HttpResponseRedirect,HttpResponse 5from django.http import HttpRequest,HttpResponseRedirect,HttpResponse 6from django.utils import simplejson 7from django.utils.datastructures import SortedDict 7from django.utils.datastructures import SortedDict 8from django.utils.safestring import mark_safe 9from django.contrib.auth.models import User,UserManager,Group 9from django.contrib.auth.models import User,UserManager,Group 10from django.contrib.auth import authenticate,login 11from django.template.loader import render_to_stringviews.py https://github.com/dhruvAdhia/ella.git | Python | 400 lines
1from django.http import Http404, HttpResponse 2import logging 3from datetime import datetime 4from django import http 5from django.template import RequestContext, Context 5from django.template import RequestContext, Context 6from django.shortcuts import render_to_response 7from django.template.defaultfilters import slugify 7from django.template.defaultfilters import slugify 8from django.utils.translation import ugettext_lazy as _ 9from django.contrib.contenttypes.models import ContentType 9from django.contrib.contenttypes.models import ContentType 10from django.contrib.auth import get_user 11from django.contrib.auth.models import User, AnonymousUser 11from django.contrib.auth.models import User, AnonymousUser 12from django.core.paginator import QuerySetPaginator 13from django.conf import settingsviews.py https://github.com/coin/django-userena.git | Python | 411 lines
1from django.contrib.auth.decorators import login_required 2from django.views.generic import list_detail 2from django.views.generic import list_detail 3from django.views.decorators.http import require_http_methods 4from django.core.urlresolvers import reverse 4from django.core.urlresolvers import reverse 5from django.views.generic.simple import direct_to_template 6from django.shortcuts import get_object_or_404, redirect 6from django.shortcuts import get_object_or_404, redirect 7from django.http import Http404 8from django.contrib.auth.models import User 8from django.contrib.auth.models import User 9from django.template import loader 10from django.contrib import messages 10from django.contrib import messages 11from django.utils.translation import ugettext as _ 12from django.utils.translation import ungettextorganization.py https://github.com/SRabbelier/Melange.git | Python | 408 lines
26 27from django import http 28 28 29from django.utils import simplejson 30from django.utils.translation import ugettext 134 135 new_params['extra_django_patterns'] = patterns 136subdivisions.py https://github.com/devhub/baph.git | Python | 431 lines
3 4from django.utils.translation import ugettext_lazy as _ 5collectstatic.py https://gitlab.com/mayakarya/django | Python | 348 lines
5 6from django.apps import apps 7from django.contrib.staticfiles.finders import get_finders 7from django.contrib.staticfiles.finders import get_finders 8from django.contrib.staticfiles.storage import staticfiles_storage 9from django.core.files.storage import FileSystemStorage 9from django.core.files.storage import FileSystemStorage 10from django.core.management.base import BaseCommand, CommandError 11from django.core.management.color import no_style 11from django.core.management.color import no_style 12from django.utils.encoding import smart_text 13from django.utils.functional import cached_property 13from django.utils.functional import cached_property 14from django.utils.six.moves import input 15views.py https://github.com/kawazrepos/Kawaz.git | Python | 245 lines
2 3from django.conf import settings 4from django.contrib.auth.models import User 4from django.contrib.auth.models import User 5from django.core import mail 6from django.core.urlresolvers import reverse 6from django.core.urlresolvers import reverse 7from django.test import TestCase 8indexes.py https://github.com/fizx/django-haystack.git | Python | 350 lines
131 self.assertEqual(len(self.mi.prepare(mock)), 7) 132 self.assertEqual(sorted(self.mi.prepare(mock).keys()), ['author', 'content', 'django_ct', 'django_id', 'extra', 'id', 'pub_date']) 133 140 self.assertEqual(len(self.cmi.prepare(mock)), 9) 141 self.assertEqual(sorted(self.cmi.prepare(mock).keys()), ['author', 'content', 'django_ct', 'django_id', 'extra', 'hello', 'id', 'pub_date', 'whee']) 142 143 self.assertEqual(len(self.cmi.full_prepare(mock)), 11) 144 self.assertEqual(sorted(self.cmi.full_prepare(mock).keys()), ['author', 'author_exact', 'content', 'django_ct', 'django_id', 'extra', 'hello', 'id', 'pub_date', 'pub_date_exact', 'whee']) 145 166 self.assertEqual(len(self.cmi.prepare(mock)), 9) 167 self.assertEqual(sorted(self.cmi.prepare(mock).keys()), ['author', 'content', 'django_ct', 'django_id', 'extra', 'hello', 'id', 'pub_date', 'whee']) 168 265 self.assertEqual(len(prepared_data), 4) 266 self.assertEqual(sorted(prepared_data.keys()), ['content', 'django_ct', 'django_id', 'id']) 267util.py https://github.com/dimagi/commcare-hq.git | Python | 427 lines
6 7from django.conf import settings 8from django.core.cache import cache 8from django.core.cache import cache 9from django.http import Http404 10from django.utils.translation import gettext as _ 299 300# Copied/extended from http://djangosnippets.org/snippets/1170/ 301def batch_qs(qs, num_batches=10, min_batch_size=100000):views.py https://github.com/fwenzel/kitsune.git | Python | 421 lines
5 6from django.conf import settings 7from django.contrib.sites.models import Site 7from django.contrib.sites.models import Site 8from django.db.models import ObjectDoesNotExist 9from django.http import HttpResponse, HttpResponseBadRequest 9from django.http import HttpResponse, HttpResponseBadRequest 10from django.utils.http import urlencode 11from django.views.decorators.cache import cache_pagebasecompiler.py https://github.com/progrium/winnitron.git | Python | 357 lines
1from django.conf import settings 2from django.db.models.sql import aggregates as sqlaggregates 2from django.db.models.sql import aggregates as sqlaggregates 3from django.db.models.sql.compiler import SQLCompiler 4from django.db.models.sql.constants import LOOKUP_SEP, MULTI, SINGLE 4from django.db.models.sql.constants import LOOKUP_SEP, MULTI, SINGLE 5from django.db.models.sql.where import AND, OR 6from django.db.utils import DatabaseError, IntegrityError 6from django.db.utils import DatabaseError, IntegrityError 7from django.utils.tree import Node 8import random 94 def _normalize_lookup_value(self, value, annotation, lookup_type): 95 # Django fields always return a list (see Field.get_db_prep_lookup) 96 # except if get_db_prep_lookup got overridden by a subclass 153 154 # Django fields always return a list (see Field.get_db_prep_lookup) 155 # except if get_db_prep_lookup got overridden by a subclassSelectFilter2.js https://github.com/Tippr/django.git | JavaScript | 155 lines
154 155})(django.jQuery); 156tests.py https://github.com/Tippr/django.git | Python | 274 lines
3 4from django.contrib.auth.decorators import login_required, permission_required, user_passes_test 5from django.contrib.admin.views.decorators import staff_member_required 5from django.contrib.admin.views.decorators import staff_member_required 6from django.http import HttpResponse, HttpRequest, HttpResponseNotAllowed 7from django.test.utils import get_warnings_state, restore_warnings_state 7from django.test.utils import get_warnings_state, restore_warnings_state 8from django.utils.decorators import method_decorator 9from django.utils.functional import allow_lazy, lazy, memoize 9from django.utils.functional import allow_lazy, lazy, memoize 10from django.utils.unittest import TestCase 11from django.views.decorators.http import require_http_methods, require_GET, require_POST, require_safe 11from django.views.decorators.http import require_http_methods, require_GET, require_POST, require_safe 12from django.views.decorators.vary import vary_on_headers, vary_on_cookie 13from django.views.decorators.cache import cache_page, never_cache, cache_controlhttp.py https://gitlab.com/areema/myproject | Python | 321 lines
11 12from django.utils import six 13from django.utils.datastructures import MultiValueDict 13from django.utils.datastructures import MultiValueDict 14from django.utils.encoding import force_bytes, force_str, force_text 15from django.utils.functional import allow_lazy 15from django.utils.functional import allow_lazy 16from django.utils.six.moves.urllib.parse import ( 17 quote, quote_plus, unquote, unquote_plus, urlencode as original_urlencode, 67 A wrapper for Python's urllib.unquote() function that can operate on 68 the result of django.utils.http.urlquote(). 69 """ 76 A wrapper for Python's urllib.unquote_plus() function that can operate on 77 the result of django.utils.http.urlquote_plus(). 78 """0003_address_unified.py https://github.com/Doap/django-cms.git | Python | 157 lines
2from south.db import db 3from django.db import models 4from cms.plugins.googlemap.models import * 45 'sites.site': { 46 'Meta': {'db_table': "'django_site'"}, 47 'domain': ('models.CharField', [], {'max_length': '100'}),