How to draw line charts in Django?

2011-05-05 Thread Nge
Hi everyone ! I want to know. How can I create line charts in Django? Then I have to take data from postgresql for x-axis and y-axis. So how should I do? How can apply django, postgres, graph and ajax? Pls share your knowledge. Thanks Nge -- You received this message because you are subscribed

Re: How to draw line charts in Django?

2011-05-05 Thread Kenneth Gonsalves
On Thu, 2011-05-05 at 00:28 -0700, Nge wrote: > I want to know. How can I create line charts in Django? > Then I have to take data from postgresql for x-axis and y-axis. > So how should I do? How can apply django, postgres, graph and ajax? create a view - extract the data you want and send it to

Re: How to draw line charts in Django?

2011-05-05 Thread stava
On Thu, 05 May 2011 13:14:57 +0530, Kenneth Gonsalves wrote: On Thu, 2011-05-05 at 00:28 -0700, Nge wrote: I want to know. How can I create line charts in Django? Then I have to take data from postgresql for x-axis and y-axis. So how should I do? How can apply django, postgres, graph and ajax?

how to combine django and wordpress

2011-05-05 Thread CCC
now I have a site which based on django which can run stable. in this site we need to use wordpress as a cms. the server config on ubuntu and nginx, but i don't know how to combine the django and wordpress together.any tips can share is great. thanks in advance! -- You received this message becau

Re: How to draw line charts in Django?

2011-05-05 Thread Nge
Hi KG! I already created a view and can extract data from database.But I have a problem. I don't know how to send to template and how to create js/ ajax. Can you share me sample? Thanks Nge On May 5, 3:44 am, Kenneth Gonsalves wrote: > On Thu, 2011-05-05 at 00:28 -0700, Nge wrote: > > I want to

Re: How to draw line charts in Django?

2011-05-05 Thread Xavier Ordoquy
Le 5 mai 2011 à 12:05, Nge a écrit : > Hi KG! > > I already created a view and can extract data from database.But I have > a problem. I don't know how to send to template and how to create js/ > ajax. Can you share me sample? > > Thanks > Nge There are tons of javascript application that can d

Anyone got experience of using django-fiber cms?

2011-05-05 Thread Dave Sayer
Hi, I am currently deliberating over writing a bespoke CMS or using a ready rolled one for a client. I have limited experience with Python/Django beyond the standard admin interface and building a pretty simple photo portfolio site. I have tried django-cms and didn't like the functionality - didn

Re: How to draw line charts in Django?

2011-05-05 Thread Kenneth Gonsalves
On Thu, 2011-05-05 at 03:05 -0700, Nge wrote: > I already created a view and can extract data from database.But I have > a problem. I don't know how to send to template and how to create js/ > ajax. Can you share me sample? how to use js does not come in the purview of this list - you just need t

Re: Unable to access Dictionary values in Template (object pk is the dict key)

2011-05-05 Thread AJ
I see. Any clue where I can begin in my case (for filters etc.)? Thanks. -- 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-us

Re: removing the source of a OneToOneField relationship

2011-05-05 Thread PFL
Seth, see: http://docs.djangoproject.com/en/1.3/ref/models/instances/#deleting-objects "Issues a SQL DELETE for the object. This only deletes the object in the database; the Python instance will still be around, and will still have data in its fields." I think you will have to re-query your ta

Site.object.get(pk=x).anyobject_set() is forcing the current site. Is this a bug ?

2011-05-05 Thread ksamuel
I encountered a behavior I can't explain in the site framework and wonder if I should report this as a bug. class Video(models.Model): sites = models.ManyToManyField(Site) on_site = CurrentSiteManager() objects = models.Manager() In manage.py shell, USING A SETTINGS FILE WITH SITE_ID

Re: Error: No module named messages.

2011-05-05 Thread Jacob Scherffenberg
Im using Django-1.3 On May 4, 1:35 pm, Kenneth Gonsalves wrote: > On Wed, 2011-05-04 at 02:10 -0700, Jacob Scherffenberg wrote: > > Have been working on anError:Nomodulenamed debug toolbar for a > > couple hours, finally realized that i could just use the ubuntu > > package system, to get it. > >

Re: Site.object.get(pk=x).anyobject_set() is forcing the current site. Is this a bug ?

