Skip to content

Instantly share code, notes, and snippets.

@ryan-blunden
Created December 18, 2018 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryan-blunden/9e9831055e0f106342ef5c1adf10c500 to your computer and use it in GitHub Desktop.
Save ryan-blunden/9e9831055e0f106342ef5c1adf10c500 to your computer and use it in GitHub Desktop.
Sourcegraph TextDocument
// A page can have multiple editors that each have their own document, e.g. a PR.
{
"uri": "git://github.com/django/django?d6eaf7c0183cd04b78f2a55e1d60bb7e59598310#django/__init__.py",
"languageId": "python",
"text": "from django.utils.version import get_versionVERSION = (2, 0, 0, 'alpha', 0)__version__ = get_version(VERSION)def setup(set_prefix=True): \"\"\" Configure the settings (this happens as a side effect of accessing the first setting), configure logging and populate the app registry. Set the thread-local urlresolvers script prefix if `set_prefix` is True. \"\"\" from django.apps import apps from django.conf import settings from django.urls import set_script_prefix from django.utils.encoding import force_text from django.utils.log import configure_logging configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) if set_prefix: set_script_prefix( '/' if settings.FORCE_SCRIPT_NAME is None else force_text(settings.FORCE_SCRIPT_NAME) ) apps.populate(settings.INSTALLED_APPS)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment