Coder Social home page Coder Social logo

yourmoonlight / flask-pycon2014 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from miguelgrinberg/flask-pycon2014

0.0 2.0 0.0 665 KB

Code for my PyCon 2014 tutorial "Flask By Example"

Home Page: https://us.pycon.org/2014/schedule/presentation/54/

License: MIT License

flask-pycon2014's Introduction

Flask By Example

Code for my PyCon 2014 tutorial "Flask By Example".

Pre-requisites

  • Some previous Python coding experience
  • Basic knowledge of HTML and CSS
  • A bit of JavaScript will definitely not hurt

Requirements

  • Python 2.7 or 3.3+ on any supported OS (even Windows!)
  • virtualenv (or pyvenv if you are using Python 3.4)
  • git
  • Network connection (only to install the application)

Setup

The tutorial does not have a hands-on portion. For that reason it is not required that you come with your laptop with everything installed; you can come unplugged and just listen and learn if you like.

However, you will want to work with this application once you learn all about it in class, so I recommend that you try to install it ahead of time and have a chance to talk to me if you run into problems.

Please make sure your computer meets all the requirements listed above before you begin. Below are step-by-step installation instructions:

Step 1: Clone the git repository

$ git clone https://github.com/miguelgrinberg/flask-pycon2014.git
$ cd flask-pycon2014

Step 2: Create a virtual environment.

For Linux, OSX or any other platform that uses bash as command prompt (including Cygwin on Windows):

$ virtualenv venv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt

For Windows users working on the standard command prompt:

> virtualenv venv
> venv\scripts\activate
(venv) > pip install -r requirements.txt

Step 3: Create an administrator user

(venv) $ python manage.py adduser --admin <your-email-address> <your-username>
Password: <pick-a-password>
Confirm: <pick-a-password>
User <your-username> was registered successfully.

Step 4: Configure a gmail account for the application to send emails from.

For Linux, OSX or any other platform that uses bash as command prompt:

(venv) $ export MAIL_USERNAME=<your-gmail-username>
(venv) $ export MAIL_PASSWORD=<your-gmail-password>

For Windows users working on the standard command prompt:

(venv) > set MAIL_USERNAME=<your-gmail-username>
(venv) > set MAIL_PASSWORD=<your-gmail-password>

Step 5: Start the application:

(venv) $ python manage.py runserver
 * Running on http://127.0.0.1:5000/
 * Restarting with reloader

Now open your web browser and type http://localhost:5000 in the address bar to see the application running. If you feel adventurous click on the "Presenter Login" link on the far right of the navigation bar and ensure the account credentials you picked above work.

flask-pycon2014's People

Contributors

miguelgrinberg avatar

Watchers

 avatar  avatar

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.