Skip to content

porterjamesj/blaggregator

 
 

Repository files navigation

##Blog post aggregator for the Hacker School community.

Hacker Schoolers are writing awesome blog posts all over the internet. This brings them together and provides a place where alums from every batch can discuss technical news.

The live site is here. Hacker School login required.

###Add your blog You will be prompted to add your blog when you create an account. You can also add it later.

Once your blog is added, Blaggregator will crawl it hourly for new posts.

###Contribute

Want to contribute a feature or bugfix? Blaggregator is a straightforward Django app with a Twitter Bootstrap frontend. It's deployed on Heroku and uses their Postgres and Scheduler add-ons. C

Check out CONTRIBUTE.md for ideas for what to build.

###Installation:

  • Set up your virtual environment

  • Install dependencies:

pip install -r requirements.txt

  • Set up your database. Install Postgres (it's easy on OSX with postgres.app) and open a Postgres shell:

python manage.py dbshell

Create your database:

CREATE DATABASE blaggregator_dev;

The semicolon is critical. Then go back to bash and populate the database from the app's models. IMPORTANT: when you are creating your admin account, don't use the same email address as your Hacker School account or you won't be able to create a user account for yourself. Do username+root@example.com or something.

python manage.py syncdb

If you get this error:

OperationalError: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

Then open settings.py and under HOST: add /tmp.

  • Turn on debugging in your environment:

export DJANGO_DEBUG=True

  • Then run a local server:

python manage.py runserver

You can administer your app through the handy-dandy admin interface. You can be logged in as the admin or as your user account, but not both at the same time.

###Encountered errors on Ubuntu 12.10:

  • If you get either of these errors:
- Error: pg_config executable not found.

- ./psycopg/psycopg.h:30:20: fatal error: Python.h: No such file or directory

Do the following:

sudo apt-get install libpq-dev

  • If you run into trouble with the Django installation within requirements.txt, install Django via:

pip install django

  • If you recieve:

No module named psycopg2.extensions:

Do:

sudo apt-get build-dep python-psycopg2

Then:

pip install psycopg2

Note: running pip install -r requirements.txt might be neccesarry after running any of the above commands.

  • For postgres installation:

sudo apt-get install postgresql

  • The following creates a super user:
- sudo -u postgres psql postgres 
- \password postgres
  • The following creates new database called blaggregator_dev

sudo -u postgres createdb blaggregator_dev

  • To set up other postgres user accounts do:
- create user user_name 
- \password user_name
  • Then open settings.py and under USER: put the newly created user name, under PASSWORD: put the password of the user

  • Then run your local server

python manage.py dbshell

About

Blog post aggregator for the Hacker School community

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 51.2%
  • Python 27.7%
  • JavaScript 21.1%