Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-190

system_js item assignment

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      pymongo version 1.9
      Django 1.2.3

      Description

      db.system_js.add = "function (a, b)

      {return a+b;}"

      works perfectly... but the following doesn't

      db.system_js["add"] = "function (a, b){return a+b;}

      "

      my goal is to have a directory of .js files, and using a manage.py runscript command, i wanna loop thru the js directory and add functions from there using item assignment

      pseudo code

      for file in JSdirectory:
      db.system_js[file.filename] = file.contents

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: