How to create a Web Framework app using Django Bindings

Django Bindings has been deprecated. For more, see the Deprecation Notice.

When you create a Web Framework app for Splunk Web, you'll generate the directory structure and project files, and a default Home page by running splunkdj commands at the command line.

Note  Creating an app in Splunk Web does not generate the full folder structure that is used by the Web Framework, so you must use the splunkdj command-line tool.

  1. Open a command prompt and navigate to $SPLUNK_HOME/bin/splunkdj.
  2. Enter the following at the command prompt, where your_app_name is the name of your app:

    On Mac, enter:

    ./splunkdj createapp your_app_name

    On Windows, enter:

    splunkdj createapp your_app_name
      Note  App names are case sensitive and must not include dashes (-).
  3. If this is your first time creating a Web Framework app, enter the path to Splunk when prompted.
  4. Enter your Splunk username and password when prompted.
  5. A your_app_name directory is created in $SPLUNK_HOME/etc/apps/ with auto-generated project files, including:

    • /default/app.conf: Contains the meta data (author, description, version) for your app. Edit this file in a text editor to fill in the details. Note that you'll need to restart Splunk to see changes to this file.
    • /django/your_app_name/templates/home.html: The default Home page, which opens when you go to http://<localhost:port>/dj/your_app_name/.
  6. Restart Splunk when prompted.
  7. Open Splunk Web to see your new app listed with the others apps―click your app to run it and view the default Home page.