[manual] Rename Django app from zephyr to zerver.

This needs to be deployed to both staging and prod at the same
off-peak time (and the schema migration run).

At the time it is deployed, we need to make a few changes directly in
the database:

(1) UPDATE django_content_type set app_label='zerver' where app_label='zephyr';
(2) UPDATE south_migrationhistory set app_name='zerver' where app_name='zephyr';

(imported from commit eb3fd719571740189514ef0b884738cb30df1320)
This commit is contained in:
Tim Abbott 2013-07-29 17:03:31 -04:00
parent 950d271bc3
commit e111a2f9a5
406 changed files with 608 additions and 378 deletions

6
.gitignore vendored
View File

@ -11,9 +11,9 @@
.DS_Store .DS_Store
event_queues.pickle event_queues.pickle
stats/ stats/
zephyr/fixtures/available-migrations zerver/fixtures/available-migrations
zephyr/fixtures/migration-status zerver/fixtures/migration-status
zephyr/fixtures/test_data1.json zerver/fixtures/test_data1.json
.kdev4 .kdev4
humbug.kdev4 humbug.kdev4
memcached_prefix memcached_prefix

View File

@ -1,4 +1,4 @@
from zephyr.models import UserProfile, get_user_profile_by_id, \ from zerver.models import UserProfile, get_user_profile_by_id, \
get_user_profile_by_email get_user_profile_by_email
from openid.consumer.consumer import SUCCESS from openid.consumer.consumer import SUCCESS

View File

