Skip to content

haifeng/secretapp

Repository files navigation

Secret-app

Secret-app is the source code for the website http://secretcities.com

We happily encourage contributions to the source. Is there a cool feature you'd like to add? Do you want to positively improve the experience of tens of thousands of users? Then get involved. Thats one of the strongest and most important facts about this group, is that you'll be working on a living breathing project used by a living breathing very active community.

So get involved and join in!

Contents

  1. General
  2. Contributing
  3. Getting setup

General

Helpful links

License

See LICENSE doc for details. http://github.com/timjdavey/secretapp/blob/master/LICENSE

Contributing

To get involved in the project, we do a thing called "forking". See http://help.github.com/forking/ for more details. Once you've got that down and understand how that works. Following the "Getting setup" to get the project setup on your local machine. Then you can submit patches, features, designs to you're hearts content.

Obviously if you are an active contributor we'll pull you into the core team. Also get chatting on our google dev group. http://groups.google.com/group/secretcities/

Getting setup

  1. Install the dependancies (check out the notes for how to install each of these).
  2. Setup your environment settings
  3. Setup the database
  4. Run the search-server
  5. Load data
  6. Run the server

Steps 4,5,6 should in theory be run every time you do a git-pull

Dependancies

Git

Django

PIL

South

pyfacebook

  • link http://github.com/sciyoshi/pyfacebook/ v.0.1
  • git-install git clone git://github.com/sciyoshi/pyfacebook.git; cd pyfacebook; python setup.py install;
  • ubuntu-install apt-get install python-facebook

django-socialauth

Openid

Yadis

OpenAuth

Solr

Solango

  • link http://code.google.com/p/django-solr-search/ v.0.0.2 (or latest)
  • original-install svn co http://django-solr-search.googlecode.com/svn/trunk/ django-solr-search
  • ERROR: often people getting the error ConfigParser.NoSectionError: No section: 'formatters'
  • alternative-install git-hosted version: http://github.com/timjdavey/solango git clone git://github.com/timjdavey/solango.git; cd solango; python setup.py install;

Environment

Next we need to setup the specific configurations for your local machine.

  1. Create a file called environment.py in the same directory as settings.py
  2. Go to settings.py look at the comments at the top of the page
  3. Copy the example and settings at the top of the page
  4. Alter settings to fit with for you

Database

Create a database. Can be anything you want, just make sure its setup correctly in the settings file.

For mysql (want utf8 character set)

CREATE DATABASE secretapp CHARACTER SET utf8;

Next you need to create the tables

# standard django
./manage.py syncdb --noinput

# south syncdb
./manage.py migrate

Run Search Server

We need to get the search server up and running with django

Step 1. Setup the schema

./manage.py solr --schema

Step 2. Restart the server

./manage.py solr --start

Step 3. Index the data so solr can handle it

# in a new terminal (so start is still running)
./manage.py solr --reindex

See the solango docs for more details http://www.screeley.com/djangosolr/tutorial.html#solr-schema-xml

Load data

There is a large django dumpfile in

./manage.py loaddata /fixtures/example_data.json

./manage.py solr --reindex

This also contains an admin with username:admin password:admin

This file may go out of date in comparison to the models. So if you would like to import the data raw. We'll turn this into a ./manage.py dumpdata file soon. But for now run the following from ./manage.py shell.

from utilz.csv_import import import_data
import_data()

There will be a few numbers outputted at this point. Ignore those. Then just check all the data is loaded by going into the db or admin interface!

Enjoy!

About

The source for

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published