Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Steve McConville
> Is it possible to drop a Python script (around 50 lines) into one of your > django pages? Would this be embedding into the template code? You could wrap it in a custom template tag: https://docs.djangoproject.com/en/1.3/howto/custom-template-tags/ -- steve -- You received this message

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Joey Espinosa
Jimmy, I don't know your specific situation, but this is probably not worth a fee. You already know Django and Python, all you need to do is extend that knowledge with some AJAX. If you run into problems, there's always this group ;) -- Joey "JoeLinux" Espinosa Software Developer

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread jc
Oh, this does help...tremendously. Thanks for taking the time out and explaining. I think that's enough for me to start learning via the docs/experimenting and hopefully get something implemented. If I can't implement this, do you know anyone that could do this for a fee? thanks, jimmy --

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Joey Espinosa
Jimmy, Not sure what JavaScript library you use (or if you're familiar with JavaScript at all), but this is a very rudimentary example: First, create a View in Django that you can call, and capture the results: import os > from django.http import HttpResponse > ... > def ajax(req): > if

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread jc
Oh, that would *totally* be fine. I have no idea how to do that, do you know of any docs that might show me how to execute this code on the server-side and print out via AJAX? thanks! jimmy -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Joey Espinosa
Jimmy, Does it NEED to be embedded into the page? I ask because something like this would be a lot easier if you executed server-side, and simply returned the output to the front-end using AJAX. Would that serve your purpose here, or am I misunderstanding the original question? -- Joey

Can you drop a Python script into a Django page?

2011-11-12 Thread jc
Hi, Is it possible to drop a Python script (around 50 lines) into one of your django pages? Would this be embedding into the template code? I am experimenting with doing this but I haven't had any luck in finding out how. An example of what I am trying to do is to place a script like this