@ -4,7 +4,7 @@ import platform
import time import time
import re import re
from zephyr.openid import openid_failure_handler from zerver.openid import openid_failure_handler
SERVER_GENERATION = int(time.time()) SERVER_GENERATION = int(time.time())
@ -144,9 +144,9 @@ TEMPLATE_LOADERS = (
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
# Our logging middleware should be the first middleware item. # Our logging middleware should be the first middleware item.
'zephyr.middleware.LogRequests', 'zerver.middleware.LogRequests',
'zephyr.middleware.JsonErrorHandler', 'zerver.middleware.JsonErrorHandler',
'zephyr.middleware.RateLimitMiddleware', 'zerver.middleware.RateLimitMiddleware',
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
@ -158,9 +158,9 @@ AUTHENTICATION_BACKENDS = ('humbug.backends.EmailAuthBackend',
'guardian.backends.ObjectPermissionBackend') 'guardian.backends.ObjectPermissionBackend')
ANONYMOUS_USER_ID = None ANONYMOUS_USER_ID = None
AUTH_USER_MODEL = "zephyr.UserProfile" AUTH_USER_MODEL = "zerver.UserProfile"
TEST_RUNNER = 'zephyr.tests.Runner' TEST_RUNNER = 'zerver.tests.Runner'
ROOT_URLCONF = 'humbug.urls' ROOT_URLCONF = 'humbug.urls'
@ -179,7 +179,7 @@ INSTALLED_APPS = (
'confirmation', 'confirmation',
'guardian', 'guardian',
'pipeline', 'pipeline',
'zephyr', 'zerver',
) )
LOCAL_STATSD = (False) LOCAL_STATSD = (False)
@ -236,9 +236,9 @@ if DEBUG:
else: else:
STATIC_ROOT = 'static/' STATIC_ROOT = 'static/'
else: else:
STATICFILES_STORAGE = 'zephyr.storage.HumbugStorage' STATICFILES_STORAGE = 'zerver.storage.HumbugStorage'
STATICFILES_FINDERS = ( STATICFILES_FINDERS = (
'zephyr.finders.HumbugFinder', 'zerver.finders.HumbugFinder',
) )
if DEPLOYED: if DEPLOYED:
STATIC_ROOT = '/home/humbug/prod-static' STATIC_ROOT = '/home/humbug/prod-static'
@ -246,7 +246,7 @@ else:
STATIC_ROOT = 'prod-static/serve' STATIC_ROOT = 'prod-static/serve'
STATICFILES_DIRS = ['static/'] STATICFILES_DIRS = ['static/']
STATIC_HEADER_FILE = 'zephyr/static_header.txt' STATIC_HEADER_FILE = 'zerver/static_header.txt'
# To use minified files in dev, set PIPELINE = True. For the full # To use minified files in dev, set PIPELINE = True. For the full
# cache-busting behavior, you must also set DEBUG = False. # cache-busting behavior, you must also set DEBUG = False.
@ -473,25 +473,25 @@ LOGGING = {
}, },
'filters': { 'filters': {
'HumbugLimiter': { 'HumbugLimiter': {
'()': 'zephyr.lib.logging_util.HumbugLimiter', '()': 'zerver.lib.logging_util.HumbugLimiter',
}, },
'EmailLimiter': { 'EmailLimiter': {
'()': 'zephyr.lib.logging_util.EmailLimiter', '()': 'zerver.lib.logging_util.EmailLimiter',
}, },
'require_debug_false': { 'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse', '()': 'django.utils.log.RequireDebugFalse',
}, },
'nop': { 'nop': {
'()': 'zephyr.lib.logging_util.ReturnTrue', '()': 'zerver.lib.logging_util.ReturnTrue',
}, },
'require_really_deployed': { 'require_really_deployed': {
'()': 'zephyr.lib.logging_util.RequireReallyDeployed', '()': 'zerver.lib.logging_util.RequireReallyDeployed',
}, },
}, },
'handlers': { 'handlers': {
'humbug_admins': { 'humbug_admins': {
'level': 'ERROR', 'level': 'ERROR',
'class': 'zephyr.handlers.AdminHumbugHandler', 'class': 'zerver.handlers.AdminHumbugHandler',
# For testing the handler delete the next line # For testing the handler delete the next line
'filters': ['HumbugLimiter', 'require_debug_false', 'require_really_deployed'], 'filters': ['HumbugLimiter', 'require_debug_false', 'require_really_deployed'],
'formatter': 'default' 'formatter': 'default'
@ -516,7 +516,7 @@ LOGGING = {
# to replace the list of filters for mail_admins with 'nop'. # to replace the list of filters for mail_admins with 'nop'.
'mail_admins': { 'mail_admins': {
'level': 'ERROR', 'level': 'ERROR',
'class': 'zephyr.handlers.HumbugAdminEmailHandler', 'class': 'zerver.handlers.HumbugAdminEmailHandler',
# For testing the handler replace the filters list with just 'nop' # For testing the handler replace the filters list with just 'nop'
'filters': ['EmailLimiter', 'require_debug_false', 'require_really_deployed'], 'filters': ['EmailLimiter', 'require_debug_false', 'require_really_deployed'],
}, },
@ -547,8 +547,8 @@ LOGGING = {
} }
TEMPLATE_CONTEXT_PROCESSORS = ( TEMPLATE_CONTEXT_PROCESSORS = (
'zephyr.context_processors.add_settings', 'zerver.context_processors.add_settings',
'zephyr.context_processors.add_metrics', 'zerver.context_processors.add_metrics',
) )
ACCOUNT_ACTIVATION_DAYS=7 ACCOUNT_ACTIVATION_DAYS=7
@ -600,7 +600,7 @@ if not DEPLOYED:
if DEPLOYED: if DEPLOYED:
# Filter out user data # Filter out user data
DEFAULT_EXCEPTION_REPORTER_FILTER = 'zephyr.filters.HumbugExceptionReporterFilter' DEFAULT_EXCEPTION_REPORTER_FILTER = 'zerver.filters.HumbugExceptionReporterFilter'
# We want all temporary uploaded files to be stored on disk. # We want all temporary uploaded files to be stored on disk.

View File

@ -2,7 +2,7 @@ from django.conf import settings
from django.conf.urls import patterns, url, include from django.conf.urls import patterns, url, include
from django.views.generic import TemplateView, RedirectView from django.views.generic import TemplateView, RedirectView
import os.path import os.path
import zephyr.forms import zerver.forms
# NB: There are several other pieces of code which route requests by URL: # NB: There are several other pieces of code which route requests by URL:
# #
@ -14,79 +14,79 @@ import zephyr.forms
# - Likewise for the local dev server in tools/run-dev.py. # - Likewise for the local dev server in tools/run-dev.py.
urlpatterns = patterns('', urlpatterns = patterns('',
url(r'^$', 'zephyr.views.home'), url(r'^$', 'zerver.views.home'),
url(r'^accounts/login/openid/$', 'django_openid_auth.views.login_begin', name='openid-login'), url(r'^accounts/login/openid/$', 'django_openid_auth.views.login_begin', name='openid-login'),
url(r'^accounts/login/openid/done/$', 'zephyr.views.process_openid_login', name='openid-complete'), url(r'^accounts/login/openid/done/$', 'zerver.views.process_openid_login', name='openid-complete'),
url(r'^accounts/login/openid/done/$', 'django_openid_auth.views.login_complete', name='openid-complete'), url(r'^accounts/login/openid/done/$', 'django_openid_auth.views.login_complete', name='openid-complete'),
# We have two entries for accounts/login to allow reverses on the Django # We have two entries for accounts/login to allow reverses on the Django
# view we're wrapping to continue to function. # view we're wrapping to continue to function.
url(r'^accounts/login/', 'zephyr.views.login_page', {'template_name': 'zephyr/login.html'}), url(r'^accounts/login/', 'zerver.views.login_page', {'template_name': 'zerver/login.html'}),
url(r'^accounts/login/', 'django.contrib.auth.views.login', {'template_name': 'zephyr/login.html'}), url(r'^accounts/login/', 'django.contrib.auth.views.login', {'template_name': 'zerver/login.html'}),
url(r'^accounts/logout/', 'zephyr.views.logout_then_login'), url(r'^accounts/logout/', 'zerver.views.logout_then_login'),
url(r'^accounts/password/reset/$', 'django.contrib.auth.views.password_reset', url(r'^accounts/password/reset/$', 'django.contrib.auth.views.password_reset',
{'post_reset_redirect' : '/accounts/password/reset/done/', {'post_reset_redirect' : '/accounts/password/reset/done/',
'template_name': 'zephyr/reset.html', 'template_name': 'zerver/reset.html',
'email_template_name': 'registration/password_reset_email.txt', 'email_template_name': 'registration/password_reset_email.txt',
}), }),
url(r'^accounts/password/reset/done/$', 'django.contrib.auth.views.password_reset_done', url(r'^accounts/password/reset/done/$', 'django.contrib.auth.views.password_reset_done',
{'template_name': 'zephyr/reset_emailed.html'}), {'template_name': 'zerver/reset_emailed.html'}),
url(r'^accounts/password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm', url(r'^accounts/password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm',
{'post_reset_redirect' : '/accounts/password/done/', 'template_name': 'zephyr/reset_confirm.html', {'post_reset_redirect' : '/accounts/password/done/', 'template_name': 'zerver/reset_confirm.html',
'set_password_form' : zephyr.forms.LoggingSetPasswordForm}), 'set_password_form' : zerver.forms.LoggingSetPasswordForm}),
url(r'^accounts/password/done/$', 'django.contrib.auth.views.password_reset_complete', url(r'^accounts/password/done/$', 'django.contrib.auth.views.password_reset_complete',
{'template_name': 'zephyr/reset_done.html'}), {'template_name': 'zerver/reset_done.html'}),
url(r'^activity$', 'zephyr.views.get_activity'), url(r'^activity$', 'zerver.views.get_activity'),
# Registration views, require a confirmation ID. # Registration views, require a confirmation ID.
url(r'^accounts/home/', 'zephyr.views.accounts_home'), url(r'^accounts/home/', 'zerver.views.accounts_home'),
url(r'^accounts/send_confirm/(?P<email>[\S]+)?', url(r'^accounts/send_confirm/(?P<email>[\S]+)?',
TemplateView.as_view(template_name='zephyr/accounts_send_confirm.html'), name='send_confirm'), TemplateView.as_view(template_name='zerver/accounts_send_confirm.html'), name='send_confirm'),
url(r'^accounts/register/', 'zephyr.views.accounts_register'), url(r'^accounts/register/', 'zerver.views.accounts_register'),
url(r'^accounts/do_confirm/(?P<confirmation_key>[\w]+)', 'confirmation.views.confirm'), url(r'^accounts/do_confirm/(?P<confirmation_key>[\w]+)', 'confirmation.views.confirm'),
url(r'^invite/$', 'zephyr.views.initial_invite_page', name='initial-invite-users'), url(r'^invite/$', 'zerver.views.initial_invite_page', name='initial-invite-users'),
# Portico-styled page used to provide email confirmation of terms acceptance. # Portico-styled page used to provide email confirmation of terms acceptance.
url(r'^accounts/accept_terms/$', 'zephyr.views.accounts_accept_terms'), url(r'^accounts/accept_terms/$', 'zerver.views.accounts_accept_terms'),
# Terms of service and privacy policy # Terms of service and privacy policy
url(r'^terms/$', TemplateView.as_view(template_name='zephyr/terms.html')), url(r'^terms/$', TemplateView.as_view(template_name='zerver/terms.html')),
url(r'^privacy/$', TemplateView.as_view(template_name='zephyr/privacy.html')), url(r'^privacy/$', TemplateView.as_view(template_name='zerver/privacy.html')),
# "About Humbug" information # "About Humbug" information
url(r'^what-is-humbug/$', TemplateView.as_view(template_name='zephyr/what-is-humbug.html')), url(r'^what-is-humbug/$', TemplateView.as_view(template_name='zerver/what-is-humbug.html')),
url(r'^new-user/$', TemplateView.as_view(template_name='zephyr/new-user.html')), url(r'^new-user/$', TemplateView.as_view(template_name='zerver/new-user.html')),
url(r'^features/$', TemplateView.as_view(template_name='zephyr/features.html')), url(r'^features/$', TemplateView.as_view(template_name='zerver/features.html')),
# Landing page, signup form, and nice register URL # Landing page, signup form, and nice register URL
url(r'^hello/$', TemplateView.as_view(template_name='zephyr/hello.html'), url(r'^hello/$', TemplateView.as_view(template_name='zerver/hello.html'),
name='landing-page'), name='landing-page'),
url(r'^signup/$', TemplateView.as_view(template_name='zephyr/signup.html'), url(r'^signup/$', TemplateView.as_view(template_name='zerver/signup.html'),
name='signup'), name='signup'),
url(r'^signup/sign-me-up$', 'zephyr.views.beta_signup_submission', name='beta-signup-submission'), url(r'^signup/sign-me-up$', 'zerver.views.beta_signup_submission', name='beta-signup-submission'),
url(r'^register/$', 'zephyr.views.accounts_home', name='register'), url(r'^register/$', 'zerver.views.accounts_home', name='register'),
url(r'^login/$', 'zephyr.views.login_page', {'template_name': 'zephyr/login.html'}), url(r'^login/$', 'zerver.views.login_page', {'template_name': 'zerver/login.html'}),
# A registration page that passes through the domain, for totally open realms. # A registration page that passes through the domain, for totally open realms.
url(r'^register/(?P<domain>\S+)/$', 'zephyr.views.accounts_home_with_domain'), url(r'^register/(?P<domain>\S+)/$', 'zerver.views.accounts_home_with_domain'),
# API and integrations documentation # API and integrations documentation
url(r'^api/$', TemplateView.as_view(template_name='zephyr/api.html')), url(r'^api/$', TemplateView.as_view(template_name='zerver/api.html')),
url(r'^api/endpoints/$', 'zephyr.views.api_endpoint_docs'), url(r'^api/endpoints/$', 'zerver.views.api_endpoint_docs'),
url(r'^integrations/$', TemplateView.as_view(template_name='zephyr/integrations.html')), url(r'^integrations/$', TemplateView.as_view(template_name='zerver/integrations.html')),
url(r'^zephyr/$', TemplateView.as_view(template_name='zephyr/zephyr.html')), url(r'^zerver/$', TemplateView.as_view(template_name='zerver/zerver.html')),
url(r'^apps$', TemplateView.as_view(template_name='zephyr/apps.html')), url(r'^apps$', TemplateView.as_view(template_name='zerver/apps.html')),
# Job postings # Job postings
url(r'^jobs/$', TemplateView.as_view(template_name='zephyr/jobs/index.html')), url(r'^jobs/$', TemplateView.as_view(template_name='zerver/jobs/index.html')),
url(r'^jobs/lead-designer/$', TemplateView.as_view(template_name='zephyr/jobs/lead-designer.html')), url(r'^jobs/lead-designer/$', TemplateView.as_view(template_name='zerver/jobs/lead-designer.html')),
url(r'^robots\.txt$', RedirectView.as_view(url='/static/robots.txt')), url(r'^robots\.txt$', RedirectView.as_view(url='/static/robots.txt')),
) )
urlpatterns += patterns('zephyr.views', urlpatterns += patterns('zerver.views',
# These are json format views used by the web client. They require a logged in browser. # These are json format views used by the web client. They require a logged in browser.
url(r'^json/update_pointer$', 'json_update_pointer'), url(r'^json/update_pointer$', 'json_update_pointer'),
url(r'^json/get_old_messages$', 'json_get_old_messages'), url(r'^json/get_old_messages$', 'json_get_old_messages'),
@ -143,7 +143,7 @@ urlpatterns += patterns('zephyr.views',
url(r'^api/v1/external/newrelic$', 'api_newrelic_webhook'), url(r'^api/v1/external/newrelic$', 'api_newrelic_webhook'),
) )
v1_api_and_json_patterns = patterns('zephyr.views', v1_api_and_json_patterns = patterns('zerver.views',
# JSON format views used by the redesigned API, accept basic auth username:password. # JSON format views used by the redesigned API, accept basic auth username:password.
# GET returns messages, possibly filtered, POST sends a message # GET returns messages, possibly filtered, POST sends a message
url(r'^messages$', 'rest_dispatch', url(r'^messages$', 'rest_dispatch',
@ -189,7 +189,7 @@ v1_api_and_json_patterns = patterns('zephyr.views',
) )
urlpatterns += patterns('zephyr.tornadoviews', urlpatterns += patterns('zerver.tornadoviews',
# Tornado views # Tornado views
url(r'^api/v1/get_messages$', 'api_get_messages'), url(r'^api/v1/get_messages$', 'api_get_messages'),
url(r'^json/get_updates$', 'json_get_updates'), url(r'^json/get_updates$', 'json_get_updates'),

View File

@ -13,9 +13,9 @@ import sys
os.environ['DJANGO_SETTINGS_MODULE'] = "humbug.settings" os.environ['DJANGO_SETTINGS_MODULE'] = "humbug.settings"
sys.path.append('/home/humbug/humbug-deployments/current') sys.path.append('/home/humbug/humbug-deployments/current')
sys.path.append('/home/humbug/humbug-deployments/current/zephyr') sys.path.append('/home/humbug/humbug-deployments/current/zerver')
from zephyr.models import UserActivity from zerver.models import UserActivity
states = { states = {
"OK": 0, "OK": 0,

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{% block for_you %} got a bit lost there. {% endblock %} {% block for_you %} got a bit lost there. {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{% block for_you %} isn't feeling too good. {% endblock %} {% block for_you %} isn't feeling too good. {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{% block portico_content %} {% block portico_content %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/base.html" %} {% extends "zerver/base.html" %}
{% block content %} {% block content %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/base.html" %} {% extends "zerver/base.html" %}
{% block content %} {% block content %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{% block for_you %} isn't feeling too good. {% endblock %} {% block for_you %} isn't feeling too good. {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico_signup.html" %} {% extends "zerver/portico_signup.html" %}
{% comment %} {% comment %}
Allow the user to accept the terms, creating an email record of that fact. Allow the user to accept the terms, creating an email record of that fact.
@ -15,7 +15,7 @@ Allow the user to accept the terms, creating an email record of that fact.
<h3>Accept the Zulip terms of service</h3> <h3>Accept the Zulip terms of service</h3>
</div> </div>
<form method="post" class="form-horizontal" id="registration" action="{% url 'zephyr.views.accounts_accept_terms' %}"> <form method="post" class="form-horizontal" id="registration" action="{% url 'zerver.views.accounts_accept_terms' %}">
{% csrf_token %} {% csrf_token %}
<div class="control-group"> <div class="control-group">
<label for="id_email" class="control-label">Email</label> <label for="id_email" class="control-label">Email</label>

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico_signup.html" %} {% extends "zerver/portico_signup.html" %}
{# Home page for not logged-in users. #} {# Home page for not logged-in users. #}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico_signup.html" %} {% extends "zerver/portico_signup.html" %}
{# Displayed after a user attempts to sign up. #} {# Displayed after a user attempts to sign up. #}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/base.html" %} {% extends "zerver/base.html" %}
{% load compressed %} {% load compressed %}
{% load minified_js %} {% load minified_js %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{# API information page #} {# API information page #}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{# API information page #} {# API information page #}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{# API information page #} {# API information page #}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{% block portico_content %} {% block portico_content %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{% block inner_content %} {% block inner_content %}
<div class="row-fluid landing-page shaded-background"> <div class="row-fluid landing-page shaded-background">

View File

@ -100,7 +100,7 @@
</div> </div>
</div> </div>
{% include "zephyr/compose.html" %} {% include "zerver/compose.html" %}
<div id="notifications-area"> <div id="notifications-area">
<div id="notifications-bar"></div> <div id="notifications-bar"></div>
</div> </div>

View File

@ -1,4 +1,4 @@
{% extends "zephyr/base.html" %} {% extends "zerver/base.html" %}
{# The app itself. #} {# The app itself. #}
{# Includes some other templates as tabs. #} {# Includes some other templates as tabs. #}
@ -39,39 +39,39 @@ var page_params = {{ page_params }};
<div id="clear-screen" class="screen"></div> <div id="clear-screen" class="screen"></div>
<div class="container-fluid"> <div class="container-fluid">
{% include "zephyr/navbar.html" %} {% include "zerver/navbar.html" %}
<div class="row-fluid"> <div class="row-fluid">
<div class="span2 hidden-phone"> <div class="span2 hidden-phone">
{% include "zephyr/left-sidebar.html" %} {% include "zerver/left-sidebar.html" %}
</div><!--/left sidebar--> </div><!--/left sidebar-->
<div class="span8 tab-content"> <div class="span8 tab-content">
<div class="tab-pane active" id="home"> <div class="tab-pane active" id="home">
{% include "zephyr/home.html" %} {% include "zerver/home.html" %}
</div> </div>
<div class="tab-pane" id="subscriptions"> <div class="tab-pane" id="subscriptions">
{% include "zephyr/subscriptions.html" %} {% include "zerver/subscriptions.html" %}
</div> </div>
<div class="tab-pane" id="settings"> <div class="tab-pane" id="settings">
{% include "zephyr/settings.html" %} {% include "zerver/settings.html" %}
</div> </div>
{% if show_debug %} {% if show_debug %}
<div class="tab-pane" id="debug"> <div class="tab-pane" id="debug">
{% include "zephyr/debug.html" %} {% include "zerver/debug.html" %}
</div> </div>
{% endif %} {% endif %}
</div><!--/tab-content--> </div><!--/tab-content-->
<div class="span2 hidden-phone"> <div class="span2 hidden-phone">
{% include "zephyr/right-sidebar.html" %} {% include "zerver/right-sidebar.html" %}
</div><!--/right sidebar--> </div><!--/right sidebar-->
</div><!--/row--> </div><!--/row-->
{% include "zephyr/keyboard_shortcuts.html" %} {% include "zerver/keyboard_shortcuts.html" %}
{% include "zephyr/markdown_help.html" %} {% include "zerver/markdown_help.html" %}
{% include "zephyr/invite_user.html" %} {% include "zerver/invite_user.html" %}
{% include "zephyr/bankruptcy.html" %} {% include "zerver/bankruptcy.html" %}
{% include "zephyr/logout.html" %} {% include "zerver/logout.html" %}
{% include "zephyr/tutorial_finale.html" %} {% include "zerver/tutorial_finale.html" %}
<div class='notifications top-right'></div> <div class='notifications top-right'></div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{% load minified_js %} {% load minified_js %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{# API information page #} {# API information page #}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{% block portico_content %} {% block portico_content %}
<div class="row-fluid"> <div class="row-fluid">

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{% block portico_content %} {% block portico_content %}
<div class="row-fluid"> <div class="row-fluid">

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{# Login page. #} {# Login page. #}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{# New user tutorial standin. #} {# New user tutorial standin. #}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/base.html" %} {% extends "zerver/base.html" %}
{% load compressed %} {% load compressed %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{% load minified_js %} {% load minified_js %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{# Privacy policy. #} {# Privacy policy. #}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico_signup.html" %} {% extends "zerver/portico_signup.html" %}
{% comment %} {% comment %}
Gather other user information, after having confirmed Gather other user information, after having confirmed
@ -23,7 +23,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
<h3>Tell us a bit about yourself.</h3> <h3>Tell us a bit about yourself.</h3>
</div> </div>
<form method="post" class="form-horizontal" id="registration" action="{% url 'zephyr.views.accounts_register' %}"> <form method="post" class="form-horizontal" id="registration" action="{% url 'zerver.views.accounts_register' %}">
{% csrf_token %} {% csrf_token %}
<div class="control-group"> <div class="control-group">
<label for="id_email" class="control-label">Email</label> <label for="id_email" class="control-label">Email</label>

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico_signup.html" %} {% extends "zerver/portico_signup.html" %}
{% block portico_content %} {% block portico_content %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico_signup.html" %} {% extends "zerver/portico_signup.html" %}
{% block customhead %} {% block customhead %}
{{ block.super }} {{ block.super }}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico_signup.html" %} {% extends "zerver/portico_signup.html" %}
{% block portico_content %} {% block portico_content %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico_signup.html" %} {% extends "zerver/portico_signup.html" %}
{% block portico_content %} {% block portico_content %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{% load compressed %} {% load compressed %}
{% load minified_js %} {% load minified_js %}

View File

@ -12,4 +12,4 @@
</div> </div>
</div> </div>
{% include "zephyr/stream_creation_prompt.html" %} {% include "zerver/stream_creation_prompt.html" %}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{# Terms of service. #} {# Terms of service. #}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{# A brief "What is Humbug?" explanation page #} {# A brief "What is Humbug?" explanation page #}

View File

@ -1,4 +1,4 @@
{% extends "zephyr/portico.html" %} {% extends "zerver/portico.html" %}
{# Zephyr Mirroring information page #} {# Zephyr Mirroring information page #}

View File

@ -24,8 +24,8 @@ os.chdir(path.join(path.dirname(__file__), '..'))
exclude_trees = """ exclude_trees = """
static/third static/third
confirmation confirmation
zephyr/tests/frontend/casperjs zerver/tests/frontend/casperjs
zephyr/migrations zerver/migrations
node_modules node_modules
""".split() """.split()

View File

@ -1,5 +1,5 @@
#!/bin/sh -xe #!/bin/sh -xe
# This is a really simple wrapper script, pretty much for documenting clarity # This is a really simple wrapper script, pretty much for documenting clarity
`dirname $0`/../zephyr/tests/generate-fixtures --force `dirname $0`/../zerver/tests/generate-fixtures --force

View File

@ -8,8 +8,8 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
import optparse import optparse
from datetime import timedelta, datetime from datetime import timedelta, datetime
from zephyr.lib.timestamp import datetime_to_timestamp from zerver.lib.timestamp import datetime_to_timestamp
from zephyr.lib.utils import statsd_key from zerver.lib.utils import statsd_key
import requests import requests
# Workaround to support the Python-requests 1.0 transition of .json # Workaround to support the Python-requests 1.0 transition of .json

View File

@ -118,7 +118,7 @@ process.argv.forEach(function (filepath) {
options.browser = false; options.browser = false;
options.node = true; options.node = true;
if (filepath.indexOf('zephyr/tests/frontend/') !== -1) { if (filepath.indexOf('zerver/tests/frontend/') !== -1) {
// Include '$' and browser globals because we use them inside // Include '$' and browser globals because we use them inside
// casper.evaluate // casper.evaluate
options.predef = ['casper', '$', 'document', 'window']; options.predef = ['casper', '$', 'document', 'window'];

View File

@ -33,7 +33,7 @@ certs
""".split() """.split()
exclude_files = """ exclude_files = """
zephyr/management/commands/test_messages.txt zerver/management/commands/test_messages.txt
tools/usability_testing/humbug_usability_test_data tools/usability_testing/humbug_usability_test_data
servers/puppet/files/wiki/static/img/logo.png servers/puppet/files/wiki/static/img/logo.png
tools/jslint/jslint.js tools/jslint/jslint.js

View File

@ -323,9 +323,9 @@ def run_test_script(repo, tmp_path):
# Copy over relevant files to $tmp_dir/humbug_test.git # Copy over relevant files to $tmp_dir/humbug_test.git
working_dir = os.getcwd() working_dir = os.getcwd()
clone = clone_to_tmp(repo, tmp_path) clone = clone_to_tmp(repo, tmp_path)
for filename in ['zephyr/fixtures/available-migrations', for filename in ['zerver/fixtures/available-migrations',
'zephyr/fixtures/migration-status', 'zerver/fixtures/migration-status',
'zephyr/fixtures/messages.json', 'zerver/fixtures/messages.json',
'event_queues.pickle']: 'event_queues.pickle']:
if os.path.isfile(filename): if os.path.isfile(filename):
copyfile(filename, clone.working_tree_dir + "/" + filename) copyfile(filename, clone.working_tree_dir + "/" + filename)

View File

@ -19,6 +19,6 @@ run 'clean repo' ./tools/clean-repo
run 'lint checkers' ./tools/check-all run 'lint checkers' ./tools/check-all
run 'js unit tests' ./tools/test-js-with-node run 'js unit tests' ./tools/test-js-with-node
run 'server tests' ./tools/test-backend run 'server tests' ./tools/test-backend
run 'web client tests' ./zephyr/tests/frontend/run run 'web client tests' ./zerver/tests/frontend/run
printf '\n\e[32mAll OK!\e[0m\n' printf '\n\e[32mAll OK!\e[0m\n'

View File

@ -1,16 +1,16 @@
#!/bin/bash -e #!/bin/bash -e
target='zephyr' target='zerver'
case "$1" in case "$1" in
zephyr*) zerver*)
target="$1" target="$1"
shift shift
;; ;;
esac esac
cd "$(dirname "$0")"/.. cd "$(dirname "$0")"/..
./zephyr/tests/generate-fixtures ./zerver/tests/generate-fixtures
# "-u" uses unbuffered IO, which is important when wrapping it in # "-u" uses unbuffered IO, which is important when wrapping it in
# something like subprocess (as tools/review does) # something like subprocess (as tools/review does)
/usr/bin/env python -u ./manage.py test "$target" --settings=humbug.test_settings "$@" /usr/bin/env python -u ./manage.py test "$target" --settings=humbug.test_settings "$@"

View File

@ -1,6 +1,6 @@
#!/bin/bash -e #!/bin/bash -e
cd "$(dirname "$0")"/../zephyr/tests/frontend/node cd "$(dirname "$0")"/../zerver/tests/frontend/node
STATIC_DIR=`python -c 'import os;print os.path.realpath("../../../../static")'` STATIC_DIR=`python -c 'import os;print os.path.realpath("../../../../static")'`

View File

@ -4,17 +4,17 @@ from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST from django.views.decorators.http import require_POST
from django.http import QueryDict from django.http import QueryDict
from django.http.multipartparser import MultiPartParser from django.http.multipartparser import MultiPartParser
from zephyr.models import UserProfile, get_client, get_user_profile_by_email from zerver.models import UserProfile, get_client, get_user_profile_by_email
from zephyr.lib.response import json_error, json_unauthorized from zerver.lib.response import json_error, json_unauthorized
from django.utils.timezone import now from django.utils.timezone import now
from django.conf import settings from django.conf import settings
import ujson import ujson
from StringIO import StringIO from StringIO import StringIO
from zephyr.lib.queue import queue_json_publish from zerver.lib.queue import queue_json_publish
from zephyr.lib.timestamp import datetime_to_timestamp from zerver.lib.timestamp import datetime_to_timestamp
from zephyr.lib.utils import statsd from zerver.lib.utils import statsd
from zephyr.exceptions import RateLimited from zerver.exceptions import RateLimited
from zephyr.lib.rate_limiter import incr_ratelimit, is_ratelimited, \ from zerver.lib.rate_limiter import incr_ratelimit, is_ratelimited, \
api_calls_left api_calls_left
from functools import wraps from functools import wraps
import base64 import base64
@ -49,7 +49,7 @@ def update_user_activity(request, user_profile):
'time': datetime_to_timestamp(now()), 'time': datetime_to_timestamp(now()),
'client': request.client.name} 'client': request.client.name}
# TODO: It's possible that this should call process_user_activity # TODO: It's possible that this should call process_user_activity
# from zephyr.lib.actions for maximal consistency. # from zerver.lib.actions for maximal consistency.
queue_json_publish("user_activity", event, lambda event: None) queue_json_publish("user_activity", event, lambda event: None)
# I like the all-lowercase name better # I like the all-lowercase name better
@ -425,13 +425,13 @@ def profiled(func):
""" """
This decorator should obviously be used only in a dev environment. This decorator should obviously be used only in a dev environment.
It works best when surrounding a function that you expect to be It works best when surrounding a function that you expect to be
called once. One strategy is to write a test case in zephyr/tests.py called once. One strategy is to write a test case in zerver/tests.py
and wrap the test case with the profiled decorator. and wrap the test case with the profiled decorator.
You can run a single test case like this: You can run a single test case like this:
# edit zephyr/tests.py and place @profiled above the test case below # edit zerver/tests.py and place @profiled above the test case below
./tools/test-backend zephyr.RateLimitTests.test_ratelimit_decrease ./tools/test-backend zerver.RateLimitTests.test_ratelimit_decrease
Then view the results like this: Then view the results like this:

Some files were not shown because too many files have changed in this diff Show More