The more I learn, the more I'm convinced that there's nothing that can't be learned.

Jamis Buck

+ What’s the best way to get ready?

- Be great at learning, the moment you stop learning is the moment you begin to die.

pongo2 - disabling template cache

If you use Gin framework and pongo2 template engine together, you should run gin in debug mode for disable template caching.


You no longer have to re-compile app when you make changes in templates.

Happy coding.

If you learn only methods, you’ll be tied to your methods. But if you learn principles, you can devise your own methods.

Ralph Waldo Emerson

Gorm Delete query

Gorm'da Delete queryleri atarken dikkat edilmesi gereken bir nokta:

db.DB.Where(Booking{ID: bookingID}).Delete(&Booking{})

Yukaridaki ornekte oldugu gibi where kismina struct verilince eger bookingID 0 ise Delete from bookings querysi calistiriyor. Mazallah yanlislikla butun tabloyu silebilirsiniz :)

Onun yerine soyle yapmak lazim:

db.DB.Where("id = ?", bookingID}).Delete(&Booking{})
# Delete from bookings where id = 0;