Friday, December 23, 2011

Trying to create django app to view alarms

Hi-

I'm new to Django and pretty basic with Python to be honest, but am
trying to write a web tool that will let me upload 'before' and
'after' files of alarm logs and analyse the differences as follows:

* alarms cleared during the period (in before, but not after)
* alarms raised during the period (in after, but not before)
* historic alarms (exist with same timestamp in both before and
after lists)
* existing alarms with activity (exist in before and after lists but
with differing timestamps)

Ball-park figure for the size of these alarm logs is about 200 KB (=
about 40 logs).

I've already written a standalone .py script that, takes as inputs the
filenames of the before and after alarm log files and from this
creates 6 lists of alarm objects: (before alarms, after alarms, and
the 4 lists described above).

What I'd like to do is to use Django to upload the alarm data and then
be able to view the alarms by list.

As a rough and ready starting point, I've created an html form with a
couple of textareas in, and I seem to be able to paste the entire
before and alarm files in these, so I can upload the alarms data to
Django in a form.

Can anyone suggest how best to implement my existing python code in
the .py file to create a Django solution?

Thanks for any advice.

Jim

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment