Remove some leftover playdoh references

This commit is contained in:
Josh Mize 2015-05-11 13:17:24 -05:00
Родитель cd0732a76f
Коммит b0a1374ba8
6 изменённых файлов: 10 добавлений и 187 удалений

Просмотреть файл

@ -10,12 +10,12 @@ awesome, and open sourcy as always. Perhaps even a little more.
Docs
----
bedrock is a [playdoh project][playdoh]. Check out the [playdoh docs][pd-docs]
Bedrock is a [Django][django] project. Check out the [django docs][dj-docs]
for general technical documentation. In addition, there are project-specific
[bedrock docs][br-docs].
[playdoh]: https://github.com/mozilla/playdoh
[pd-docs]: http://playdoh.readthedocs.org/
[django]: https://www.djangoproject.com/
[dj-docs]: https://docs.djangoproject.com/
[br-docs]: http://bedrock.readthedocs.org/
Contributing

Просмотреть файл

@ -54,11 +54,11 @@ SITE_ID = 1
# Logging
LOG_LEVEL = logging.INFO
HAS_SYSLOG = True
SYSLOG_TAG = "http_app_playdoh" # Change this after you fork.
SYSLOG_TAG = "http_app_bedrock"
LOGGING_CONFIG = None
# CEF Logging
CEF_PRODUCT = 'Playdoh'
CEF_PRODUCT = 'Bedrock'
CEF_VENDOR = 'Mozilla'
CEF_VERSION = '0'
CEF_DEVICE_VERSION = '0'

Просмотреть файл

