Giter Club home page Giter Club logo

backbone-directory's Introduction

Technical Demo

I forked backbone-directory to use as a boilerplate codebase.

This demo uses among other technologies the following:

You can view a live demo if this app here: ec2-23-22-192-67.compute-1.amazonaws.com

Installation

If you're using a fresh installation of Ubuntu 12+ then you might need some packages installed first:

$ sudo apt-get update && \
  sudo apt-get install python-pip python-virtualenv virtualenvwrapper \
                        git-core build-essential python2.7-dev \
                        libevent-1.4-2 libevent1-dev python-gevent

If you don't have a copy of Solr installed then have a look at these installation notes.

Clone a copy of this codebase from github:

$ cd ~ && git clone https://github.com/marklit/backbone-directory.git

Create a virtual environment.

I usually hide my virtualenv folders in ~/.virtualenvs. If you don't have this folder then create it with the following: mkdir ~/.virtualenvs.

Then, setup the virtualenv and activate it:

$ cd ~/.virtualenvs && \
  virtualenv backbone-directory && \
  source ~/.virtualenvs/backbone-directory/bin/activate

Go into the root folder of this repo and install the requirements.

pip install -r requirements.txt

Then setup the database and import the fixture data.

 $ cd ~/backbone-directory/src && \
   python manage.py syncdb && \
   python manage.py migrate && \
   python manage.py loaddata contacts photos

Create a new solr schema.xml.

 $ cd ~/backbone-directory/src && \
   python manage.py build_solr_schema

Take the XML portion of the output from above and place it in /etc/solr/conf/schema.xml.

Once that's in place, rebuild the solr indices:

 $ cd ~/backbone-directory/src && \
   python manage.py rebuild_index

Test everything is working nicely.

I try and keep a lot of the commands in fabric when possible. cd into the root of the repo and run the follow commands to test everything is looking okay:

 $ fab test_lint
 $ fab test_pep8
 $ fab test

It's pretty likely test_lint and test_pep8 will have some complaints. test shouldn't have any issues, if it does, there are problems in the code and or the environment that need to be addressed.

Run the webserver with the following:

 $ fab backend_tornado

This will bind the server to 0.0.0.0:8000 and launch it.

If you want to dump your contacts or photos table into the default fixtures run the following:

 $ fab update_fixtures

backbone-directory's People

Contributors

ccoenraets avatar marklit avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

backbone-directory's Issues

Setup EC2 Instance

  • Open port 8000 when setting up the firewall
  • Put a link to the web instance in this project's details here on github

Add scatter chart w/ photo details on show

Use d3 and api. Make it look like a decent analytics system.

API Guidance:

These could help with lowering memory usage when JSONing data and sending it down the wire:

Django admin isn't rendering anymore

Switched to tornado in #8 but the django admin system will no longer render.

ERROR:root:Uncaught exception GET /admin/ (172.16.91.1)
HTTPRequest(protocol='http', host='172.16.91.179:8000', method='GET', uri='/admin/', version='HTTP/1.1', remote_ip='172.16.91.1', body='', headers={'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip,deflate,sdch', 'Host': '172.16.91.179:8000', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1', 'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'Connection': 'keep-alive', 'Cookie': '__utma=14075383.537382038.1342425035.1344509586.1344532052.25; __utmz=14075383.1342425035.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); sessionid=10abd31890375b5f78ca1020767bd931; csrftoken=JyuYz2Yz35Nks4X3UVqMsrRkHHmoemsS', 'Cache-Control': 'max-age=0'})
Traceback (most recent call last):
  File "/home/mark/.virtualenvs/backbone-directory/local/lib/python2.7/site-packages/tornado/web.py", line 1021, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
  File "/home/mark/backbone-directory/src/base/management/commands/run_tornado.py", line 214, in get
    self.write(response.content)
  File "/home/mark/.virtualenvs/backbone-directory/local/lib/python2.7/site-packages/django/template/response.py", line 123, in _get_content
    raise ContentNotRenderedError('The response content must be '
ContentNotRenderedError: The response content must be rendered before it can be accessed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.