2011-05-05 Thread Karen Tracey
On Thu, May 5, 2011 at 6:43 AM, ksamuel wrote: > I encountered a behavior I can't explain in the site framework and > wonder if I should report this as a bug. > > class Video(models.Model): > >sites = models.ManyToManyField(Site) >on_site = CurrentSiteManager() >objects = models.Manag

Question about GenericRelation

2011-05-05 Thread Stodge
I have a Page model, with a generic foreign key. I have a Story model, which has a generic relation to Page. If I do: sp=StaticPage.objects.get(id=1) I have to do this to get the Page object: sp.content.all()[0] However, there will only ever be on Story linked to one Page model. Is there anyway

Re: Error: No module named messages.

2011-05-05 Thread Karen Tracey
On Thu, May 5, 2011 at 7:43 AM, Jacob Scherffenberg wrote: > Im using Django-1.3 > > Are you absolutely sure about that? The message generally happens when you have a settings file produced by 1.2+ or higher (thus including the django.contrib.messages app in INSTALLED_APPS) but the running level o

Re: Question about GenericRelation

2011-05-05 Thread А . Р .
If you want an one-to-one relationship, here you go: http://docs.djangoproject.com/en/1.3/ref/models/fields/#django.db.models.OneToOneField -- 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@googleg

Development server: cookies not working

2011-05-05 Thread fsang
Hi, I am running my Django project on a remote host (with Apache) and on my current machine (localhost, using "runserver"). Cookies and sessions work fine when the project is served via Apache from the remote host. But for some reasons all of my browsers reject the cookies from the development ser

Re: Site.object.get(pk=x).anyobject_set() is forcing the current site. Is this a bug ?

2011-05-05 Thread ksamuel
Thanks Karen. On May 5, 2:08 pm, Karen Tracey wrote: > On Thu, May 5, 2011 at 6:43 AM, ksamuel wrote: > > I encountered a behavior I can't explain in the site framework and > > wonder if I should report this as a bug. > > > class Video(models.Model): > > >    sites = models.ManyToManyField(Site)

Re: How to draw line charts in Django?

2011-05-05 Thread Jacob Kaplan-Moss
On Thu, May 5, 2011 at 5:05 AM, Nge wrote: > I already created a view and can extract data from database.But I have > a problem. I don't know how to send to template and how to create js/ > ajax. Can you share me sample? I've recently done a project that uses Ajax, jQuery, and Flot to do some cha

Re: How to draw line charts in Django?

2011-05-05 Thread william ratcliff
One other approach is that you can send the data to matplotlib (which is python) and use that to create a .png which you then serve--it depends on what your needs are. William On Thu, May 5, 2011 at 6:40 AM, Kenneth Gonsalves wrote: > On Thu, 2011-05-05 at 03:05 -0700, Nge wrote: > > I already c

Re: Django orm group_by difficulties

2011-05-05 Thread Satan Study Django
Question solved with such sql query: select * from `main_home` t2, `main_states` t4, `main_person` t3 where t2.id in (select max(id) from `main_home` where `person_id` in (select `person_id` from `main_online`) group by `person_id`) and t4.id=t2.`state_id` and t3.id=t2.`person_id` Or su

Re: how to add datepicker (available in admin)

2011-05-05 Thread Tom Evans
On Wed, May 4, 2011 at 9:53 AM, GKR wrote: > thanks but its giving an error like > > name 'AdminDateWidget' is not defined > > please help it might be a configuration problem > > please help > > thanks > I wrote: > Then modify your form to use the admin date picker widget: > > from django.contrib

Re: Adding custom filter to stand-alone template

2011-05-05 Thread Up2L8
On May 4, 7:10 pm, Ethan Jucovy wrote: > On Wed, May 4, 2011 at 7:19 PM, Ethan Jucovy wrote: > > This also feels a little hacky, but IMHO cleaner than messing with > >> builtins. > > Looking at django/template/__init__.py -- it does seem like INSTALLED_APPS > and django.template.builtins are th

Re: Unable to access Dictionary values in Template (object pk is the dict key)

