this is just a basic port of the tables into django models right now. there's some serious slowness in the state creation that i need to fix before this does anything, but i want to get this in a real database on a real linode before i go too much further, so here it is
25 lines
619 B
Python
25 lines
619 B
Python
"""
|
|
markov/forms.py --- forms for manipulating markov data
|
|
|
|
"""
|
|
|
|
import logging
|
|
|
|
from django.forms import Form, CharField, FileField, ModelChoiceField
|
|
|
|
from markov.models import MarkovContext
|
|
|
|
log = logging.getLogger('dr_botzo.markov')
|
|
|
|
|
|
class LogUploadForm(Form):
|
|
|
|
"""Accept a file upload that will be imported into Markov stuff."""
|
|
|
|
log_file = FileField(help_text="Weechat log format.")
|
|
context = ModelChoiceField(queryset=MarkovContext.objects.all())
|
|
ignore = CharField(help_text="Comma-separated list of nicks to ignore.",
|
|
required=False)
|
|
|
|
# vi:tabstop=4:expandtab:autoindent
|