Giter VIP home page Giter VIP logo

professor_oak's Introduction

"Professor Oak" Laboratory Management Server

Build Status Coverage Status

Install all python dependcies with pip install -r requirements.txt from the project root. Run python manage.py runserver to start the development server. This should NOT be used for deployment. Now visit http://localhost:8000 in a web browser to see the site.

Project Architecture

Much of this information is redundant with the Django documentation. Refer to [https://docs.djangoproject.com/en/1.8/](Django's documentation) for more information.

The project is organized into apps (folders) for different functionality. Components common to all apps are stored in the professor_oak directory.

Webpage Request Roadmap

After you enter the site's url in your browser, the web server generates an HttpRequest and passes it off to Django. Django looks at the url of the request and compares it against the expressions listed in professor_oak/urls.py. In some cases, if the expression is followed by include(<app_name>), Django will look in that app's directory for a file named urls.py and continue checking there.

Assuming Django finds a matching expression, it finds and calls the corresponding view function in views.py. A view function must return an HttpResponse object which then gets sent back to the browser. In our case, most views will not generate HTML themselves but will look up a template file. The view may generate some data to put in to the template before returning it; this is known as a context. Global templates live in the professor_oak/templates directory and app-spefic templates live in the corresponding app_name/templates directories.

Model Descriptions

In Django, a Model class is equivalent to a database table. An instance of that class corresponds to a database row. Professor oak defines many models, here are some of the main ones.

Chemical Inventory Models

Chemical - This is the general idea of a chemical (eg Lithium hydroxide). It is not a bottle of lithium hydroxide, just the general concept of lithium hydroxide. An instance of Chemical describes safety information among other things.

Container - This is a specific container of a chemical. This could be a specific bottle of lithium hydroxide in your lab. Attributes associated with a container include things like its location, amount and owner.

professor_oak's People

Contributors

canismarko avatar michaelplews avatar williamjudge94 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

professor_oak's Issues

Make chemical

I noticed that the above mentioned view is doing more work than it needs to. Rather than fixing it myself, I thought it might be worth explaining in person next time we're in the office.

Add view for editing chemical details

In chemical_inventory/views.py there's a class called AddContainerView. We need something similar but for editing the Chemical model. The Django UpdateView class might be a good place to start.

We'll also need the appropriate url in chemical_inventory/urls.py and maybe some links in the appropriate templates. Check out chemical_inventory/templates/container_form.html as a starting point.

Improvements to add container form and template

Based on observations with Gene. We told him to "add a chemical you haven't seen before" and he skipped the chemical search panel. Should we disable it until the user has type text in to the search box?

Professor Oak deployment checklist DEADLINE:

To help in the transition, let's make sure we have all the steps defined for Monday:

  • Pull latest github changes to geodude
  • Collect static, apply migrations and restart server & clear cache
  • Load cabana users from fixture
  • Delete all Chemical and Container instances

  • Shutdown old chemical inventory
  • Dump CAS and INVENT tables
  • Copy MSDS folder to geodude
  • Import CAS and INVENT tables into geodude database

  • Fix Location descriptors
  • Marvel at the stunning inability of our group to properly use the old database
  • Beer

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.