2011-05-05 Thread Tom Evans
On Thu, May 5, 2011 at 12:11 PM, AJ wrote: > I see. Any clue where I can begin in my case (for filters etc.)? Thanks. > I disagree with the BDFLs on this, for me this pattern is very natural: {% for key in list_of_keys %} {{ some_dictionary[key] }} {{ some_other_dict_with_same_keys[key] }} {% en

Re: How to draw line charts in Django?

2011-05-05 Thread Xavier Ordoquy
Le 5 mai 2011 à 16:06, william ratcliff a écrit : > One other approach is that you can send the data to matplotlib (which is > python) and use that to create a .png which you then serve--it depends on > what your needs are. > > William Hi, matplotlib is incredibly hard to understand and doe

Runserver has connection limit?

2011-05-05 Thread Davepar
I keep running into problems with Google Chrome and runserver. It seems Chrome tries to open too many connections for all the media on the page and overwhelms runserver. Random images and CSS just don't load. The page loads fine in Safari (haven't tried other browsers). Any suggestions for limitin

Re: Runserver has connection limit?

2011-05-05 Thread Shawn Milochik
Try gunicorn. It's just as easy as runserver, and you just replace 'runserver' with 'gunicorn' in your manage.py command line. The only downside is that it doesn't auto-refresh by default when you change code. However, I'm pretty confident that the core developers have no time or interest in m

Re: Development server: cookies not working

2011-05-05 Thread Tom Evans
On Thu, May 5, 2011 at 2:02 PM, fsang wrote: > Hi, > > I am running my Django project on a remote host (with Apache) and on > my current machine (localhost, using "runserver"). Cookies and > sessions work fine when the project is served via Apache from the > remote host. But for some reasons all o

Re: Testing if a receiver is connected to a signal

2011-05-05 Thread Bernardo Fontes
Hello everybody, I resolved this problem by looking at Djangos Signal's code and understanding its structure. The signal has an attribute called receivers which has stored references to its receivers function that were connect to it. When the send function is called, the signal just call this func

How to send notification when reply to a comment?

2011-05-05 Thread LIU Liang
I want to send a notification and e-mail to the one who write the comment in a topic. But didn't know how to do. Could someone give me a hand? thanks a lot -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: How to draw line charts in Django?

2011-05-05 Thread Frank Becker
On 5/5/11 6:22 PM, Xavier Ordoquy wrote: > > Le 5 mai 2011 à 16:06, william ratcliff a écrit : Hi, >> One other approach is that you can send the data to matplotlib (which is >> python) and use that to create a .png which you then serve--it depends on >> what your needs are. [...] > matplotl

Re: How to draw line charts in Django?

2011-05-05 Thread Frank Becker
On 5/5/11 9:28 AM, Nge wrote: Hi, > I want to know. How can I create line charts in Django? > Then I have to take data from postgresql for x-axis and y-axis. Have a look at codespeed [0]. That's behind http://speed.pypy.org/ and http://speed.twistedmatrix.com/. It's using one of the Javascript g

Aggregation annotate question.

2011-05-05 Thread Satan Study Django
Hi. I've some question about aggregation annotate functions, like Max. I don't realy like the queries it makes. Let me explain. Models: class Person (models.Model): name = models.CharField (max_length = 100) login = models.CharField (max_length = 30) class Home (models.Model): person =

Re: Aggregation annotate question.

