deprecate: mark CLI as deprecated, recommend web interface
- Add DEPRECATED notice to minimal_app.py docstring - Add deprecation warning at startup - Update README.md to mark CLI as deprecated - Remove CLI from Quick Start, promote web interface - Note limited functionality in CLI description The CLI (minimal_app.py) is now officially deprecated. Users should use the full-featured web interface (app.py) instead.
This commit is contained in:
parent
e789201942
commit
ab7b466ce4
2 changed files with 36 additions and 11 deletions
18
README.md
18
README.md
|
|
@ -15,11 +15,10 @@ A simple SQLite-based system for managing tablet lending and returns.
|
|||
|
||||
## Files
|
||||
|
||||
- `minimal_app.py` - Interactive command-line application (includes non-loanable device management)
|
||||
- `minimal_app.py` - **DEPRECATED** - Interactive command-line application (limited functionality, use `app.py` instead)
|
||||
- `test_app.py` - Test script that demonstrates functionality
|
||||
- `tablets.db` - SQLite database (created automatically, includes non_loanable_devices table)
|
||||
- `simple_app.py` - Web-based version (requires Flask, includes non-loanable device management)
|
||||
- `app.py` - Alternative web version (requires Flask, includes non-loanable device management)
|
||||
- `app.py` - **Recommended** - Full-featured web version (requires Flask, includes all features)
|
||||
|
||||
## Quick Start
|
||||
|
||||
|
|
@ -35,18 +34,21 @@ This will:
|
|||
- Demonstrate loan and return operations
|
||||
- Show the complete workflow
|
||||
|
||||
### 2. Run the interactive application
|
||||
### 2. Run the web application (Recommended)
|
||||
|
||||
```bash
|
||||
python3 minimal_app.py
|
||||
python3 app.py
|
||||
```
|
||||
|
||||
This provides a menu-driven interface for:
|
||||
- Adding tablets
|
||||
- Adding users
|
||||
This provides a full-featured web interface for:
|
||||
- Adding tablets (with notes field)
|
||||
- Adding users (with email and phone)
|
||||
- Loaning tablets
|
||||
- Returning tablets
|
||||
- Viewing inventory and loan status
|
||||
- User loans view with search
|
||||
- Non-loanable devices management
|
||||
- Project management with markdown notes
|
||||
|
||||
### 3. Database Structure
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,23 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
Minimal Tablet Lending and Return Management System
|
||||
Using only built-in Python modules
|
||||
DEPRECATED - Tablet Lending and Return Management System (CLI)
|
||||
|
||||
This CLI version is DEPRECATED. Please use the web interface instead.
|
||||
|
||||
The web interface (app.py) provides full functionality including:
|
||||
- Complete user management (name, email, phone, identification)
|
||||
- Full tablet management with notes field
|
||||
- User loans view with search
|
||||
- Edit functionality for non-loanable devices
|
||||
- Project management
|
||||
- Responsive mobile interface
|
||||
|
||||
To run the web interface:
|
||||
python3 app.py
|
||||
|
||||
Then open http://localhost:5000 in your browser.
|
||||
|
||||
This CLI will be removed in a future version.
|
||||
"""
|
||||
|
||||
import sqlite3
|
||||
|
|
@ -273,10 +289,17 @@ def delete_non_loanable_device(device_id):
|
|||
|
||||
def main():
|
||||
"""Main menu"""
|
||||
print("=" * 70)
|
||||
print("DEPRECATION WARNING: This CLI is deprecated!")
|
||||
print("Please use the web interface instead: python3 app.py")
|
||||
print("=" * 70)
|
||||
print()
|
||||
|
||||
init_db()
|
||||
|
||||
print("=== Tablet Lending and Return Management System ===")
|
||||
print("=== Tablet Lending and Return Management System (DEPRECATED) ===")
|
||||
print("Using SQLite database: tablets.db")
|
||||
print("NOTE: This CLI has limited functionality. Use web interface for full features.")
|
||||
|
||||
while True:
|
||||
print("\nMenu:")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue