Tuesday, December 27, 2011

Re: Trying to create django app to view alarms

On Dec 23, 2:29 pm, Python_Junkie <software.buy.des...@gmail.com>
wrote:
> I think that building the python code that performs your logic is a
> great way to start, and not getting bogged down with django is a great
> way to get started.
>
> There are several (relatively straight forward) pieces of django that
> you will need to tie together.
>
> I will simply disucss the view.py components and the html template.
>
> Establish your python code as a module.
> Import the module in the view and use it in the view.py.
>
> def function_called_for_log_display(request):
>             ..........call your python module
>             ...........create a python dictionary with the information
> that is pulled back by your python module
>
>           .............render the html template and pass the
> dictionary values to the template
>
>                  return render_to_response('polls/index.html',
> {'latest_poll_list': latest_poll_list})  #I took this from the django
> project tutorial
>
>  ...........use the appropriate template tags/logic to display the
> results of the dictionary
>

Thanks Python-Junkie-

I've got a prototype working but it's really clunky and currently
involves a server submit whenever I want to filter or my alarm view.
I'm thinking about what to do and am sure will post another question
soon! :)

--
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