2011-05-05 Thread Cal Leeming [Simplicity Media Ltd]
Hmm, +1 on this. On Thu, May 5, 2011 at 6:26 PM, Satan Study Django < satan.come.and.kill.your.family.an...@gmail.com> wrote: > Hi. I've some question about aggregation annotate functions, like Max. > I don't realy like the queries it makes. Let me explain. > > Models: > class Person (models.Mode

Unable to login to django admin with ie8 on multi-level subdomain

2011-05-05 Thread v1nce
Domain is foo.bar.example.com I am able to successfully login the django admin site with ie7, FF, Chrome and Safari. I have tested setting SESSION_COOKIE_DOMAIN to the following: "foo.bar.example.com", ".bar.example.com", ".example.com", "example.com" -- You received this message because you are

selecting all columns from a table (advanced query)

2011-05-05 Thread Mo Mughrabi
Hi, I been trying to create a backward relation using queryset and the joining is working fine, accept that its not including the other joined table in the selected columns. Below is my models, queryset and query.__str__() print class Main(models.Model): slug = models.SlugField(

Re: How to send notification when reply to a comment?

2011-05-05 Thread Shawn Milochik
http://docs.djangoproject.com/en/1.3/topics/email/ -- 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+unsubscr...@google

Re: Error: No module named messages.

2011-05-05 Thread Jacob Scherffenberg
I found the problem, but stil doesn't really know what to do. But i was fairly sure that i used 1.3, which i did. But when i install the debug-toolbar with sudo apt-get install pyhton- djang-debug-toolbar. My django version changes to version 1.1.1 Where can i get the toolbar otherwise, and without

Admin page select boxes smashed

2011-05-05 Thread John
Hi there, I am working on a project to track servers, filesystems, and space allocations using django. I have been testing the project using eclipse on windows and the command line on a linux server, where it will ultimately reside. I am having a problem with the select boxes and textareas on the

Re: Error: No module named messages.

2011-05-05 Thread David Markey
A quick google yields: https://github.com/robhudson/django-debug-toolbar On 5 May 2011 19:51, Jacob Scherffenberg wrote: > I found the problem, but stil doesn't really know what to do. > But i was fairly sure that i used 1.3, which i did. > But when i install the debug-toolbar with sudo apt-ge

Re: Admin page select boxes smashed

2011-05-05 Thread Dave Sayer
Looks like your issue is cross browser CSS as opposed to a Django issue. Have you tried looking for css based solutions? What browsers are you using on each machine? On 5 May 2011 18:41, John wrote: > Hi there, I am working on a project to track servers, filesystems, and > space allocations using

Re: Error: No module named messages.

2011-05-05 Thread Jacob Scherffenberg
Okay i see now that the packages system install both python-django and python-django-debug-toolbar, when i ask for the debug-toolbar. And apparently the python-django version in the package systems is 1.1.1 which is the problem. but how do i get debug-toolbar without getting python-django(again) ?

Re: Error: No module named messages.

2011-05-05 Thread Jacob Scherffenberg
Cool, but what folder should i put, the content of that download into, found something similar. but im not quite sure which python folder is the right one? whereis python - gives me like 10 paths. On 5 Maj, 20:55, David Markey wrote: > A quick google yields: > > https://github.com/robhudson/djang

Re: Admin page select boxes smashed

2011-05-05 Thread John
I have tried chrome, firefox and ie on both versions. They all work perfectly on the windows instance and are smashed on the linux instance. I haven't tried changing the admin css files yet, they are the same on the linux and windows installs. I was hoping that something else could be mangling it b

Django password reset modification

2011-05-05 Thread Rich
Django framework comes with a reset password out of the box feature. I would like to modify this to where a password is sent to the user via e-mail. I looked at the code in django\contib\auth\views.py I'm not sure how I can modify it. Django Reset Password The Django framework comes with s

Re: Django password reset modification

2011-05-05 Thread Shawn Milochik
This is a bad idea for multiple reasons. Don't do it. -- 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+unsubscr...@goo

not able to use editable=True or false in forms.CharField()

2011-05-05 Thread GKR
not able to use editable=True or false in forms.CharField() getting error as TypeError at /items_entry/ __init__() got an unexpected keyword argument 'editable' Request Method: GET Request URL: http://localhost:8000/items_entry/ Django Version: 1.3 Exception Type: TypeError Exception Val

Question about ModelAdmin.formfield_for_foreignkey

2011-05-05 Thread Juan Pablo Romero Méndez
Hello, Is it possible to obtain a reference to the modified object in ModelAdmin.formfield_for_foreignkey? Thanks! Juan Pablo -- 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.co

Re: Testing if a receiver is connected to a signal

2011-05-05 Thread Vinicius Mendes
Boa. Funciona para resolver esse problema. Atenciosamente, Vinicius Mendes Engenheiro de Computação Globo.com On Thu, May 5, 2011 at 1:33 PM, Bernardo Fontes wrote: > Hello everybody, > > I resolved this problem by looking at Djangos Signal's code and > understanding its structure. The signal

Re: not able to use editable=True or false in forms.CharField()

2011-05-05 Thread Shawn Milochik
Unless you want guesses, we'll need to see the code causing the problem. Can you post your models.py (or wherever the 'editable' kwarg is)? Can you also confirm that removing the 'editable' kwarg gets rid of the error? That, along with the code, will help a lot. -- You received this message b

Re: not able to use editable=True or false in forms.CharField()

2011-05-05 Thread GKR
ya removing the editable kwarg gets rid of the error. -- 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+unsubscr...@go

Re: not able to use editable=True or false in forms.CharField()

2011-05-05 Thread Daniel Roseman
On Thursday, May 5, 2011 10:17:38 PM UTC+1, GKR wrote: > > not able to use editable=True or false in forms.CharField() > > getting error as > > TypeError at /items_entry/ > > __init__() got an unexpected keyword argument 'editable' > > Request Method: GET Request URL: http://localhost:8000/items

Re: Question about ModelAdmin.formfield_for_foreignkey

2011-05-05 Thread Daniel Roseman
On Thursday, May 5, 2011 10:32:47 PM UTC+1, juanpa wrote: > > Hello, > > Is it possible to obtain a reference to the modified object > in ModelAdmin.formfield_for_foreignkey? > > Thanks! > >Juan Pablo > What do you mean, modified? formfield_for_foreignkey is used for defining the form, long

Re: Runserver has connection limit?

2011-05-05 Thread Fabrizio Mancini
Il giorno 05/mag/2011, alle ore 18.26, Davepar ha scritto: > Any suggestions for limiting the Chrome connections or beefing up > runserver? I don't really want to run a real http server for > development. I like the auto-reload of runserver. If it's just for development you can look at this http:/

Re: Aggregation annotate question.

2011-05-05 Thread Russell Keith-Magee
On Fri, May 6, 2011 at 1:26 AM, Satan Study Django wrote: > Hi. I've some question about aggregation annotate functions, like Max. > I don't realy like the queries it makes. Let me explain. > > Models: > class Person (models.Model): >    name = models.CharField (max_length = 100) >    login = mode

Re: Question about ModelAdmin.formfield_for_foreignkey

2011-05-05 Thread Juan Pablo Romero Méndez
I think i solved it. This is the chain of method calls of admin.ModelAdmin: ... change_view get_form formfield_for_foreignkey ... get_form receives the current object as parameter, so all I had to do was to inject obj in the request: def get_form(self, request, obj=None, **kwargs):

Re: Do any financial firms use a Django framework?

2011-05-05 Thread Jason Beaudoin
On Tue, May 3, 2011 at 10:53 AM, rpt...@reportlab.com wrote: > Does anyone know of any financial firms which use a Django framework? Yep. I build advanced payment services for a prominent, offshore payment service provider, using django, python and nginx/uwsgi at the core. ~JB -- You received

Multiple text inputs into a string

2011-05-05 Thread Ben Walker
Hey! Goal: To create a question field where a user can come and create a mad-libs style question and then have others vote yes or no. (e.g. "Would you fool around with (text input)__ if _(text input)___ and _(text input)__ were not together?) I am using Google App Engine a

Email app is breaking long lines, any fix?

2011-05-05 Thread John Crawford
I'm using the filebased email backend for testing (although the console version had the same problem). When I send email, either via function or template, lines that are too long, are broken, with an '=' sign at the end. For instance: this is a test of a really long line that has more words th

Re: not able to use editable=True or false in forms.CharField()

2011-05-05 Thread GKR
what is the alternative to disable any form field -- 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+unsubscr...@googleg

Re: selecting all columns from a table (advanced query)

2011-05-05 Thread Andy McKay
> anyone can help show columns from list and listi18n? I tried extra but It > doesn't allow me to pass things like category_list.* You retrieve and populate data from one model in django, no more than that. Select related allows you to avoid lookups on objects related to the initial model. --

Re: Email app is breaking long lines, any fix?

2011-05-05 Thread Jason Culverhouse
On May 5, 2011, at 5:50 PM, John Crawford wrote: > I'm using the filebased email backend for testing (although the console > version had the same problem). When I send email, either via function or > template, lines that are too long, are broken, with an '=' sign at the end. > For instance: >

Re: Django password reset modification

2011-05-05 Thread Phui-Hock
On May 6, 4:22 am, Shawn Milochik wrote: > This is a bad idea for multiple reasons. Don't do it. Huh, care to explain, please? -- 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.