id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,900 | uploadedfile.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/files/uploadedfile.py | """
Classes representing uploaded files.
"""
import os
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.conf import settings
from django.core.files.base import File
from django.core.files import temp as tempfile
from django.utils.encoding import smart_str
__al... | 4,225 | Python | .py | 105 | 31.866667 | 92 | 0.624115 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,901 | uploadhandler.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/files/uploadhandler.py | """
Base file upload handler classes, and the built-in concrete subclasses
"""
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.files.uploadedfile import TemporaryUplo... | 7,028 | Python | .py | 182 | 30.785714 | 135 | 0.643182 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,902 | temp.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/files/temp.py | """
The temp module provides a NamedTemporaryFile that can be re-opened on any
platform. Most platforms use the standard Python tempfile.TemporaryFile class,
but MS Windows users are given a custom class.
This is needed because in Windows NT, the default implementation of
NamedTemporaryFile uses the O_TEMPORARY flag, ... | 1,819 | Python | .py | 46 | 29.847826 | 78 | 0.61713 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,903 | images.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/files/images.py | """
Utility functions for handling images.
Requires PIL, as you might imagine.
"""
from django.core.files import File
class ImageFile(File):
"""
A mixin for use alongside django.core.files.base.File, which provides
additional features for dealing with images.
"""
def _get_width(self):
ret... | 1,733 | Python | .py | 55 | 24.054545 | 79 | 0.612208 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,904 | utils.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/files/utils.py | class FileProxyMixin(object):
"""
A mixin class used to forward file methods to an underlaying file
object. The internal file object has to be called "file"::
class FileProxy(FileProxyMixin):
def __init__(self, file):
self.file = file
"""
encoding = property(la... | 1,230 | Python | .py | 26 | 41.269231 | 69 | 0.705246 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,905 | move.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/files/move.py | """
Move a file in the safest way possible::
>>> from django.core.files.move import file_move_safe
>>> file_move_safe("/tmp/old_file", "/tmp/new_file")
"""
import os
from django.core.files import locks
try:
from shutil import copystat
except ImportError:
import stat
def copystat(src, dst):
... | 2,931 | Python | .py | 75 | 31.213333 | 94 | 0.616954 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,906 | storage.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/files/storage.py | import os
import errno
import urlparse
import itertools
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation
from django.core.files import locks, File
from django.core.files.move import file_move_safe
from django.utils.encoding import force_unicode, filepath_to_... | 8,943 | Python | .py | 206 | 33.936893 | 110 | 0.623865 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,907 | base.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/files/base.py | import os
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.utils.encoding import smart_str, smart_unicode
from django.core.files.utils import FileProxyMixin
class File(FileProxyMixin):
DEFAULT_CHUNK_SIZE = 64 * 2**10
def __init__(self, file, name=None)... | 3,771 | Python | .py | 106 | 26.235849 | 80 | 0.568875 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,908 | locks.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/files/locks.py | """
Portable file locking utilities.
Based partially on example by Jonathan Feignberg <jdf@pobox.com> in the Python
Cookbook, licensed under the Python Software License.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203
Example Usage::
>>> from django.core.files import locks
>>> f = open('./... | 1,791 | Python | .py | 56 | 27.303571 | 78 | 0.668797 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,909 | message.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/mail/message.py | import mimetypes
import os
import random
import time
from email import Charset, Encoders
from email.MIMEText import MIMEText
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.Header import Header
from email.Utils import formatdate, getaddresses, formataddr
from django.conf im... | 11,460 | Python | .py | 274 | 33.525547 | 122 | 0.64237 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,910 | utils.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/mail/utils.py | """
Email message and email sending related helper functions.
"""
import socket
# Cache the hostname, but do it lazily: socket.getfqdn() can take a couple of
# seconds, which slows down the restart of the server.
class CachedDnsName(object):
def __str__(self):
return self.get_fqdn()
def get_fqdn(sel... | 459 | Python | .py | 14 | 28.285714 | 77 | 0.684091 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,911 | __init__.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/mail/__init__.py | """
Tools for sending email.
"""
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
# Imported for backwards compatibility, and for the sake
# of a cleaner namespace. These symbols used to be in
# django/core/mail.py before the int... | 4,799 | Python | .py | 92 | 43.75 | 84 | 0.685367 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,912 | locmem.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/mail/backends/locmem.py | """
Backend for test environment.
"""
from django.core import mail
from django.core.mail.backends.base import BaseEmailBackend
class EmailBackend(BaseEmailBackend):
"""A email backend for use during test sessions.
The test connection stores email messages in a dummy outbox,
rather than sending them out o... | 743 | Python | .py | 19 | 33.631579 | 73 | 0.696801 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,913 | console.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/mail/backends/console.py | """
Email backend that writes messages to console instead of sending them.
"""
import sys
import threading
from django.core.mail.backends.base import BaseEmailBackend
class EmailBackend(BaseEmailBackend):
def __init__(self, *args, **kwargs):
self.stream = kwargs.pop('stream', sys.stdout)
self._loc... | 1,295 | Python | .py | 34 | 27.117647 | 77 | 0.562798 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,914 | base.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/mail/backends/base.py | """Base email backend class."""
class BaseEmailBackend(object):
"""
Base class for email backend implementations.
Subclasses must at least overwrite send_messages().
"""
def __init__(self, fail_silently=False, **kwargs):
self.fail_silently = fail_silently
def open(self):
"""Op... | 1,164 | Python | .py | 30 | 31.1 | 78 | 0.666667 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,915 | filebased.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/mail/backends/filebased.py | """Email backend that writes messages to a file."""
import datetime
import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.mail.backends.console import EmailBackend as ConsoleEmailBackend
class EmailBackend(ConsoleEmailBackend):
def __init__(self, *arg... | 2,485 | Python | .py | 52 | 38.5 | 131 | 0.629843 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,916 | smtp.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/mail/backends/smtp.py | """SMTP email backend class."""
import smtplib
import socket
import threading
from django.conf import settings
from django.core.mail.backends.base import BaseEmailBackend
from django.core.mail.utils import DNS_NAME
from django.core.mail.message import sanitize_address
class EmailBackend(BaseEmailBackend):
"""
... | 3,878 | Python | .py | 102 | 26.617647 | 87 | 0.575219 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,917 | dummy.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/mail/backends/dummy.py | """
Dummy email backend that does nothing.
"""
from django.core.mail.backends.base import BaseEmailBackend
class EmailBackend(BaseEmailBackend):
def send_messages(self, email_messages):
return len(email_messages)
| 227 | Python | .py | 7 | 29.428571 | 59 | 0.784404 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,918 | profiler-hotshot.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/handlers/profiler-hotshot.py | import hotshot, time, os
from django.core.handlers.modpython import ModPythonHandler
PROFILE_DATA_DIR = "/var/log/cmsprofile"
def handler(req):
'''
Handler that uses hotshot to store profile data.
Stores profile data in PROFILE_DATA_DIR. Since hotshot has no way (that I
know of) to append profile da... | 934 | Python | .py | 18 | 47.555556 | 83 | 0.719298 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,919 | base.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/handlers/base.py | import sys
from django import http
from django.core import signals
from django.utils.encoding import force_unicode
from django.utils.importlib import import_module
class BaseHandler(object):
# Changes that are always applied to a response (in this order).
response_fixes = [
http.fix_location_header,
... | 9,926 | Python | .py | 192 | 38.822917 | 143 | 0.611993 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,920 | modpython.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/handlers/modpython.py | import os
from pprint import pformat
from django import http
from django.core import signals
from django.core.handlers.base import BaseHandler
from django.core.urlresolvers import set_script_prefix
from django.utils import datastructures
from django.utils.encoding import force_unicode, smart_str, iri_to_uri
# NOTE: d... | 9,160 | Python | .py | 199 | 35.442211 | 130 | 0.590797 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,921 | wsgi.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/handlers/wsgi.py | from threading import Lock
from pprint import pformat
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django import http
from django.core import signals
from django.core.handlers import base
from django.core.urlresolvers import set_script_prefix
from django.utils impo... | 9,928 | Python | .py | 242 | 31.128099 | 140 | 0.591761 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,922 | sql.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/sql.py | import os
import re
from django.conf import settings
from django.core.management.base import CommandError
from django.db import models
from django.db.models import get_models
def sql_create(app, style, connection):
"Returns a list of the CREATE TABLE SQL statements for the given app."
if connection.settings_... | 7,941 | Python | .py | 149 | 45.812081 | 121 | 0.683593 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,923 | __init__.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/__init__.py | import os
import sys
from optparse import OptionParser, NO_DEFAULT
import imp
import django
from django.core.management.base import BaseCommand, CommandError, handle_default_options
from django.utils.importlib import import_module
# For backwards compatibility: get_version() used to be in this module.
get_version = d... | 17,405 | Python | .py | 377 | 36.72679 | 105 | 0.633583 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,924 | validation.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/validation.py | import sys
from django.contrib.contenttypes.generic import GenericForeignKey, GenericRelation
from django.core.management.color import color_style
from django.utils.itercompat import is_iterable
try:
any
except NameError:
from django.utils.itercompat import any
class ModelErrorCollection:
def __init__(se... | 19,209 | Python | .py | 282 | 48.453901 | 264 | 0.529962 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,925 | color.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/color.py | """
Sets up the terminal color scheme.
"""
import os
import sys
from django.utils import termcolors
def supports_color():
"""
Returns True if the running system's terminal supports color, and False
otherwise.
"""
unsupported_platform = (sys.platform in ('win32', 'Pocket PC'))
# isatty is not ... | 1,608 | Python | .py | 45 | 28.311111 | 75 | 0.630295 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,926 | base.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/base.py | """
Base classes for writing management commands (named commands which can
be executed through ``django-admin.py`` or ``manage.py``).
"""
import os
import sys
from optparse import make_option, OptionParser
import django
from django.core.exceptions import ImproperlyConfigured
from django.core.management.color import ... | 16,447 | Python | .py | 361 | 36.858726 | 177 | 0.634116 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,927 | reset.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/reset.py | from optparse import make_option
from django.conf import settings
from django.core.management.base import AppCommand, CommandError
from django.core.management.color import no_style
from django.core.management.sql import sql_reset
from django.db import connections, transaction, DEFAULT_DB_ALIAS
class Command(AppComman... | 2,273 | Python | .py | 48 | 39.625 | 106 | 0.651625 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,928 | runfcgi.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/runfcgi.py | from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Runs this project as a FastCGI application. Requires flup."
args = '[various KEY=val options, use `runfcgi help` for help]'
def handle(self, *args, **options):
from django.conf import settings
from djan... | 760 | Python | .py | 17 | 36.470588 | 78 | 0.70082 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,929 | inspectdb.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/inspectdb.py | import keyword
from optparse import make_option
from django.core.management.base import NoArgsCommand, CommandError
from django.db import connections, DEFAULT_DB_ALIAS
class Command(NoArgsCommand):
help = "Introspects the database tables in the given database and outputs a Django model module."
option_list =... | 7,614 | Python | .py | 140 | 39.65 | 114 | 0.558007 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,930 | compilemessages.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/compilemessages.py | import codecs
import os
import sys
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
def has_bom(fn):
f = open(fn, 'r')
sample = f.read(4)
return sample[:3] == '\xef\xbb\xbf' or \
sample.startswith(codecs.BOM_UTF16_LE) or \
sample.sta... | 2,824 | Python | .py | 54 | 40.907407 | 160 | 0.608113 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,931 | testserver.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/testserver.py | from django.core.management.base import BaseCommand
from optparse import make_option
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--addrport', action='store', dest='addrport',
type='string', default='',
help='port number or ipaddr:port to run t... | 1,408 | Python | .py | 25 | 48.6 | 144 | 0.685818 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,932 | test.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/test.py | from django.core.management.base import BaseCommand
from optparse import make_option
import sys
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--noinput', action='store_false', dest='interactive', default=True,
help='Tells Django to NOT prompt the user for in... | 1,754 | Python | .py | 34 | 42.294118 | 120 | 0.665111 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,933 | makemessages.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/makemessages.py | import fnmatch
import glob
import os
import re
import sys
from itertools import dropwhile
from optparse import make_option
from subprocess import PIPE, Popen
from django.core.management.base import CommandError, BaseCommand
from django.utils.text import get_text_list
pythonize_re = re.compile(r'(?:^|\n)\s*//')
plural... | 14,599 | Python | .py | 288 | 39.1875 | 426 | 0.580123 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,934 | flush.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/flush.py | from optparse import make_option
from django.conf import settings
from django.db import connections, router, transaction, models, DEFAULT_DB_ALIAS
from django.core.management import call_command
from django.core.management.base import NoArgsCommand, CommandError
from django.core.management.color import no_style
from d... | 3,433 | Python | .py | 69 | 40 | 103 | 0.642388 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,935 | sqlreset.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/sqlreset.py | from optparse import make_option
from django.core.management.base import AppCommand
from django.core.management.sql import sql_reset
from django.db import connections, DEFAULT_DB_ALIAS
class Command(AppCommand):
help = "Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s)."
option_... | 774 | Python | .py | 14 | 49.285714 | 125 | 0.706897 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,936 | sqlclear.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/sqlclear.py | from optparse import make_option
from django.core.management.base import AppCommand
from django.core.management.sql import sql_delete
from django.db import connections, DEFAULT_DB_ALIAS
class Command(AppCommand):
help = "Prints the DROP TABLE SQL statements for the given app name(s)."
option_list = AppComman... | 758 | Python | .py | 14 | 48.214286 | 126 | 0.709066 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,937 | loaddata.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/loaddata.py | import sys
import os
import gzip
import zipfile
from optparse import make_option
from django.conf import settings
from django.core import serializers
from django.core.management.base import BaseCommand
from django.core.management.color import no_style
from django.db import connections, router, transaction, DEFAULT_DB_... | 11,034 | Python | .py | 214 | 33.126168 | 120 | 0.506255 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,938 | diffsettings.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/diffsettings.py | from django.core.management.base import NoArgsCommand
def module_to_dict(module, omittable=lambda k: k.startswith('_')):
"Converts a module namespace to a Python dictionary. Used by get_settings_diff."
return dict([(k, repr(v)) for k, v in module.__dict__.items() if not omittable(k)])
class Command(NoArgsComm... | 1,296 | Python | .py | 25 | 43.68 | 87 | 0.651108 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,939 | startapp.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/startapp.py | import os
from django.core.management.base import copy_helper, CommandError, LabelCommand
from django.utils.importlib import import_module
class Command(LabelCommand):
help = "Creates a Django app directory structure for the given app name in the current directory."
args = "[appname]"
label = 'application... | 1,909 | Python | .py | 37 | 43.324324 | 160 | 0.678303 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,940 | sql.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/sql.py | from optparse import make_option
from django.core.management.base import AppCommand
from django.core.management.sql import sql_create
from django.db import connections, DEFAULT_DB_ALIAS
class Command(AppCommand):
help = "Prints the CREATE TABLE SQL statements for the given app name(s)."
option_list = AppComm... | 760 | Python | .py | 14 | 48.357143 | 126 | 0.709852 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,941 | sqlindexes.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/sqlindexes.py | from optparse import make_option
from django.core.management.base import AppCommand
from django.core.management.sql import sql_indexes
from django.db import connections, DEFAULT_DB_ALIAS
class Command(AppCommand):
help = "Prints the CREATE INDEX SQL statements for the given model module name(s)."
option_list... | 772 | Python | .py | 14 | 49.142857 | 127 | 0.712766 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,942 | runserver.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/runserver.py | from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
import os
import sys
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--noreload', action='store_false', dest='use_reloader', default=True,
help='Tells Django to ... | 3,574 | Python | .py | 75 | 35.6 | 109 | 0.587393 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,943 | dumpdata.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/dumpdata.py | from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import BaseCommand, CommandError
from django.core import serializers
from django.db import connections, router, DEFAULT_DB_ALIAS
from django.utils.datastructures import SortedDict
from optparse import make_option
class Command(Ba... | 7,593 | Python | .py | 148 | 38.959459 | 99 | 0.59763 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,944 | sqlsequencereset.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/sqlsequencereset.py | from optparse import make_option
from django.core.management.base import AppCommand
from django.db import connections, models, DEFAULT_DB_ALIAS
class Command(AppCommand):
help = 'Prints the SQL statements for resetting sequences for the given app name(s).'
option_list = AppCommand.option_list + (
mak... | 819 | Python | .py | 14 | 51.928571 | 139 | 0.709637 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,945 | sqlall.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/sqlall.py | from optparse import make_option
from django.core.management.base import AppCommand
from django.core.management.sql import sql_all
from django.db import connections, DEFAULT_DB_ALIAS
class Command(AppCommand):
help = "Prints the CREATE TABLE, custom SQL and CREATE INDEX SQL statements for the given model module n... | 792 | Python | .py | 14 | 50.642857 | 123 | 0.712807 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,946 | cleanup.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/cleanup.py | import datetime
from django.core.management.base import NoArgsCommand
class Command(NoArgsCommand):
help = "Can be run as a cronjob or directly to clean out old data from the database (only expired sessions at the moment)."
def handle_noargs(self, **options):
from django.db import transaction
... | 496 | Python | .py | 9 | 49.444444 | 127 | 0.754639 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,947 | shell.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/shell.py | import os
from django.core.management.base import NoArgsCommand
from optparse import make_option
class Command(NoArgsCommand):
option_list = NoArgsCommand.option_list + (
make_option('--plain', action='store_true', dest='plain',
help='Tells Django to use plain Python, not IPython.'),
)
... | 2,962 | Python | .py | 63 | 33.126984 | 92 | 0.581749 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,948 | validate.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/validate.py | from django.core.management.base import NoArgsCommand
class Command(NoArgsCommand):
help = "Validates all installed models."
requires_model_validation = False
def handle_noargs(self, **options):
self.validate(display_num_errors=True)
| 257 | Python | .py | 6 | 38 | 53 | 0.762097 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,949 | syncdb.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/syncdb.py | from optparse import make_option
import sys
from django.conf import settings
from django.core.management.base import NoArgsCommand
from django.core.management.color import no_style
from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal
from django.db import connections, router, transaction,... | 7,931 | Python | .py | 138 | 41.804348 | 121 | 0.581629 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,950 | startproject.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/startproject.py | from django.core.management.base import copy_helper, CommandError, LabelCommand
from django.utils.importlib import import_module
import os
import re
from random import choice
class Command(LabelCommand):
help = "Creates a Django project directory structure for the given project name in the current directory."
... | 1,680 | Python | .py | 33 | 43.787879 | 167 | 0.68312 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,951 | sqlflush.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/sqlflush.py | from optparse import make_option
from django.core.management.base import NoArgsCommand
from django.core.management.sql import sql_flush
from django.db import connections, DEFAULT_DB_ALIAS
class Command(NoArgsCommand):
help = "Returns a list of the SQL statements required to return all tables in the database to th... | 853 | Python | .py | 14 | 55 | 153 | 0.726619 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,952 | sqlinitialdata.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/sqlinitialdata.py | from django.core.management.base import AppCommand, CommandError
class Command(AppCommand):
help = "RENAMED: see 'sqlcustom'"
def handle(self, *apps, **options):
raise CommandError("This command has been renamed. Use the 'sqlcustom' command instead.")
| 270 | Python | .py | 5 | 49.4 | 97 | 0.745247 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,953 | sqlcustom.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/sqlcustom.py | from optparse import make_option
from django.core.management.base import AppCommand
from django.core.management.sql import sql_custom
from django.db import connections, DEFAULT_DB_ALIAS
class Command(AppCommand):
help = "Prints the custom table modifying SQL statements for the given app name(s)."
option_list... | 770 | Python | .py | 14 | 49.071429 | 126 | 0.712383 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,954 | createcachetable.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/createcachetable.py | from optparse import make_option
from django.core.management.base import LabelCommand
from django.db import connections, transaction, models, DEFAULT_DB_ALIAS
class Command(LabelCommand):
help = "Creates the table needed to use the SQL cache backend."
args = "<tablename>"
label = 'tablename'
option_l... | 2,307 | Python | .py | 48 | 37.625 | 94 | 0.594499 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,955 | dbshell.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/management/commands/dbshell.py | from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from django.db import connections, DEFAULT_DB_ALIAS
class Command(BaseCommand):
help = ("Runs the command-line client for specified database, or the "
"default database if none is provided.")
option_lis... | 1,261 | Python | .py | 23 | 45.956522 | 101 | 0.679643 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,956 | __init__.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/cache/__init__.py | """
Caching framework.
This package defines set of cache backends that all conform to a simple API.
In a nutshell, a cache is a set of values -- which can be any object that
may be pickled -- identified by string keys. For the complete API, see
the abstract BaseCache class in django.core.cache.backends.base.
Client ... | 2,650 | Python | .py | 66 | 36.348485 | 85 | 0.711396 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,957 | db.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/cache/backends/db.py | "Database cache backend."
from django.core.cache.backends.base import BaseCache
from django.db import connections, router, transaction, DatabaseError
import base64, time
from datetime import datetime
try:
import cPickle as pickle
except ImportError:
import pickle
class Options(object):
"""A class that wil... | 5,954 | Python | .py | 127 | 36.952756 | 134 | 0.606989 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,958 | locmem.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/cache/backends/locmem.py | "Thread-safe in-memory cache backend."
import time
try:
import cPickle as pickle
except ImportError:
import pickle
from django.core.cache.backends.base import BaseCache
from django.utils.synch import RWLock
class CacheClass(BaseCache):
def __init__(self, _, params):
BaseCache.__init__(self, param... | 4,062 | Python | .py | 127 | 21 | 94 | 0.522837 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,959 | memcached.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/cache/backends/memcached.py | "Memcached cache backend"
import time
from django.core.cache.backends.base import BaseCache, InvalidCacheBackendError
from django.utils.encoding import smart_unicode, smart_str
try:
import cmemcache as memcache
import warnings
warnings.warn(
"Support for the 'cmemcache' library has been deprecate... | 3,558 | Python | .py | 85 | 33.294118 | 119 | 0.6326 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,960 | base.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/cache/backends/base.py | "Base Cache class."
import warnings
from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning
class InvalidCacheBackendError(ImproperlyConfigured):
pass
class CacheKeyWarning(DjangoRuntimeWarning):
pass
# Memcached does not accept keys longer than this.
MEMCACHE_MAX_KEY_LENGTH = 250
cl... | 4,723 | Python | .py | 120 | 30.275 | 80 | 0.609085 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,961 | filebased.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/cache/backends/filebased.py | "File-based cache backend"
import os
import time
import shutil
try:
import cPickle as pickle
except ImportError:
import pickle
from django.core.cache.backends.base import BaseCache
from django.utils.hashcompat import md5_constructor
class CacheClass(BaseCache):
def __init__(self, dir, params):
Ba... | 5,006 | Python | .py | 145 | 23.634483 | 116 | 0.539607 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,962 | dummy.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/cache/backends/dummy.py | "Dummy cache backend"
from django.core.cache.backends.base import BaseCache
class CacheClass(BaseCache):
def __init__(self, *args, **kwargs):
pass
def add(self, key, *args, **kwargs):
self.validate_key(key)
return True
def get(self, key, default=None):
self.validate_key(k... | 802 | Python | .py | 26 | 23.884615 | 53 | 0.605229 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,963 | python.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/serializers/python.py | """
A Python "serializer". Doesn't do much serializing per se -- just converts to
and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for
other serializers.
"""
from django.conf import settings
from django.core.serializers import base
from django.db import models, DEFAULT_DB_ALIAS
from dj... | 5,919 | Python | .py | 122 | 36.278689 | 126 | 0.584213 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,964 | pyyaml.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/serializers/pyyaml.py | """
YAML serializer.
Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__.
"""
from StringIO import StringIO
import decimal
import yaml
from django.db import models
from django.core.serializers.python import Serializer as PythonSerializer
from django.core.serializers.python import Deserializer as... | 1,948 | Python | .py | 44 | 38.636364 | 88 | 0.718816 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,965 | xml_serializer.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/serializers/xml_serializer.py | """
XML serializer.
"""
from django.conf import settings
from django.core.serializers import base
from django.db import models, DEFAULT_DB_ALIAS
from django.utils.xmlutils import SimplerXMLGenerator
from django.utils.encoding import smart_unicode
from xml.dom import pulldom
class Serializer(base.Serializer):
"""
... | 11,885 | Python | .py | 265 | 33.015094 | 114 | 0.574301 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,966 | __init__.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/serializers/__init__.py | """
Interfaces for serializing Django objects.
Usage::
from django.core import serializers
json = serializers.serialize("json", some_query_set)
objects = list(serializers.deserialize("json", json))
To add your own serializers, use the SERIALIZATION_MODULES setting::
SERIALIZATION_MODULES = {
... | 3,665 | Python | .py | 96 | 33.333333 | 92 | 0.714487 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,967 | base.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/serializers/base.py | """
Module for abstract serializer/unserializer base classes.
"""
from StringIO import StringIO
from django.db import models
from django.utils.encoding import smart_str, smart_unicode
from django.utils import datetime_safe
class SerializationError(Exception):
"""Something bad happened during serialization."""
... | 5,487 | Python | .py | 143 | 29.587413 | 102 | 0.622013 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,968 | json.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/serializers/json.py | """
Serialize data to/from JSON
"""
import datetime
import decimal
from StringIO import StringIO
from django.core.serializers.python import Serializer as PythonSerializer
from django.core.serializers.python import Deserializer as PythonDeserializer
from django.utils import datetime_safe
from django.utils import simpl... | 1,920 | Python | .py | 51 | 31.568627 | 89 | 0.696448 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,969 | basehttp.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/servers/basehttp.py | """
BaseHTTPServer that implements the Python WSGI protocol (PEP 333, rev 1.21).
Adapted from wsgiref.simple_server: http://svn.eby-sarna.com/wsgiref/
This is a simple server for use in testing or debugging Django apps. It hasn't
been reviewed for security issues. Don't use it for production use.
"""
from BaseHTTPSe... | 26,570 | Python | .py | 600 | 34.768333 | 94 | 0.609463 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,970 | fastcgi.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/core/servers/fastcgi.py | """
FastCGI (or SCGI, or AJP1.3 ...) server that implements the WSGI protocol.
Uses the flup python package: http://www.saddi.com/software/flup/
This is a adaptation of the flup package to add FastCGI server support
to run Django apps from Web servers that support the FastCGI protocol.
This module can be run standalo... | 6,402 | Python | .py | 153 | 35.771242 | 95 | 0.646567 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,971 | context.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/template/context.py | from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
# Cache of actual callables.
_standard_context_processors = None
# We need the CSRF processor no matter what the user has in their settings,
# because otherwise it is a security vulnerability, and we can't afford t... | 5,323 | Python | .py | 127 | 34.062992 | 124 | 0.656552 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,972 | defaulttags.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/template/defaulttags.py | """Default tags used by the template system, available to all templates."""
import sys
import re
from itertools import groupby, cycle as itertools_cycle
from django.template import Node, NodeList, Template, Context, Variable
from django.template import TemplateSyntaxError, VariableDoesNotExist, BLOCK_TAG_START, BLOCK... | 42,517 | Python | .py | 1,018 | 32.983301 | 213 | 0.598271 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,973 | loader.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/template/loader.py | # Wrapper for loading templates from storage of some sort (e.g. filesystem, database).
#
# This uses the TEMPLATE_LOADERS setting, which is a list of loaders to use.
# Each loader is expected to have this interface:
#
# callable(name, dirs=[])
#
# name is the template name.
# dirs is an optional list of directories ... | 8,040 | Python | .py | 175 | 39.325714 | 207 | 0.702882 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,974 | __init__.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/template/__init__.py | """
This is the Django template system.
How it works:
The Lexer.tokenize() function converts a template string (i.e., a string containing
markup with custom template tags) to tokens, which can be either plain text
(TOKEN_TEXT), variables (TOKEN_VAR) or block statements (TOKEN_BLOCK).
The Parser() class takes a list ... | 39,979 | Python | .py | 907 | 33.497244 | 140 | 0.594857 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,975 | loader_tags.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/template/loader_tags.py | from django.template import TemplateSyntaxError, TemplateDoesNotExist, Variable
from django.template import Library, Node, TextNode
from django.template.loader import get_template
from django.conf import settings
from django.utils.safestring import mark_safe
register = Library()
BLOCK_CONTEXT_KEY = 'block_context'
c... | 8,017 | Python | .py | 186 | 34.473118 | 113 | 0.63085 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,976 | debug.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/template/debug.py | from django.template import Lexer, Parser, tag_re, NodeList, VariableNode, TemplateSyntaxError
from django.utils.encoding import force_unicode
from django.utils.html import escape
from django.utils.safestring import SafeData, EscapeData
from django.utils.formats import localize
class DebugLexer(Lexer):
def __init_... | 3,732 | Python | .py | 86 | 34.267442 | 104 | 0.634261 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,977 | smartif.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/template/smartif.py | """
Parser and utilities for the smart 'if' tag
"""
import operator
# Using a simple top down parser, as described here:
# http://effbot.org/zone/simple-top-down-parsing.htm.
# 'led' = left denotation
# 'nud' = null denotation
# 'bp' = binding power (left = lbp, right = rbp)
class TokenBase(object):
"""
Ba... | 6,261 | Python | .py | 167 | 29.60479 | 85 | 0.598018 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,978 | defaultfilters.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/template/defaultfilters.py | """Default variable filters."""
import re
from decimal import Decimal, InvalidOperation, ROUND_HALF_UP
import random as random_module
try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps # Python 2.4 fallback.
from django.template import Variable, Library
from django... | 28,573 | Python | .py | 811 | 29.849568 | 100 | 0.648067 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,979 | filesystem.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/template/loaders/filesystem.py | """
Wrapper for loading templates from the filesystem.
"""
from django.conf import settings
from django.template import TemplateDoesNotExist
from django.template.loader import BaseLoader
from django.utils._os import safe_join
class Loader(BaseLoader):
is_usable = True
def get_template_sources(self, template_... | 2,360 | Python | .py | 55 | 33.436364 | 140 | 0.648108 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,980 | app_directories.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/template/loaders/app_directories.py | """
Wrapper for loading templates from "templates" directories in INSTALLED_APPS
packages.
"""
import os
import sys
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.template import TemplateDoesNotExist
from django.template.loader import BaseLoader
from django.utils.... | 2,766 | Python | .py | 65 | 35.015385 | 150 | 0.686107 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,981 | eggs.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/template/loaders/eggs.py | # Wrapper for loading templates from eggs via pkg_resources.resource_string.
try:
from pkg_resources import resource_string
except ImportError:
resource_string = None
from django.template import TemplateDoesNotExist
from django.template.loader import BaseLoader
from django.conf import settings
class Loader(B... | 1,434 | Python | .py | 32 | 37.59375 | 128 | 0.703226 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,982 | cached.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/template/loaders/cached.py | """
Wrapper class that takes a list of template loaders as an argument and attempts
to load templates from them in order, caching the result.
"""
from django.core.exceptions import ImproperlyConfigured
from django.template import TemplateDoesNotExist
from django.template.loader import BaseLoader, get_template_from_str... | 2,464 | Python | .py | 51 | 38.294118 | 106 | 0.656133 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,983 | global_settings.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/global_settings.py | # Default Django settings. Override these with settings in the module
# pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
# This is defined here as a do-nothing function because we can't import
# django.utils.translation -- that module depends on the settings.
gettext_noop = lambda s: s
#################... | 19,225 | Python | .py | 424 | 43.238208 | 174 | 0.702262 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,984 | __init__.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/__init__.py | """
Settings and configuration for Django.
Values will be read from the module specified by the DJANGO_SETTINGS_MODULE environment
variable, and then from django.conf.global_settings; see the global settings file for
a list of all possible variables.
"""
import os
import re
import time # Needed for Windows
from ... | 5,338 | Python | .py | 114 | 37.77193 | 144 | 0.645136 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,985 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/cs/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'G:i:s'
DATETIME_FORMAT = 'j. F Y G:i:s'
YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j. F'
SHORT_DATE_FORMAT = 'd.m.Y'
SHORT_DATETIME_FORMAT = 'd.m.Y G:i:s'
FIRST_DAY_OF_WEEK = 1 ... | 1,010 | Python | .py | 31 | 30.129032 | 72 | 0.503067 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,986 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/ca/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = r'j \de F \de Y'
TIME_FORMAT = 'G:i:s'
DATETIME_FORMAT = r'j \de F \de Y \a \le\s G:i'
YEAR_MONTH_FORMAT = r'F \de\l Y'
MONTH_DAY_FORMAT = r'j \de F'
SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd... | 712 | Python | .py | 28 | 23.214286 | 72 | 0.570381 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,987 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/ja/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'Yๅนดnๆjๆฅ'
TIME_FORMAT = 'G:i:s'
DATETIME_FORMAT = 'YๅนดnๆjๆฅG:i:s'
YEAR_MONTH_FORMAT = 'Yๅนดnๆ'
MONTH_DAY_FORMAT = 'nๆjๆฅ'
SHORT_DATE_FORMAT = 'Y/m/d'
SHORT_DATETIME_FORMAT = 'Y/m/d G:i:s'
# FIRST_DAY_OF_WEEK = ... | 487 | Python | .py | 17 | 26.117647 | 72 | 0.701559 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,988 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/sr/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'j. F Y.'
TIME_FORMAT = 'H:i'
DATETIME_FORMAT = 'j. F Y. H:i'
YEAR_MONTH_FORMAT = 'F Y.'
MONTH_DAY_FORMAT = 'j. F'
SHORT_DATE_FORMAT = 'j.m.Y.'
SHORT_DATETIME_FORMAT = 'j.m.Y. H:i'
FIRST_DAY_OF_WEEK = 1
D... | 1,702 | Python | .py | 43 | 36.418605 | 76 | 0.406514 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,989 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/lt/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = r'Y \m. F j \d.'
TIME_FORMAT = 'H:i:s'
# DATETIME_FORMAT =
# YEAR_MONTH_FORMAT =
# MONTH_DAY_FORMAT =
SHORT_DATE_FORMAT = 'Y.m.d'
# SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK =
# DATE_INPUT_FORMATS ... | 445 | Python | .py | 17 | 24.588235 | 72 | 0.683841 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,990 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/es/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = r'j \de F \de Y'
TIME_FORMAT = 'H:i:s'
DATETIME_FORMAT = r'j \de F \de Y \a \l\a\s H:i'
YEAR_MONTH_FORMAT = r'F \de Y'
MONTH_DAY_FORMAT = r'j \de F'
SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/... | 711 | Python | .py | 28 | 23.178571 | 72 | 0.56975 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,991 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/no/formats.py | DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i'
DATETIME_FORMAT = 'j. F Y H:i'
YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j. F'
SHORT_DATE_FORMAT = 'd.m.Y'
SHORT_DATETIME_FORMAT = 'd.m.Y H:i'
FIRST_DAY_OF_WEEK = 1 # Monday
DATE_INPUT_FORMATS = (
'%Y-%m-%d', '%j.%m.%Y', '%j.%m.%y', # '2006-10-25', '25.10.2006', '25.10... | 1,277 | Python | .py | 34 | 34.558824 | 81 | 0.42317 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,992 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/sr_Latn/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'j. F Y.'
TIME_FORMAT = 'H:i'
DATETIME_FORMAT = 'j. F Y. H:i'
YEAR_MONTH_FORMAT = 'F Y.'
MONTH_DAY_FORMAT = 'j. F'
SHORT_DATE_FORMAT = 'j.m.Y.'
SHORT_DATETIME_FORMAT = 'j.m.Y. H:i'
FIRST_DAY_OF_WEEK = 1
D... | 1,702 | Python | .py | 43 | 36.418605 | 76 | 0.406514 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,993 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/el/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'd F Y'
TIME_FORMAT = 'g:i:s A'
# DATETIME_FORMAT =
YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'd M Y'
# SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK =
# DATE_INPUT_FORMATS =... | 444 | Python | .py | 17 | 24.647059 | 72 | 0.690141 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,994 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/nl/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'j F Y' # '20 januari 2009'
TIME_FORMAT = 'H:i' # '15:23'
DATETIME_FORMAT = 'j F Y H:i' # '20 januari 2009 15:23'
YEAR_MONTH_FORMAT = 'F Y' # ... | 2,778 | Python | .py | 47 | 55.787234 | 135 | 0.427839 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,995 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/ta/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'j F, Y'
TIME_FORMAT = 'g:i:s A'
# DATETIME_FORMAT =
# YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j M, Y'
# SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK =
# DATE_INPUT_FORMATS = ... | 441 | Python | .py | 17 | 24.294118 | 72 | 0.690307 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,996 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/te/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'g:i:s A'
# DATETIME_FORMAT =
# YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j M Y'
# SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK =
# DATE_INPUT_FORMATS =
#... | 439 | Python | .py | 17 | 24.176471 | 72 | 0.693587 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,997 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/ko/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'Y๋
n์ j์ผ'
TIME_FORMAT = 'A g:i:s'
DATETIME_FORMAT = 'Y๋
n์ j์ผ g:i:s A'
YEAR_MONTH_FORMAT = 'Y๋
F์'
MONTH_DAY_FORMAT = 'F์ j์ผ'
SHORT_DATE_FORMAT = 'Y-n-j.'
SHORT_DATETIME_FORMAT = 'Y-n-j H:i'
# FIRST_DAY_... | 1,738 | Python | .py | 41 | 36.926829 | 81 | 0.458698 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,998 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/th/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'G:i:s'
DATETIME_FORMAT = 'j F Y, G:i:s'
YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j M Y'
SHORT_DATETIME_FORMAT = 'j M Y, G:i:s'
# FIRST_DAY_OF_WEEK =
... | 466 | Python | .py | 17 | 26.058824 | 72 | 0.680804 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
3,999 | formats.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/conf/locale/km/formats.py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'j แแ F แแแแถแ Y'
TIME_FORMAT = 'G:i:s'
DATETIME_FORMAT = 'j แแ F แแแแถแ Y, G:i:s'
# YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j M Y'
SHORT_DATETIME_FORMAT = 'j M Y, G:i:s'
# FIRST_... | 509 | Python | .py | 17 | 26.882353 | 72 | 0.667387 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |