python - Do I need to do something in models.py if I'm creating a contact form? -


i'm creating contact form in django. i've read tuts , of them use models.py , of them skip models part. role of models.py in creating contact form?

models.py just convention. not required put models in specific module, put in 1 file if wanted to.

if contact form doesn't store in database, don't need models either. form, email information entered elsewhere, or write disk other means.

even if did want put information database, still without creating model. however, creating model makes task far easier , convenient, because django can generate form that, validation, provide helpful feedback users when make mistake, handle transactions, etc.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -