Quantcast
Channel: Oliver C. Grant
Viewing all articles
Browse latest Browse all 25

Adventures in Django to understand the pdbPreprocessor.

$
0
0

ipAddress//pdb/beta
enter 1BUY

It looks like you won’t need to change anything in the webpage, just make sure that the returned json from gems matches what it expected in the old one. Follow evaluatePdbResponse usage in views.py.

Here is where the json gets sent to gems:
/home/oliver/programs/GLYCAM_Dev_Env/V_2/Django/glycam-django/glycamweb/json_api/json_api.py

Look for def makeEvaluatePdbRequest(data):

Here is where the pdb webpages are:
/home/oliver/programs/GLYCAM_Dev_Env/V_2/Django/glycam-django/glycamweb/pdb/

Useful terms:

templates/ <- where all the html files are.

models: A model is the single, definitive source of information about your data. It contains the essential fields and behaviors of the data you’re storing. Generally, each model maps to a single database table.

A view function, or view for short, is a Python function that takes a web request and returns a web response. This response can be the HTML contents of a web page, or a redirect, or a 404 error, or an XML document, or an image . . . or anything, really. The view itself contains whatever arbitrary logic is necessary to return that response. This code can live anywhere you want, as long as it’s on your Python path. There’s no other requirement–no “magic,” so to speak. For the sake of putting the code somewhere, the convention is to put views in a file called views.py, placed in your project or application directory.


Viewing all articles
Browse latest Browse all 25

Trending Articles