Skip to content
Advertisement

Tag: sqlalchemy

SQLAlchemy alternative names for table columns

I know my question must be very simple but I couldn’t find any straight answer to it. I am mapping a table with SQlAlchemy : How to I set up an label for the existing columns above to avoid they current name with spaces? Bonus question : What is the advantage of mapping as as class instead of mapping as

How to call a variable outside a validate() function which is inside the FlaskForm class

I have two def validate(self) functions within the RegistrationForm(FlaskForm). First function validates the user input if the car range is over 400km. The other function validates if the user lives far or close to work by calculating the distance between the user’s address and work address by means of geopy module. I’ve been told that def validate_field(self, field): function takes

Advertisement