tipfy.ext.httpexceptions הוא תווך לתפוס שגיאות שרת ולהראות דף נכון.
הגדרות:
כדי להשתמש בתוסף זה ביישום שלך לעקוב אחר מספר צעדים פשוטים:
* הוסף לbuildout.cfg יבוא ביצה
* להוסיף תבניות 404.html ו500.html ל'תבניות / משותפת / "תיקייה (מקום שבו תבניות נפוצות בדרך כלל ממוקמות)
* שינוי config.py ולהוסיף שורות הבאות ::
& Nbsp; # Middlewares config
& Nbsp; config ['tipfy'] = {
& Nbsp; & nbsp; & nbsp; "תווך": [
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; # להוסיף קו זה כדי להתחיל ברשימה
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; "Tipfy.ext.httpexceptions.middleware.HTTPExceptionMiddleware ',
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; ..
& Nbsp; & nbsp; & nbsp; ]
& Nbsp; }
דרישות :
- פייתון
תגובות לא נמצא