def baseurl(request):
    """
    Return a BASE_URL template context for the current request
    """
    if request.is_secure():
        scheme = 'https://'
    else:
        scheme = 'http://'

    return {
        'BASE_URL': scheme + request.get_host(),
    }

from name.models import NAME_TYPE_CHOICES


def baseurl(request):
    """
    Return a BASE_URL template context for the current request
    """
    if request.is_secure():
        scheme = 'https://'
    else:
        scheme = 'http://'

    return {
        'BASE_URL': scheme + request.get_host(),
    }


def name_types(request):
    return {'name_types': dict(NAME_TYPE_CHOICES)}

Add a new context processor to include the NAME_TYPE_CHOICES in every request context.
Add a new context processor to include the NAME_TYPE_CHOICES in every request context.

+ from name.models import NAME_TYPE_CHOICES
+ 
+ 
  def baseurl(request):
      """
      Return a BASE_URL template context for the current request
      """
      if request.is_secure():
          scheme = 'https://'
      else:
          scheme = 'http://'
  
      return {
          'BASE_URL': scheme + request.get_host(),
      }
  
+ 
+ def name_types(request):
+     return {'name_types': dict(NAME_TYPE_CHOICES)}
+ 
Add a new context processor to include the NAME_TYPE_CHOICES in every request context.
## Code Before:
def baseurl(request):
    """
    Return a BASE_URL template context for the current request
    """
    if request.is_secure():
        scheme = 'https://'
    else:
        scheme = 'http://'

    return {
        'BASE_URL': scheme + request.get_host(),
    }

## Instruction:
Add a new context processor to include the NAME_TYPE_CHOICES in every request context.
## Code After:
from name.models import NAME_TYPE_CHOICES


def baseurl(request):
    """
    Return a BASE_URL template context for the current request
    """
    if request.is_secure():
        scheme = 'https://'
    else:
        scheme = 'http://'

    return {
        'BASE_URL': scheme + request.get_host(),
    }


def name_types(request):
    return {'name_types': dict(NAME_TYPE_CHOICES)}
