Coder Social home page Coder Social logo

toggle-corp / form-builder Goto Github PK

View Code? Open in Web Editor NEW
0.0 5.0 0.0 8.08 MB

Form builder used in FieldSight

License: GNU Affero General Public License v3.0

JavaScript 55.34% Shell 0.13% Python 11.81% HTML 7.83% CSS 15.60% CoffeeScript 7.68% PHP 1.43% Go 0.18% Makefile 0.01%

form-builder's Introduction

KPI

Python Dependencies

Python dependencies are listed in requirements.in, which is then compiled to requirements.txt by pip-compile. You may use pip directly with requirements.txt, but consider using instead the pip-sync command provided by pip-tools. Do not add new dependencies directly to requirements.txt.

Downloading and compiling the translations

  • Pull the submodule into the locale directory with git submodule update.
  • Optionally configure transifex to pull the latest translations into the locale directory with tx pull --all
  • Run python manage.py compilemessages to create .mo files from the .po files.
  • To test out locales in the interface, double click "account actions" in the left navbar, use the dropdown to select a language, and refresh.

Searching assets and collections

Top-level (null-parent) assets and collections can be found by including parent= in the query string. For other searches, construct a string using the Whoosh query language and pass it in as the q parameter, e.g. /assets/?q=name:sanitation. Fields indexed by Whoosh are:

  • name: a tokenized* representation of the name;
  • name__exact: a space- and comma-escaped representation of the name, e.g. "Fun, Exciting Asset" would be indexed as "Fun--Exciting-Asset";
  • owner__username: a tokenized* representation of the owner's username;
  • owner__username__exact: a space- and comma-escaped representation of the owner's username;
  • parent__name: a tokenized* representation of the parent object's name;
  • parent__name__exact: a space- and comma-escaped representation of the parent object's name;
  • parent__uid: the UID of the parent collection;
  • ancestor__uid: a multi-value field containing the UIDs of all ancestor collections;
  • tag: a multi-valued field holding space- and comma-escaped representations of each tag assigned to the object;
  • asset_type (for assets only): a space- and comma-escaped representation of the asset's type string;
  • text: the search "document," which is built by text templates.

When the q parameter contains a search term without a specified field, e.g. /collections/?q=health, that term is matched against the search "document" (the text field).

Searching tags

Construct a string using the Whoosh query language and pass it in as the q parameter, e.g. /tags/?q=asset_type:block. Fields indexed by Whoosh are:

  • name__ngram: the tag's name decomposed into n-grams, e.g. ?q=name__ngram:cat would match tags named "dogs/cats" and "education";
  • asset_type: a multi-value field containing the types (e.g. form, question, block) of all tagged assets;
  • kind: a multi-value field containing "asset" when assets are tagged, "collection" when collections are tagged, or both;
  • text: a tokenized* representation of the name, which serves as the search "document" (see note below).

When the q parameter contains a search term without a specified field, e.g. /tags/?q=health, that term is matched against the search "document" (the text field).

* Implemented by Haystack as a Whoosh TEXT field using the StemmingAnalyzer. Unsuitable for exact matching.

form-builder's People

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.