forked from mrlan/EnglishPal
				
			Update .gitignore
							parent
							
								
									25c2e0aca8
								
							
						
					
					
						commit
						06f896a33a
					
				|  | @ -2,12 +2,14 @@ | ||||||
| venv/ | venv/ | ||||||
| app/__init__.py | app/__init__.py | ||||||
| app/__pycache__/ | app/__pycache__/ | ||||||
|  | app/.DS_Store | ||||||
| app/sqlite_commands.py | app/sqlite_commands.py | ||||||
| app/static/usr/*.jpg | app/static/usr/*.jpg | ||||||
| app/static/img/ | app/static/img/ | ||||||
| app/static/frequency/frequency_*.pickle | app/static/frequency/frequency_*.pickle | ||||||
| app/static/frequency/frequency.p | app/static/frequency/frequency.p | ||||||
| app/wordfreqapp.db | app/wordfreqapp.db | ||||||
|  | app/db/wordfreqapp.db | ||||||
| app/static/donate-the-author.jpg | app/static/donate-the-author.jpg | ||||||
| app/static/donate-the-author-hidden.jpg | app/static/donate-the-author-hidden.jpg | ||||||
| app/model/__pycache__/ | app/model/__pycache__/ | ||||||
|  | @ -10,12 +10,12 @@ from flask import Flask, request, redirect, render_template, url_for, session, a | ||||||
| from difficulty import get_difficulty_level_for_user, text_difficulty_level, user_difficulty_level | from difficulty import get_difficulty_level_for_user, text_difficulty_level, user_difficulty_level | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| path_prefix = '/var/www/wordfreq/wordfreq/' | path_prefix = './' | ||||||
| path_prefix = './db/'  # comment this line in deployment | db_path_prefix = './db/'  # comment this line in deployment | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def total_number_of_essays(): | def total_number_of_essays(): | ||||||
|     rq = RecordQuery(path_prefix + 'wordfreqapp.db') |     rq = RecordQuery(db_path_prefix + 'wordfreqapp.db') | ||||||
|     rq.instructions("SELECT * FROM article") |     rq.instructions("SELECT * FROM article") | ||||||
|     rq.do() |     rq.do() | ||||||
|     result = rq.get_results() |     result = rq.get_results() | ||||||
|  | @ -33,7 +33,7 @@ def get_article_body(s): | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def get_today_article(user_word_list, visited_articles): | def get_today_article(user_word_list, visited_articles): | ||||||
|     rq = RecordQuery(path_prefix + 'wordfreqapp.db') |     rq = RecordQuery(db_path_prefix + 'wordfreqapp.db') | ||||||
|     if visited_articles is None: |     if visited_articles is None: | ||||||
|         visited_articles = { |         visited_articles = { | ||||||
|             "index" : 0,  # 为 article_ids 的索引 |             "index" : 0,  # 为 article_ids 的索引 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue