<commit_before>import os

from flask import Flask
from flask import request, redirect, url_for, render_template
from google.appengine.ext import ndb

app = Flask(__name__)
app.config['DEBUG'] = True

# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.

class Test_Entity(ndb.Model):
	property1 = ndb.StringProperty()
	property2 = ndb.StringProperty()

@app.route('/')
def hello():
	"""Return a friendly HTTP greeting."""
	the_list = '<b>Hello World!</b>' 
	tests = Test_Entity.query(ancestor=ndb.Key('Test_Entity', "MasterKey"))
	
	for test in tests:
		the_list += '<p>'
		the_list += test.property1
		the_list += '</p>'
		
	return render_template('index.html', the_list = the_list)

@app.route('/post')
def post():
	new_test_entity = Test_Entity(parent=ndb.Key('Test_Entity', "MasterKey"))
	new_test_entity.property1 = request.args.get('p1')
	new_test_entity.property2 = request.args.get('p2')
	new_test_entity.put()
	return redirect(url_for('hello'))
	
	
@app.errorhandler(404)
def page_not_found(e):
    """Return a custom 404 error."""
    return 'Sorry, nothing at this URL.', 404<commit_msg>added a new page and a redirect<commit_after>import os

from flask import Flask
from flask import request, redirect, url_for, render_template
from google.appengine.ext import ndb

app = Flask(__name__)
app.config['DEBUG'] = True

# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.

class Test_Entity(ndb.Model):
	property1 = ndb.StringProperty()
	property2 = ndb.StringProperty()
@app.route('/')
def reroute():
	return redirect(url_for('data'))


@app.route('/data')
def data():
	"""Return a friendly HTTP greeting."""
	the_list = '<b>Hello World!</b>' 
	tests = Test_Entity.query(ancestor=ndb.Key('Test_Entity', "MasterKey"))
	
	for test in tests:
		the_list += '<p>'
		the_list += test.property1
		the_list += '</p>'
		
	return render_template('index.html', the_list = the_list)

@app.route('/post')
def post():
	new_test_entity = Test_Entity(parent=ndb.Key('Test_Entity', "MasterKey"))
	new_test_entity.property1 = request.args.get('p1')
	new_test_entity.property2 = request.args.get('p2')
	new_test_entity.put()
	return redirect(url_for('hello'))
	
@app.route('/control')
def control():
	return 'This page is not done yet'
	
@app.errorhandler(404)
def page_not_found(e):
    """Return a custom 404 error."""
    return 'Sorry, nothing at this URL.', 404
{'fraction_non_alphanumeric': 0.14383286460425873, 'fraction_numerical': 0.012856568903173965, 'mean_word_length': 5.1786600496277915, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3758360', 'n_tokens_mistral': 873, 'n_tokens_neox': 823, 'n_words': 224}