Pavel "LEdoian" Turinsky
4 years ago
9 changed files with 33 additions and 0 deletions
@ -0,0 +1,3 @@ |
|||
from django.contrib import admin |
|||
|
|||
# Register your models here. |
@ -0,0 +1,5 @@ |
|||
from django.apps import AppConfig |
|||
|
|||
|
|||
class VariousConfig(AppConfig): |
|||
name = 'various' |
@ -0,0 +1,14 @@ |
|||
def april(req): |
|||
if 'X-April' in req.headers: |
|||
try: |
|||
year = int(req.headers['X-April']) |
|||
return {'april': year} |
|||
except: |
|||
pass # Fall-back to regular behaviour |
|||
|
|||
import datetime |
|||
today = datetime.date.today() |
|||
if today.day == 1 and today.month == 4: |
|||
return {'april': today.year} |
|||
return {} |
|||
|
@ -0,0 +1,3 @@ |
|||
from django.db import models |
|||
|
|||
# Create your models here. |
@ -0,0 +1,3 @@ |
|||
from django.test import TestCase |
|||
|
|||
# Create your tests here. |
@ -0,0 +1,3 @@ |
|||
from django.shortcuts import render |
|||
|
|||
# Create your views here. |
Loading…
Reference in new issue