Git Product home page Git Product logo

proj6-mongo's Introduction

proj6-mongo

Simple list of dated memos kept in MongoDB database

What is here

A simple Flask app that displays all the dated memos it finds in a MongoDB database. There is also a 'scaffolding' program, db_trial.py, for inserting a couple records into the database and printing them out. Get db_trial.py working before you try making your flask app work.

What is not here

In addition to the missing functionality in the application, you will need a MongoDB database, and you will need credentials (user name and password) both for an administrative user and a regular user. The administrative user may be you, but the regular user is your application. Make a subdirectory called "secrets" and place two files in it:

  • secrets/admin_secrets.py holds configuration information for your MongoDB database, including the administrative password.
    = secrets/client_secrets.py holds configuration information for your application.

Functionality you'll add

The user should be able to add dated memos, either from the same index page or from a separate page. Memos should be displayed in date order. The user should be able to delete memos.

Setting up

Our use of the database is pretty simple, but you should anticipate that installing MongoDB could take some time. Since you may not be able to install the same version of MongoDB on your development computer and your Pi, it will be especially important to test your project on the Pi.

The version of MongoDB available for installing on Raspberry Pi with apt-get is 2.4. The version you can find for your development computer is probably 3.x. You may even have difficulty finding documentation for 2.4, as it is considered obsolete. However, commands that work for 2.4 still seem to work for 3.x, so you should write your application and support scripts to use 2.4. The difference that may cause you the most headaches is in creating database user accounts (which are different than the Unix accounts for users).

In Python, the pymongo API works with both versions of MongoDB, so it's only the initial setup where you have to be
careful to use the right version-specific commands.

proj6-mongo's People

Contributors

michalyoung avatar zenranda 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.