def startapp(app_name, directory):
    "Creates a Django app for the given app_name in the given directory."
    # Determine the project_name a bit naively -- by looking at the name of
    # the parent directory.
    project_dir = os.path.normpath(os.path.join(directory, '..'))
    project_name = os.path.basename(project_dir)
    if app_name == os.path.basename(directory):
        sys.stderr.write(style.ERROR(app_name % "Error: You cannot create an app with the same name (%r) as your project.\n"))
        sys.exit(1)
    _start_helper('app', app_name, directory, project_name)
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-0.96/django/core/management.py/startapp/swapped operands of `%`