Flask and AngularJS: Yeah! (Please review code and bring questions/improvemen­ts)

  • January 30, 2014 · 6:30 PM
  • This location is shown only to members

I'll show you the basics of how to set up and run Flask to (1) serve your awesome AngularJS single page app, and (2) serve ReSTful data for the same app. I'll be releasing code early, and would like attendees to review it before our Meetup.

This will be a collaborative meetup, meaning I'd like for people to try and adapt the code to their own needs, and/or ask questions about it. All skill levels are welcome and encouraged to attend. The only requirement is your active participation.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You are encouraged to bring your projects, ask for help on any tech related topic, or just chill and enjoy the event.

If you're considering joining, please read our rules, to determine if this group is right for you:

http://www.meetup.com/Ladies-Who-Code-Washington-DC/about/

Please be mindful of your RSVP status. Be sure to free up the spot if you won't be attending. This is important for the purposes or ordering food, and out of courtesy to the organizers and speakers.

Thank you,

Gloria

Join or login to comment.

  • A former member
    A former member

    Perfect, thanks! if those were the only changes necessary to get it running in Python 3, that is awesome.

    January 30, 2014

    • Pamela V.

      One more thing to get the flask_rest_service.py working with Python3:

      change line 118 to:
      print ((len(path) - 1) * '---') , os.path.basename(root) and change line 121 to:
      print ((len(path)) * '---'), file


      both needs extra parens around the content to print to separate from the other arguments

      January 30, 2014

  • Pamela V.

    Had a couple hiccups with the python source "flask_rest_service.py" but worked it out.

    Issue #1:
    line 121
    print len(path)*'---', file
    SyntaxError: invalid syntax

    Solution:
    Change that line to wrap the "len(path)" in parentheses, becomes:
    print (len(path))*'---', file


    Issue #2:
    "flask_angular\inc\cross_domain.py", line 29, in crossdomain
    if not isinstance(origin, basestring):
    NameError: global name 'basestring' is not defined Solution:
    Found fix on this Github post due to deprecation of some types in Python 3- https://github.com/oxplot/fysom/issues/1

    January 30, 2014

  • Elizabeth M.

    Really looking forward to this. Just started looking at the code, but I'm not a web person, so I'm trying to get something running and work my way backwards.

    change WALK_DIR
    python flask_rest_service.py
    [another terminal tab?] python flask_angular_service.py
    ???
    Profit ;)

    Thanks!

    January 29, 2014

    • Elizabeth M.

      Ultimately, no - I just hadn't yet looked for the magic at http://127.0.0.1:7000...­ . ...n00b.
      Thank you!

      January 29, 2014

    • A former member
      A former member

      No worries. if you have issues feel free to let me know.

      January 29, 2014

  • A former member
    A former member

    Date has changed, code is here: https://github.com/gloriajw/flask_angular
    The flask portion is almost complete, working on the angular part now. Keep an eye on updates here, and I'll post when I'm finished. In the interim, run flask_rest_service.py, after changing the WALK_DIR variable in your copy.

    January 21, 2014

  • A former member
    A former member

    The snow messed up my schedule too. Should I try to push this out another week? It seems important to many working with Angular.

    January 21, 2014

    • Kim M.

      If it's moved to Jan 30, that sounds good to me.

      January 21, 2014

  • cheri h.

    I really wanted to come! these are things I've wanted to learn for a while now :(. but turns out I'll be traveling the next day. so..can't.

    January 21, 2014

  • Kim M.

    Bummer, had to cancel, the snow has changed my work schedule for this week.

    January 21, 2014

  • Pamela V.

    wish I could make this! I've done a little Angular, but don't know anything about Flask!

    January 21, 2014

34 went

Our Sponsors

People in this
Meetup are also in:

Create your own Meetup Group

Get started Learn more
Allison

Meetup has allowed me to meet people I wouldn't have met naturally - they're totally different than me.

Allison, started Women's Adventure Travel

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy