tipfy.ext.httpexceptions server səhvlər tutmaq və müvafiq səhifə üçün bir middleware edir.
Quraşdırma
Bir neçə sadə adımları tətbiqi bu uzadılması istifadə etmək üçün:
* Yumurta idxal buildout.cfg əlavə et
* Şablonları 404.html və (ümumi şablonları adətən yerləşən yerdə) ortaq / templates / 'qovluğunda 500.html əlavə
* Config.py dəyişdirmək və ölçüləri xətləri əlavə ::
& Nbsp; # Middlewares config
& Nbsp; config ['tipfy'] = {
& Nbsp; & nbsp; & nbsp; "Middleware: [
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; # Siyahısı başlamaq üçün bu xətt əlavə
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; "Tipfy.ext.httpexceptions.middleware.HTTPExceptionMiddleware,
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; ..
& Nbsp; & nbsp; & nbsp; ]
& Nbsp; }
tələblər
- Python
Şərhlər tapılmadı