diff --git a/.gitignore b/.gitignore index 73f0a6461a..7e78c14617 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ web/down.default.html /pombola/core/static/sass/admin.css /pombola/core/static/sass/countdown.css /pombola/core/static/sass/jquery-ui.css -/pombola/kenya/static/sass/kenya.css /pombola/south_africa/static/sass/countdown.css /pombola/south_africa/static/sass/south-africa.css /staticfiles diff --git a/Vagrantfile b/Vagrantfile index 1732601a98..3af088d7d7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -3,7 +3,7 @@ Vagrant.configure(2) do |config| config.vm.network "forwarded_port", guest: 8000, host: 8000 config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"] - v.name = 'vagrant-pombola-' + ( ENV['COUNTRY_APP'] || "kenya" ) + v.name = 'vagrant-pombola-' + ( ENV['COUNTRY_APP'] || "south_africa" ) v.memory = 4096 v.cpus = 2 end @@ -13,7 +13,7 @@ Vagrant.configure(2) do |config| config.vm.provision "shell", env: { "DATADIR" => ENV['DATADIR'] || "/home/vagrant", - "COUNTRY_APP" => ENV['COUNTRY_APP'] || "kenya" + "COUNTRY_APP" => ENV['COUNTRY_APP'] || "south_africa" }, path: "bin/vagrant-install.bash", privileged: false diff --git a/bin/vagrant-install.bash b/bin/vagrant-install.bash index f244466b55..ee4efdff72 100755 --- a/bin/vagrant-install.bash +++ b/bin/vagrant-install.bash @@ -4,7 +4,7 @@ set -e cd "$(dirname "$0")/.." -COUNTRY_APP=${COUNTRY_APP:-kenya} +COUNTRY_APP=${COUNTRY_APP:-south_africa} DATADIR=${DATADIR:-data} DB_NAME="pombola" @@ -53,9 +53,6 @@ bin/prepare_environment.bash # Load data case "$COUNTRY_APP" in - kenya ) - LIVE_URL='http://info.mzalendo.com' - ;; south_africa ) LIVE_URL='https://www.pa.org.za' ;; @@ -91,4 +88,4 @@ fi echo "==> Installation done!" echo "==> To view, first log in and run /vagrant/manage.py runserver 0.0.0.0:8000" echo "==> Then visit http://localhost:8000 in your browser." -echo \ No newline at end of file +echo diff --git a/conf/crontab.ugly b/conf/crontab.ugly index becb1de69f..403c451c9b 100644 --- a/conf/crontab.ugly +++ b/conf/crontab.ugly @@ -8,12 +8,12 @@ MAILTO=cron-!!(*= $site *)!!@mysociety.org # Set the virtualenv and add it to the path so that the correct python is used - # requires that scripts start with '#!/usr/bin/env python' -# If you are running this with a different location for the virtualenv, you'll +# If you are running this with a different location for the virtualenv, you'll # need to update both `VIRTUAL_ENV` and `PATH` to reflect this. VIRTUAL_ENV="/data/vhost/!!(*= $vhost *)!!/pombola-virtualenv" # Commonlib now included from the system-wide installation (`/data/mysociety/bin`). -# If you want to use any of our generic scripts (e.g. `output-on-error`) you'll +# If you want to use any of our generic scripts (e.g. `output-on-error`) you'll # need to clone this repository somewhere and add it to the `PATH`. PATH=/data/vhost/!!(*= $vhost *)!!/pombola/bin:/data/mysociety/bin:/data/mysociety/commonlib/bin:/data/vhost/!!(*= $vhost *)!!/pombola-virtualenv/bin:/usr/local/bin:/usr/bin:/bin @@ -55,12 +55,6 @@ PYTHONIOENCODING=utf-8 33 2 * * * !!(*= $user *)!! run_management_command core_export_to_popolo_json /data/vhost/!!(*= $vhost *)!!/media_root/popolo_json/ http://info.mzalendo.com 50 2 * * * !!(*= $user *)!! run_management_command core_export_to_popolo_json --pombola /data/vhost/!!(*= $vhost *)!!/media_root/popolo_json/ http://info.mzalendo.com -# Check for any recurring data problems: -47 4 * * * !!(*= $user *)!! run_management_command kenya_check_for_recurring_problems - -# Import messages from SMS API -0 * * * * !!(*= $user *)!! output-on-error run_management_command kenya_sms_retrieve_messages - !!(* } elsif ($vhost eq 'www.shineyoureye.org') { *)!! 23 2 * * * !!(*= $user *)!! run_management_command core_export_to_popolo_json /data/vhost/!!(*= $vhost *)!!/media_root/popolo_json/ http://www.shineyoureye.org 40 2 * * * !!(*= $user *)!! run_management_command core_export_to_popolo_json --pombola /data/vhost/!!(*= $vhost *)!!/media_root/popolo_json/ http://www.shineyoureye.org diff --git a/conf/general.yml-example b/conf/general.yml-example index c1c277ccc6..fe49ac209d 100644 --- a/conf/general.yml-example +++ b/conf/general.yml-example @@ -28,14 +28,6 @@ GOOGLE_ANALYTICS_ACCOUNT: '' SURVEYGIZMO_API_TOKEN: '' SURVEYGIZMO_API_SECRET: '' -# If you're running the experiment with the county performance page -# test for Kenya, then put the experiment key here -COUNTY_PERFORMANCE_EXPERIMENT_KEY: '' - -# If you're running the experiment with the youth employment bill page -# test for Kenya, then put the experiment key here -YOUTH_EMPLOYMENT_BILL_EXPERIMENT_KEY: '' - # The IEBC API credentials for fetching aspirant data: IEBC_API_ID: '' IEBC_API_SECRET: '' @@ -56,10 +48,6 @@ FROM_EMAIL: 'you@example.com' # See https://docs.djangoproject.com/en/1.5/ref/settings/#std:setting-ALLOWED_HOSTS ALLOWED_HOSTS: ['pombola.example.com', 'localhost'] -# If the local version of pdftohtml is wrong (ie != 0.12.4) - blank means do it -# locally -KENYA_PARSER_PDF_TO_HTML_HOST: '' - # Where is the selenium server? (If empty then selenium tests can't run) # download it from here: http://seleniumhq.org/download/ # Note - need a recent one so that the window resizing has been implemented - @@ -87,7 +75,7 @@ POLLDADDY_WIDGET_ID: '' # from other apps. Note that we also use this setting in a command # (core_create_parliamentary_sessions) to determine the country that this # instance of Pombola is set up for. -COUNTRY_APP: kenya +COUNTRY_APP: south_africa # ZA Hansard Parsing config (can be left blank on for other instances) # Username and password for pmg_scraper command @@ -120,10 +108,5 @@ EMAIL_USE_TLS: false # here: GOOGLE_MAPS_GEOCODING_API_KEY: '' -# Config for Kenya SMS API -KENYA_SMS_API_URL: 'https://app.bongasms.co.ke/api/fetch-messages' -KENYA_SMS_API_SHORT_CODE: '' -KENYA_SMS_API_KEY: '' - # Config for Google Site verification GOOGLE_SITE_VERIFICATION: '' diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 07f21e8410..bcac70fc9f 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -20,10 +20,10 @@ git clone https://github.com/mysociety/pombola.git ## Vagrant -The `Vagrantfile` will set up the Kenyan site by default. You can +The `Vagrantfile` will set up the South African site by default. You can override this by setting `COUNTRY_APP` in the environment, e.g.: ``` -COUNTRY_APP=south_africa vagrant up +COUNTRY_APP=kenya vagrant up ``` Or by creating/updating to relevant variable in `conf/general.yml` manually (otherwise this will be created the first time you run diff --git a/docs/STYLING_NOTES.md b/docs/STYLING_NOTES.md index fe437819dd..5d47989dbd 100644 --- a/docs/STYLING_NOTES.md +++ b/docs/STYLING_NOTES.md @@ -11,9 +11,9 @@ You can compile the SASS using `make css` in the project root. This uses [compas The main entry point for the SASS is the `.scss` file. These are largely similar and let you include or not styles specific to the various apps. Note that often these will contain entries like: ``` scss -@import "colours_kenya"; +@import "colours_south_africa"; /// ... snip ... -@import "kenya_overrides"; +@import "south_africa_overrides"; ``` All the `.scss` files should be considered generic for all countries apart from ones like those above, that contain specific tweaks for the specific country. @@ -28,4 +28,4 @@ Your app will have a `base.html` template that should extend `default_base.html` ## Static assets (images, js, etc) -Novel assets, and overrides, should go into `/pombola//static` (eg [Kenya's](https://github.com/mysociety/pombola/tree/master/pombola/kenya/static)). Anything that appears here will be used in preference to assets from the core or other apps. +Novel assets, and overrides, should go into `/pombola//static` (eg [South Africa's](https://github.com/mysociety/pombola/tree/master/pombola/south_africa/static)). Anything that appears here will be used in preference to assets from the core or other apps. diff --git a/pombola/core/context_processors.py b/pombola/core/context_processors.py index e4e351201d..e15d6fce06 100644 --- a/pombola/core/context_processors.py +++ b/pombola/core/context_processors.py @@ -23,7 +23,6 @@ def add_settings( request ): 'POPIT_API_URL': settings.POPIT_API_URL, 'FACEBOOK_APP_ID': settings.FACEBOOK_APP_ID, 'GOOGLE_SITE_VERIFICATION': settings.GOOGLE_SITE_VERIFICATION, - 'KENYA_SMS_API_SHORT_CODE': settings.KENYA_SMS_API_SHORT_CODE, } } diff --git a/pombola/core/management/commands/core_database_dump.py b/pombola/core/management/commands/core_database_dump.py index 86d52b21bf..ce0e8d2bb2 100644 --- a/pombola/core/management/commands/core_database_dump.py +++ b/pombola/core/management/commands/core_database_dump.py @@ -51,12 +51,6 @@ def get_tables_to_dump(self): 'popolo_name_resolver_entityname', 'writeinpublic_configuration', ]) - if settings.COUNTRY_APP in ('kenya',): - # Ignore SMS tables as they contain phone numbers. - tables_to_ignore.update([ - 'sms_message', - 'sms_question', - ]) tables_to_dump = [ t for t in tables if t not in tables_to_ignore ] @@ -158,28 +152,6 @@ def get_tables_to_dump(self): 'spinner_quotecontent', 'spinner_slide', ] - if settings.COUNTRY_APP in ('kenya',): - # hansard, place_data, projects, votematch, wordcloud - expected_tables += [ - 'hansard_alias', - 'hansard_entry', - 'hansard_sitting', - 'hansard_source', - 'hansard_venue', - 'place_data_entry', - 'projects_project', - 'votematch_answer', - 'votematch_party', - 'votematch_quiz', - 'votematch_stance', - 'votematch_statement', - ] - if settings.COUNTRY_APP in ('kenya',): - # place_data, bills - expected_tables += [ - 'bills_bill', - - ] unexpected = set(tables_to_dump) - set(expected_tables) if unexpected: print '''The following tables were found which weren't expected diff --git a/pombola/core/templates/core/organisation_detail.html b/pombola/core/templates/core/organisation_detail.html index 2376185239..f281c77245 100644 --- a/pombola/core/templates/core/organisation_detail.html +++ b/pombola/core/templates/core/organisation_detail.html @@ -43,9 +43,4 @@

Contact Details

{% endif %} {% endwith %} - {% if settings.COUNTRY_APP != 'kenya' %} - {# Kenyan comments are looked after by pombola/kenya/templates/core/object_base.html #} - {% include 'disqus_comments.html' %} - {% endif %} - {% endblock %} diff --git a/pombola/core/templates/core/person_base.html b/pombola/core/templates/core/person_base.html index 48912aac8e..7159d98a94 100644 --- a/pombola/core/templates/core/person_base.html +++ b/pombola/core/templates/core/person_base.html @@ -87,20 +87,12 @@

Constituency Offices

{% endif %} -

{% if settings.COUNTRY_APP == 'kenya' %} - Party & Coalition - {% else %} - Party - {% endif %}

+

Party

    {% for party in object.parties_and_coalitions %}
  • {{ party.name }}
  • {% empty %} -
  • {% if settings.COUNTRY_APP == 'kenya' %} - Not a member of any parties or coalitions - {% else %} - Not a member of any party - {% endif %}
  • +
  • Not a member of any party
  • {% endfor %}
diff --git a/pombola/core/templates/core/place_detail.html b/pombola/core/templates/core/place_detail.html index 1bdc5d52cf..b93364bb47 100644 --- a/pombola/core/templates/core/place_detail.html +++ b/pombola/core/templates/core/place_detail.html @@ -85,11 +85,4 @@

CDF Projects

{% endwith %} {% endif %} - {% block disqus_comments %} - {% if settings.COUNTRY_APP != 'kenya' %} - {# Kenyan comments are looked after by pombola/kenya/templates/core/object_base.html #} - {% include 'disqus_comments.html' %} - {% endif %} - {% endblock %} - {% endblock %} diff --git a/run-tests b/run-tests index 3a002c9fe6..93a7874db8 100755 --- a/run-tests +++ b/run-tests @@ -22,7 +22,6 @@ update_exit_code() { TEST_SETTINGS_MODULES=( 'pombola.settings.tests' - 'pombola.settings.tests_kenya' 'pombola.settings.tests_south_africa' )