semvec/pypi-packages huggingface dataset:
django-hookbox 0.3
Integrate hookbox with Django.
License: BSD

==============
IMPORTANT NOTE
==============

Although hookbox is a very quick and easy way to experiment with COMET, it is
not suitable for production use at this time. Unfortunately, at the time of
writing, the hookbox project looks moribund. Hopefully this situation changes
soon, but for the meantime this module should only be used for quick
prototypes and experimentation.

============
Requirements
============

    * Django 1.3+
    * Hookbox 0.3.3
    * testfixtures 1.9.2+ (for unit tests)

It should work with Django 1.2 and earlier versions of testfixtures, however it
has not been tested. If you try it please let me know how you get on.

Other versions of hookbox (including the latest dev versions) probably will
*not* work, as things like command-line option names and URLs seem to change
frequently. On the other hand, any problems should be easy to fix.

============
Installation
============

Install the usual way, e.g.: ::

    pip install django-hookbox

Add to ``INSTALLED_APPS`` in ``settings.py``: ::

    INSTALLED_APPS = (
        ...
        'django_hookbox',
        ...
    )

Add to your ``urls.py``: ::

    urlpatterns = patterns('',
        ...
        (r'^hookbox/', include('djhookbox.urls')),
        ...

=============
CONFIGURATION
=============

At a minimum you will need a channel handler to allow channel creation. E.g.: ::

    @whcallback('create')
    def create_good_channels(op, user, channel = '-'):
        assert op == 'create'
        if channel.startswith('/good/'):
            return {
              'history_size': 1,
              'reflective':   False,
              'presenceful':  False,
              'moderated':    True,
            }
        elif channel.startswith('/bad/'):
            return 'no cookie for you!'

The first time a user subscribes to a channel it is implicitly created. If no
create callback returns an options dict this will fail.

To fail operations (e.g. deny a subscription attempt) provide callbacks that
return a failure message or raise an exception.

You will probably also want to configure various hookbox options in
``settings.py``. The available options are: ::

    HOOKBOX_INTERFACE: The interface the hookbox server listens on.
    HOOKBOX_PORT: The port the hookbox server listens on.
    HOOKBOX_CBHOST: The host the Django server listens on.
    HOOKBOX_CBPORT: The port the Django server listens on.
    HOOKBOX_CBPATH: The path prefix the webhook views are located under.
    HOOKBOX_WEBHOOK_SECRET: A secret token passed by hookbox to webhooks.
    HOOKBOX_REST_SECRET: A secret token passed by Django to hookbox.
    HOOKBOX_ADMIN_PASSWORD: The hookbox administrator password.

=====
USAGE
=====

A management command is provided to run the hookbox server. See
``./manage.py help runhookbox`` for the available options. By default options
from ``settings.py`` (see above) will be used.

To publish to a channel from with Django call, e.g.: ::

    djhookbox.publish('/some-channel/', {'data': 'some-data'})
jslint 0.6.0
command-line wrapper for JSLint
License: BSD

============================================================
DEPRECATED

This wrapper has been superseded by JSLint Reporter:
http://github.com/FND/jslint-reporter
============================================================




command-line wrapper for JSLint
http://github.com/FND/jslint-cli

Usage:
  $ jslint-cli <filename>

Using Douglas Crockford's JavaScript libraries:
* JSLint (http://jslint.com)
* JSON (http://json.org)


Prior Art

More sophisticated wrappers exist in other languages:
http://search.cpan.org/dist/JavaScript-JSLint/bin/jslint
http://www.corybennett.org/projects/
http://code.google.com/p/jslint4java/

However, these are either not suitable for my own purposes or are not being
actively maintained.
djoosh 0.1
A super simple Django-whoosh search engine
License: BSD
Keywords: django whoosh search models simple

===========================
Django-Whoosh search engine
===========================

Djoosh is a very simple search engine for your Django projects.

WARNING: This is currently under heavy development, so use at your work risk!

Installation
============

#. Install with pip:

	``pip install djoosh``

#. Add `djoosh` to `INSTALLED_APPS` in your `settings.py`::

	INSTALLED_APPS = (
		'django.contrib.auth',
		'django.contrib.contenttypes',
		'django.contrib.sessions',
		'django.contrib.sites',
		...
		'djoosh',
	)

#. In your `models.py` add::

	from djoosh import SearchMixin
	
	...
	
	class BlogPost(models.Model, SearchMixin):
		...
		
   Note `SearchMixin` in the parents for `MyModel`. Just add it to any model
   that you want to search.
   

#. When you're done, run `python manage.py search rebuild`

#. That's it! You can now search your blog posts using
   ``BlogPost.search.query('some query')``,

   For example you can create a view like this::

	def search(request):
	
		query = request.GET.get('q', '')
		
		posts = BlogPost.search.query(query)
		
		return render_to_response('search_posts.html',
		                          {'posts': posts, 'query': query})

   ... and your template can be::
   
	<form action="/search" method="get">
		<input type="text" name="q" value="{{ query }}" />
		<input type="submit" value="Search Blogs" />
	</form>
	
	<h1>Search Results</h1>
	{% for post in posts %}
		<h2>{{ post.title }}</h2>
		<p>{{ post.content }}</p>
	{% endfor %}

Fine-Tuning
===========

Coming soon...

For the impatient::

	blog/search.py:

	from blog import BlogPost
	from djoosh import site, SearchModel
	
	class BlogPostSearch(SearchModel):
		model = BlogPost
		fields = ('title', 'tags')
		keywords = ('tags',)
		pk = 'id'
		
	site.register(BlogPost, BlogPostSearch)
	
You may also have a look at `djoosh.loading`, particularly `site` and `SearchModel`.