Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
PyCon
pycon2019
Repository navigation
Code
Issues
45
(45)
Pull requests
12
(12)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
pycon2019
/
manage.py
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
executable file
·
34 lines (28 loc) · 1.22 KB
master
Breadcrumbs
pycon2019
/
manage.py
Copy path
Top
File metadata and controls
Code
Blame
executable file
·
34 lines (28 loc) · 1.22 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
import os
import sys
# All this settings-picking stuff was mainly so we could start gunicorn
# on the server using `manage.py run_gunicorn` and Django would figure out
# for itself which settings to use. We're not doing that anymore, but
# I'm not sure if anything else relies on that.
if __name__ == "__main__":
settings = None
if 'IS_PRODUCTION' in os.environ:
# We're on a deployed server if the var "IS_PRODUCTION" exists, with any value.
# The value tells us if we're production or staging, so we
# can use the appropriate settings. The value is set by Chef
# using Ruby, so True is spelled 'true'.
if os.environ['IS_PRODUCTION'] == 'true':
settings = "production"
else:
settings = "staging"
elif 'test' in sys.argv:
# Running tests - use test-specific settings
settings = "test"
else:
# Try to load pycon.settings.local and fail with a useful message
# if that doesn't work.
settings = "default"
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pycon.settings.%s" % settings)
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
You can’t perform that action at this time.