from flask import Blueprint

bp = Blueprint('admin', __name__)

from wuvt.admin import views

from flask import Blueprint

bp = Blueprint('admin', __name__)

from wuvt.admin import views
from wuvt import app
from wuvt import format_datetime

@app.context_processor
def utility_processor():
    def format_price(amount, currency='$'):
        return u'{1}{0:.2f}'.format(amount/100, currency)
    return dict(format_price=format_price, format_datetime=format_datetime)

Add format_price and format_datetime to jinja context.
Add format_price and format_datetime to jinja context.

  from flask import Blueprint
  
  bp = Blueprint('admin', __name__)
  
  from wuvt.admin import views
+ from wuvt import app
+ from wuvt import format_datetime
  
+ @app.context_processor
+ def utility_processor():
+     def format_price(amount, currency='$'):
+         return u'{1}{0:.2f}'.format(amount/100, currency)
+     return dict(format_price=format_price, format_datetime=format_datetime)
+ 
Add format_price and format_datetime to jinja context.
## Code Before:
from flask import Blueprint

bp = Blueprint('admin', __name__)

from wuvt.admin import views

## Instruction:
Add format_price and format_datetime to jinja context.
## Code After:
from flask import Blueprint

bp = Blueprint('admin', __name__)

from wuvt.admin import views
from wuvt import app
from wuvt import format_datetime

@app.context_processor
def utility_processor():
    def format_price(amount, currency='$'):
        return u'{1}{0:.2f}'.format(amount/100, currency)
    return dict(format_price=format_price, format_datetime=format_datetime)