@ -1,146 +0,0 @@
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""
Usage: update_site.py [options]
Updates a server's sources, vendor libraries, packages CSS/JS
assets, migrates the database, and other nifty deployment tasks.
Options:
-h, --help show this help message and exit
-e ENVIRONMENT, --environment=ENVIRONMENT
Type of environment. One of (prod|dev|stage) Example:
update_site.py -e stage
-v, --verbose Echo actions before taking them.
"""
import os
import sys
from textwrap import dedent
from optparse import OptionParser
from hashlib import md5
# Constants
PROJECT = 0
VENDOR = 1
ENV_BRANCH = {
# 'environment': [PROJECT_BRANCH, VENDOR_BRANCH],
'dev': ['base', 'master'],
'stage': ['master', 'master'],
'prod': ['prod', 'master'],
}
# The URL of the SVN repository with the localization files (*.po). If you set
# it to a non-empty value, remember to `git rm --cached -r locale` in the root
# of the project. Example:
# LOCALE_REPO_URL = 'https://svn.mozilla.org/projects/l10n-misc/trunk/playdoh/locale'
LOCALE_REPO_URL = ''
GIT_PULL = "git pull -q origin %(branch)s"
GIT_SUBMODULE = "git submodule update --init"
SVN_CO = "svn checkout --force %(url)s locale"
SVN_UP = "svn update"
COMPILE_MO = "./bin/compile-mo.sh %(localedir)s %(unique)s"
EXEC = 'exec'
CHDIR = 'chdir'
def update_site(env, debug):
"""Run through commands to update this site."""
error_updating = False
here = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
locale = os.path.join(here, 'locale')
unique = md5(locale).hexdigest()
project_branch = {'branch': ENV_BRANCH[env][PROJECT]}
vendor_branch = {'branch': ENV_BRANCH[env][VENDOR]}
commands = [
(CHDIR, here),
(EXEC, GIT_PULL % project_branch),
(EXEC, GIT_SUBMODULE),
]
# Checkout the locale repo into locale/ if the URL is known
if LOCALE_REPO_URL and not os.path.exists(os.path.join(locale, '.svn')):
commands += [
(EXEC, SVN_CO % {'url': LOCALE_REPO_URL}),
(EXEC, COMPILE_MO % {'localedir': locale, 'unique': unique}),
]
# Update locale dir if applicable
if os.path.exists(os.path.join(locale, '.svn')):
commands += [
(CHDIR, locale),
(EXEC, SVN_UP),
(CHDIR, here),
(EXEC, COMPILE_MO % {'localedir': locale, 'unique': unique}),
]
elif os.path.exists(os.path.join(locale, '.git')):
commands += [
(CHDIR, locale),
(EXEC, GIT_PULL % 'master'),
(CHDIR, here),
]
commands += [
(CHDIR, os.path.join(here, 'vendor')),
(EXEC, GIT_PULL % vendor_branch),
(EXEC, GIT_SUBMODULE),
(CHDIR, os.path.join(here)),
(EXEC, 'python2.6 vendor/src/schematic/schematic migrations/'),
(EXEC, 'python2.6 manage.py collectstatic --noinput'),
]
for cmd, cmd_args in commands:
if CHDIR == cmd:
if debug:
sys.stdout.write("cd %s\n" % cmd_args)
os.chdir(cmd_args)
elif EXEC == cmd:
if debug:
sys.stdout.write("%s\n" % cmd_args)
if not 0 == os.system(cmd_args):
error_updating = True
break
else:
raise Exception("Unknown type of command %s" % cmd)
if error_updating:
sys.stderr.write("There was an error while updating. Please try again "
"later. Aborting.\n")
def main():
""" Handels command line args. """
debug = False
usage = dedent("""\
%prog [options]
Updates a server's sources, vendor libraries, packages CSS/JS
assets, migrates the database, and other nifty deployment tasks.
""".rstrip())
options = OptionParser(usage=usage)
e_help = "Type of environment. One of (%s) Example: update_site.py \
-e stage" % '|'.join(ENV_BRANCH.keys())
options.add_option("-e", "--environment", help=e_help)
options.add_option("-v", "--verbose",
help="Echo actions before taking them.",
action="store_true", dest="verbose")
(opts, _) = options.parse_args()
if opts.verbose:
debug = True
if opts.environment in ENV_BRANCH.keys():
update_site(opts.environment, debug)
else:
sys.stderr.write("Invalid environment!\n")
options.print_help(sys.stderr)
sys.exit(1)
if __name__ == '__main__':
main()

Просмотреть файл

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# playdoh documentation build configuration file, created by
# bedrock documentation build configuration file, created by
# sphinx-quickstart on Tue Jan 4 15:11:09 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
@ -164,7 +164,7 @@ html_static_path = ['_static']
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'playdohdoc'
htmlhelp_basename = 'bedrockdoc'
# -- Options for LaTeX output --------------------------------------------------
@ -178,7 +178,7 @@ htmlhelp_basename = 'playdohdoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'playdoh.tex', u'playdoh Documentation',
('index', 'bedrock.tex', u'bedrock Documentation',
u'Mozilla', 'manual'),
]

Просмотреть файл

@ -10,8 +10,7 @@ Welcome to mozilla.org's documentation!
shiny, awesome, and open sourcy as always. Perhaps even a little more.
bedrock is a web application based on `Django
<http://www.djangoproject.com/>`_/`Playdoh
<https://github.com/mozilla/playdoh>`_.
<http://www.djangoproject.com/>`_.
Patches are welcome! Feel free to fork and contribute to this project on
`Github <https://github.com/mozilla/bedrock>`_.

Просмотреть файл

@ -11,9 +11,6 @@ Installing Bedrock
Installation
------------
It's a simple `Playdoh
<http://playdoh.readthedocs.org/en/latest/index.html>`_ instance, which is a Django project.
These instructions assume you have `git` and `pip` installed. If you don't have `pip` installed, you can install it with `easy_install pip`.
Start by getting the source::
@ -171,8 +168,7 @@ Apache config - create file ``/etc/apache2/sites-available/mozilla.com``::
RewriteMap org-urls-410 txt:/path/to/mozilla.com/org-urls-410.txt
RewriteMap org-urls-301 txt:/path/to/mozilla.com/org-urls-301.txt
# In the path below, update "python2.6" to whatever version of python2 is provided.
WSGIDaemonProcess bedrock_local python-path=/path/to/bedrock:/path/to/venv-for-bedrock/lib/python2.6/site-packages
WSGIDaemonProcess bedrock_local python-path=/path/to/bedrock:/path/to/venv-for-bedrock/lib/python2.7/site-packages
WSGIProcessGroup bedrock_local
WSGIScriptAlias /b /path/to/bedrock/wsgi/playdoh.wsgi process-group=bedrock_local application-group=bedrock_local
@ -262,32 +258,6 @@ And to list all Waffle switches::
./manage.py switch -l
Upgrading
---------
On May 15th, 2013 we upgraded to a newer version of Playdoh_. This brought with it a lot of structural changes to the code.
Here are the required steps to get up and running again with the latest code::
# get the code
git pull origin master
# update the submodules
git submodule update --init --recursive
# move your local settings file
mv settings/local.py bedrock/settings/local.py
# remove old empty directories
rm -rf apps
rm -rf settings
rm -rf vendor-local/src/django
rm -rf vendor-local/src/tower
rm -rf vendor-local/src/jingo-minify
That should do it. If you're not able to run the tests at that point (``python manage.py test``) then there are a couple more things to try.
1. If you have a line like ``from settings.base import *`` in your ``bedrock/settings/local.py`` file, remove it.
2. If you were setting a logging level in your ``bedrock/settings/local.py`` file, you may now need to explicitly need to import it (``import logging``).
Otherwise please pop into our IRC channel (``#www`` on ``irc.mozilla.org``) and we'll be happy to help.
Notes
-----