Giter Site home page Giter Site logo

angular-flask's Introduction

AngularJS + Flask Boilerplate App

A template for building apps with an Angular frontend and a Flask / python backend.

How to Get Started

  1. clone this repo

  2. install all the necessary packages (best done inside of a virtual environment)

pip install -r requirements.txt

  1. run the app

python runserver.py

  1. create and seed the db (the server must still be running, so open a new terminal window first)

python manage.py create_db && python manage.py seed_db --seedfile 'data/db_items.json'

  1. check out your blog

http://localhost:5000/blog

  1. if you like this project, give it a star :)

angular-flask's People

Contributors

shea256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-flask's Issues

Update

Can you please make a python3 update for this example, the old one is broken, and the wsgiref package cannot be installed. I would like to understand this given example and see it working.

I came from this stack-overflow thread.

Could not find tag or branch - bug in requirements.txt

I tried execute pip install -r req... using a virtualenv. Error:
(venv)angular-flask:incdev alesouza$ pip install -r requirements.txt
Requirement already satisfied (use --upgrade to upgrade): Flask==0.10.1 in /home/alesouza/Workspace/Python/Flask/venv/lib/python3.3/site-packages (from -r requirements.txt (line 1))
Obtaining Flask-Restless from git+https://github.com/goodscloud/flask-restless@6eabe067e938e59c297df10766403a6b905e302a#egg=Flask_Restless-dev (from -r requirements.txt (line 2))
Cloning https://github.com/goodscloud/flask-restless (to 6eabe067e938e59c297df10766403a6b905e302a) to /home/alesouza/Workspace/Python/Flask/venv/src/flask-restless
Could not find a tag or branch '6eabe067e938e59c297df10766403a6b905e302a', assuming commit.
fatal: reference is not a tree: 6eabe067e938e59c297df10766403a6b905e302a
Complete output from command /usr/bin/git checkout -q 6eabe067e938e59c297df10766403a6b905e302a:


Cleaning up...
Command /usr/bin/git checkout -q 6eabe067e938e59c297df10766403a6b905e302a failed with error code 128 in /home/alesouza/Workspace/Python/Flask/venv/src/flask-restless
Storing debug log for failure in /home/alesouza/.pip/pip.log

My pip.log :
(venv)angular-flask:incdev alesouza$ pip install -r requirements.txt
Requirement already satisfied (use --upgrade to upgrade): Flask==0.10.1 in /home/alesouza/Workspace/Python/Flask/venv/lib/python3.3/site-packages (from -r requirements.txt (line 1))
Obtaining Flask-Restless from git+https://github.com/goodscloud/flask-restless@6eabe067e938e59c297df10766403a6b905e302a#egg=Flask_Restless-dev (from -r requirements.txt (line 2))
Cloning https://github.com/goodscloud/flask-restless (to 6eabe067e938e59c297df10766403a6b905e302a) to /home/alesouza/Workspace/Python/Flask/venv/src/flask-restless
Could not find a tag or branch '6eabe067e938e59c297df10766403a6b905e302a', assuming commit.
fatal: reference is not a tree: 6eabe067e938e59c297df10766403a6b905e302a
Complete output from command /usr/bin/git checkout -q 6eabe067e938e59c297df10766403a6b905e302a:


Cleaning up...
Command /usr/bin/git checkout -q 6eabe067e938e59c297df10766403a6b905e302a failed with error code 128 in /home/alesouza/Workspace/Python/Flask/venv/src/flask-restless
Storing debug log for failure in /home/alesouza/.pip/pip.log

[ ]'s

Lots of unused imports!

angular-flask / angular_flask / controllers.py

from flask import Flask, request, Response
from flask import render_template, url_for, redirect, send_from_directory
from flask import send_file, make_response, abort
from angular_flask import app

You only using about 1/2 of them. For example "Flask" isn't needed since its imported from "from angular_flask import app".

Do not use with Anaconda 2

Please be kind enough to warn other users that your requirements might break an existing Anaconda installation.

AttributeError: 'module' object has no attribute 'MemoizedSlots'
with conda 4.2.12 - Ubuntu 16.04 LTS - Python 2.7

Many thanks in advance,

CL.

dependency issue with package 'wsgiref' on python3

if trying to run the project on python3 there's a dependency issue with package 'wsgiref' when trying to install packages via requirements.txt

error:
Collecting wsgiref==0.1.2 (from -r requirements.txt (line 16))
Using cached wsgiref-0.1.2.zip
Traceback (most recent call last):
File "", line 20, in
File "/tmp/pip-build-7cwefmyb/wsgiref/setup.py", line 5, in
import ez_setup
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

  File "<string>", line 20, in <module>

  File "/tmp/pip-build-7cwefmyb/wsgiref/setup.py", line 5, in <module>

    import ez_setup

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-7cwefmyb/wsgiref

Issue with requirements.txt

I am running Ubuntu 12.4, python 2.7, virtualenv 1.10.1, pip 1.4.1.

I get this error when I do: python install -r requirements.txt

Installing collected packages: Flask-Restless
  Running setup.py develop for Flask-Restless
    error: None
    Complete output from command /home/x/.virtualenvs/angular/bin/python -c "import setuptools; __file__='/home/x/.virtualenvs/angular/src/flask-restless/setup.py'; exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps:
    running develop

error: None

----------------------------------------
Cleaning up...
Command /home/x/.virtualenvs/angular/bin/python -c "import setuptools; __file__='/home/x/.virtualenvs/angular/src/flask-restless/setup.py'; exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps failed with error code 1 in /home/x/.virtualenvs/angular/src/flask-restless
Storing complete log in /tmp/tmp66jprC

Fixed it by removing -e, i.e. without the develop mode, this is the updated requirements.txt:

Flask==0.10.1
git+https://github.com/goodscloud/flask-restless@6eabe067e938e59c297df10766403a6b905e302a#egg=Flask_Restless-dev
Flask-SQLAlchemy==0.16
Jinja2==2.7
MarkupSafe==0.18
SQLAlchemy==0.8.2
Werkzeug==0.9.2
gunicorn==17.5
itsdangerous==0.22
python-dateutil==2.1
requests==1.2.3
six==1.3.0
wsgiref==0.1.2

Handy sample project!

CRUD

Hi,
How can i add new post, edit or delete

Project Status

Is this project is in active development? I don't see any pull request being merged or discussion on issues.

I am wondering if it's ok to start a new project using this boilerplate code?

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.