mirror of
				https://github.com/simon987/od-database.git
				synced 2025-10-31 05:46:51 +00:00 
			
		
		
		
	Remove Downloads page
This commit is contained in:
		
							parent
							
								
									1730501c67
								
							
						
					
					
						commit
						c3702edf57
					
				
							
								
								
									
										12
									
								
								app.py
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								app.py
									
									
									
									
									
								
							| @ -79,18 +79,6 @@ def from_timestamp(value): | |||||||
|     return datetime.datetime.fromtimestamp(value) |     return datetime.datetime.fromtimestamp(value) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @app.route("/dl") |  | ||||||
| @cache.cached(120) |  | ||||||
| def downloads(): |  | ||||||
|     try: |  | ||||||
|         export_file_stats = os.stat("static/out.csv.lzm4") |  | ||||||
|     except FileNotFoundError: |  | ||||||
|         logger.warning("No export file to display in /dl") |  | ||||||
|         export_file_stats = None |  | ||||||
| 
 |  | ||||||
|     return render_template("downloads.html", export_file_stats=export_file_stats) |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| @app.route("/stats") | @app.route("/stats") | ||||||
| @cache.cached(120) | @cache.cached(120) | ||||||
| def stats_page(): | def stats_page(): | ||||||
|  | |||||||
| @ -1,38 +0,0 @@ | |||||||
| {% extends "layout.html" %} |  | ||||||
| {% set title = "Downloads - OD-Database" %} |  | ||||||
| {% set current_page = "dl" %} |  | ||||||
| 
 |  | ||||||
| {% block body %} |  | ||||||
|     <div class="container"> |  | ||||||
|         <div class="card"> |  | ||||||
|             <div class="card-header">Downloads</div> |  | ||||||
|             <div class="card-body"> |  | ||||||
| 
 |  | ||||||
|                 <p>Please let me know if you used the database in a project!</p> |  | ||||||
|                 <p>The entire database is exported to CSV regularly</p> |  | ||||||
| 
 |  | ||||||
|                 <table class="table table-striped"> |  | ||||||
| 
 |  | ||||||
|                     <thead> |  | ||||||
|                     <tr> |  | ||||||
|                         <th>Description</th> |  | ||||||
|                         <th>Size</th> |  | ||||||
|                         <th>Date</th> |  | ||||||
|                     </tr> |  | ||||||
|                     </thead> |  | ||||||
| 
 |  | ||||||
|                     <tbody> |  | ||||||
|                     {% if export_file_stats %} |  | ||||||
|                     <tr> |  | ||||||
|                         <td><a href="static/out.csv.xz">out.csv.xz</a></td> |  | ||||||
|                         <td>{{ export_file_stats.st_size |filesizeformat }}</td> |  | ||||||
|                         <td>{{ export_file_stats.st_mtime|datetime_format }} UTC</td> |  | ||||||
|                     </tr> |  | ||||||
|                     {% endif %} |  | ||||||
|                     </tbody> |  | ||||||
| 
 |  | ||||||
|                 </table> |  | ||||||
|             </div> |  | ||||||
|         </div> |  | ||||||
|     </div> |  | ||||||
| {% endblock body %} |  | ||||||
| @ -28,9 +28,6 @@ | |||||||
|             <li class="nav-item"> |             <li class="nav-item"> | ||||||
|                 <a class="nav-link {{ "active" if current_page == "contribute" else "" }}" href="/contribute">Contribute</a> |                 <a class="nav-link {{ "active" if current_page == "contribute" else "" }}" href="/contribute">Contribute</a> | ||||||
|             </li> |             </li> | ||||||
|             <li class="nav-item"> |  | ||||||
|                 <a class="nav-link {{ "active" if current_page == "dl" else "" }}" href="/dl">Downloads</a> |  | ||||||
|             </li> |  | ||||||
|             <li class="nav-item"> |             <li class="nav-item"> | ||||||
|                 <a class="nav-link {{ "active" if current_page == "stats" else "" }}" href="/stats">Stats</a> |                 <a class="nav-link {{ "active" if current_page == "stats" else "" }}" href="/stats">Stats</a> | ||||||
|             </li> |             </li> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user