Questions tagged [python-inject]
2 questions
                    
                    2
                    
            votes
                
                1 answer
            
        Python run before any script
In Python, is there a similar thing like atexit. Atexit is meant to be used a "tear down". I need something like "set up". That before any script I run this setUp would be executed.
EDIT
I should have pointed out that I have several little scripts I…
         
    
    
        Amio.io
        
- 20,677
- 15
- 82
- 117
                    0
                    
            votes
                
                1 answer
            
        getting AttributeError: 'function' object has no attribute 'commit_select' after inject database in a Flask-Admin Peewee web app
Following this example I integrated Flask admin with some already created peewee models. Everything looks great until I try the list view of the admin interface, but first some context:
The Code
The important part of the app.py file:
def…
         
    
    
        gerosalesc
        
- 2,983
- 3
- 27
- 46