To use custom SQL see this for reference: http://docs.djangoproject.com/en/dev/topics/db/sql/
To create a templatetag see this for reference: http://docs.djangoproject.com/en/dev/howto/custom-template-tags/ On Mon, Jun 14, 2010 at 10:08 PM, Cole743 <cole.rieger...@gmail.com> wrote: > Hello again, > > My last question may have been unclear, so I'm going to be more > specific. > > I want to use the results of this: > cursor.execute("SELECT * from sp_getreport(""varchar"" %s)", [usr]) > > (or something similar) In a custom template tag to display in a > template. The results of the query are: > a user name, a message, an address, a date, and a primary key. > > I've read any number of articles on the topic, but I'm still having > trouble understanding how to create the necessary custom tags to > accomplish this. How would I go about writing this? > > -Cole > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.