
from flask import Blueprint

from ckan.plugins import toolkit

# bbcm = big butterfly count map :)
# create a flask blueprint with a prefix
blueprint = Blueprint(name=u'big-butterfly-count-map', import_name=__name__,
                      url_prefix=u'/big-butterfly-count-map')


@blueprint.route(u'')
@blueprint.route(u'/')
def bbcm():
    '''
    Render the big butterfly count map page.
    '''
    return toolkit.render(u'bbcm.html', {})


from flask import Blueprint

from ckan.plugins import toolkit

# bbcm = big butterfly count map :)
# create a flask blueprint
blueprint = Blueprint(name=u'big-butterfly-count-map', import_name=__name__)


@blueprint.route(u'/big-butterfly-count-map')
def bbcm():
    '''
    Render the big butterfly count map page.
    '''
    return toolkit.render(u'bbcm.html', {})

Allow the url to be accessed with or without a / on the end
Allow the url to be accessed with or without a / on the end

  
  from flask import Blueprint
  
  from ckan.plugins import toolkit
  
  # bbcm = big butterfly count map :)
- # create a flask blueprint with a prefix
+ # create a flask blueprint
- blueprint = Blueprint(name=u'big-butterfly-count-map', import_name=__name__,
+ blueprint = Blueprint(name=u'big-butterfly-count-map', import_name=__name__)
-                       url_prefix=u'/big-butterfly-count-map')
  
  
+ @blueprint.route(u'/big-butterfly-count-map')
- @blueprint.route(u'')
- @blueprint.route(u'/')
  def bbcm():
      '''
      Render the big butterfly count map page.
      '''
      return toolkit.render(u'bbcm.html', {})
  
Allow the url to be accessed with or without a / on the end
## Code Before:

from flask import Blueprint

from ckan.plugins import toolkit

# bbcm = big butterfly count map :)
# create a flask blueprint with a prefix
blueprint = Blueprint(name=u'big-butterfly-count-map', import_name=__name__,
                      url_prefix=u'/big-butterfly-count-map')


@blueprint.route(u'')
@blueprint.route(u'/')
def bbcm():
    '''
    Render the big butterfly count map page.
    '''
    return toolkit.render(u'bbcm.html', {})

## Instruction:
Allow the url to be accessed with or without a / on the end
## Code After:

from flask import Blueprint

from ckan.plugins import toolkit

# bbcm = big butterfly count map :)
# create a flask blueprint
blueprint = Blueprint(name=u'big-butterfly-count-map', import_name=__name__)


@blueprint.route(u'/big-butterfly-count-map')
def bbcm():
    '''
    Render the big butterfly count map page.
    '''
    return toolkit.render(u'bbcm.html', {})
