Three forms (one should be dynamic) with relationships on the same view. Not sure how to accomplish this issue.

2013-02-13 Thread Adrián Espinosa
Hello all, I have the following models (among others): class Project(models.Model): client = models.ForeignKey(User) notes = models.TextField() service = models.CharField(max_length=25) # more fields class Circuit(models.Model): pointA = models.CharField(max_length=20) poi

RE: Has the djangoproject.com site been down?

2013-02-13 Thread Babatunde Akinyanmi
Its not just you, at least when I'm not trying with my phone. ..and say your from Nigeria not Africa Sent from my Windows Phone -- From: tOlorun Sent: 2/12/2013 5:53 PM To: django-users@googlegroups.com Subject: Re: Has the djangoproject.com site been down? its ju

Re: Has the djangoproject.com site been down?

2013-02-13 Thread Sanjay Bhangar
for future reference, I find http://downforeveryoneorjustme.com/ to be quite useful for checking this sort of thing On Wed, Feb 13, 2013 at 5:12 PM, Babatunde Akinyanmi wrote: > Its not just you, at least when I'm not trying with my phone. > > ..and say your from Nigeria not Africa > > Sent f

django server ignores POST requests?

2013-02-13 Thread Michał Nowotka
This is really strange behaviour. When I issue POST request to many times django suddenly starts to ignore them all. I can see then in firebug but debug server shows nothing. Restarting server doesn't help. Even more, when I try to restart server when this happens I always get: Error: That por

Re: Questions about vim

2013-02-13 Thread Yussi
Thank you i am stealing lines from you right now, very nice setup you have. On 12/02/13 20:21, Antoni Aloy wrote: I have created my own collection of plugins for my django and Python work with vim: autocomplete, sysntax check, templates, etc. This is mine: http://code.google.com/p/trespams-vim/

Is Django is suitable fame work to develop a web application which uses HIVE

2013-02-13 Thread Shreedhar Naik
We are planning to use Django to develope a web application which query to HIVE and get the data. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+u

Django environment setup path problem

2013-02-13 Thread kulbhushan patariya
Hi, I have following problem regarding Django. Can anyone help me out - kbjp@kbjp-VGN-CS35GN-B:~/Desktop/kbproject/firstjango$ django-admin.py syncdb Traceback (most recent call last): File "/usr/local/bin/django-admin.

Re: Django 1.5 - release date

2013-02-13 Thread Martin B.
Hmm, the list of blockers seems to be empty. Seeing as its been a while since the last update here, any news on a rc/stable release? On Sunday, December 30, 2012 1:19:04 AM UTC, Russell Keith-Magee wrote: > > > On Sat, Dec 29, 2012 at 2:44 PM, Aidan Zhakypov > > > wrote: > >> Does anyone know w

Question from a very beginner: Include dynamic template

2013-02-13 Thread Olivier
Hi everybody, I'm beginner in Django, and I have a "little" problem. I would like to include a subtemplate in a for loop and passing some parameter. like this: {% for tasklist in object_list %} > > {{ > tasklist.title }} > {% block task_li

One-to-many relationships in submission forms

2013-02-13 Thread Skip Montanaro
Can anyone point me at a complete example of using inlineformset_factory? I'm fine with the example in the book, as far add it goes, but it doesn't show how to actually use it in a Form, and my naive attempt to use it so far has come up empty. Thx, Skip -- You received this message because y

Re: django server ignores POST requests?

2013-02-13 Thread Bill Freeman
If the original requests aren't completing then perhaps you are running up against some connection limit in your configuration? On Wed, Feb 13, 2013 at 7:29 AM, Michał Nowotka wrote: > This is really strange behaviour. When I issue POST request to many > times django suddenly starts to ignore th

One-to-many relationships in submission forms

2013-02-13 Thread Skip Montanaro
Refereeing to Sanjay's response to another poster's plea about recipes and ingredients helped me muddle through. I'm unclear on the form keyword arg referencing the base form. Using it gave me metaclass errors. Skip -- You received this message because you are subscribed to the Google Groups

Re: Django 1.5 AbstractBaseUser with char primary key not JSON serializable

2013-02-13 Thread Kaloian
Hi Russell, Thanks for the responce! I actually found the problem it was not where I was looking for it and it was more of a typo. And your suggestion No.2 appears to be right: > * Do you have any models with foreign keys to your custom user? (i.e., is > the problem manifesting when serialis

Re: Has the djangoproject.com site been down?

2013-02-13 Thread +Emmanuel
Thanks y'all. I'll try other options. On Tuesday, February 12, 2013 7:40:17 PM UTC+3, +Emmanuel wrote: > > Is it just me or is djangoproject.com not loading? Been trying to access > it for a couple of weeks without success. I've tried different browsers to > no avail. Am accessing it from Africa

Re: Django environment setup path problem

2013-02-13 Thread Bill Freeman
How are you invoking manage.py? Try cd'ing to the directory containing it before running it and see if that helps. (That directory will then automatically be on python's sys.path, which is needed. DJANGO_SETTINGS_MODULE must be a python style package.module style path, not a filesystem path, so d

Re: Django environment setup path problem

2013-02-13 Thread Yussi
I see what you're doing, (It did take me half an hour of staring at your email though) The steps are: $django-admin startproject myproj $cd myproj $vi myproj/settings.py than add your databases than run $./manage.py syncdb not django-admin syncdb On 13/02/13 13:54, Bill Freeman wrote: How are

Testing view's get_context_data(): why does MultipleObjectMixin.get_context_data() require "object_list" in kwargs?

2013-02-13 Thread benoit . bryon
Hi, While writing tests for views, I discovered the following code and wondered whether it is a feature or a potentially bad pattern... * BaseListView sets self.object_list: https://github.com/django/django/blob/ec469ade2b04b94bfeb59fb0fc7d9300470be615/django/views/generic/list.py#L137 * Then B

Is there an easy way to popup forms?

2013-02-13 Thread frocco
I have a form I want to popup and am having trouble getting this to work. This is not in the admin page. Can someone give me an example? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Re: Is there an easy way to popup forms?

2013-02-13 Thread Tom Evans
On Wed, Feb 13, 2013 at 4:12 PM, frocco wrote: > I have a form I want to popup and am having trouble getting this to work. > This is not in the admin page. > > Can someone give me an example? > > Thanks > An easy way to do a pop up form is to use a jqueryui dialog¹ http://api.jqueryui.com/dialog

Re: def __unicode__(self) in models.py is not working

2013-02-13 Thread David
It appears as though when using Python3.3 and Django 1.6dev you should use __str__ and not __unicode__. __unicode__ seems to be gone from Python3.3 On Tuesday, February 12, 2013 4:45:33 PM UTC-5, David wrote: > > I am working through the tutorial and find that the *def > __unicode__(self):* com

Hierarchical data in admin pages in Django

2013-02-13 Thread Almudena Vila Forcén
In a Django project, I have a hierarchical model using MPTT defined like this in models.py: class Structure(MPTTModel): name = models.CharField(max_length=200, unique=True) parent = TreeForeignKey('self', null=True, blank=True, related_name='children') [...] I'm using FeinCMS to s

Re: Django environment setup path problem

2013-02-13 Thread Bill Freeman
This is a version 1.4 Django. Yes? Try adding to manage.py, between the "if ..." line and the "os.environ..." lines, and indented like the "os.environ..." line: import pdb;pdb.set_trace() Then run: $ ./manage.py shell When it stops at the breakpoint, type: p os.environ['DJANGO_SETTI

Django FormWizards: How to painlessly pass user-entered data between forms?

2013-02-13 Thread Saqib Ali
Crossposting from here: http://stackoverflow.com/questions/14860392/django-formwizards-how-to-painlessly-pass-user-entered-data-between-forms I'm using the FormWizard functionality in Django 1.4.3. I have successfully created a 4-step form. In the first 3 steps of the form it correctly takes

Object composition in django

2013-02-13 Thread Ray Hatfield
Hi, I have a model which requires two addresses: a mailing address and a physical address. From an OO perspective it makes sense to have an Address class and the Producer to have Address instances as properties, but I can't seem to achieve this in django while still being able to edit the addre

Re: Is there an easy way to popup forms?

2013-02-13 Thread frocco
Thanks Tom, Do you know how I would have a form display using this? On Wednesday, February 13, 2013 11:41:59 AM UTC-5, Tom Evans wrote: > > On Wed, Feb 13, 2013 at 4:12 PM, frocco > > wrote: > > I have a form I want to popup and am having trouble getting this to > work. > > This is not in th

Re: Is there an easy way to popup forms?

2013-02-13 Thread jirka . vejrazka
Probably the easiest way is to use a JS/CSS framework that has a good support for popups and forms. There are a lot out there. I have personal experience with Bootstrap (one of the most popular these days) - check its documentation (look for both "popup" and "modal"), also search for available b

Re: Object composition in django

2013-02-13 Thread Bill Freeman
You might try specifying distinct related names, just off the cuff. -Bill On Wed, Feb 13, 2013 at 2:25 PM, Ray Hatfield wrote: > Hi, > > I have a model which requires two addresses: a mailing address and a > physical address. From an OO perspective it makes sense to have an Address > class and t

Re: Object composition in django

2013-02-13 Thread Adam Mesha
Inlines are for related objects, meaning when I have a foreign key from A to B, on A there is an actual database field that points to B, but on B there's a virtual (related object) field implemented as a python method. When you have a foreign key, the way the admin shows that is just to give you a

Re: Question from a very beginner: Include dynamic template

2013-02-13 Thread Daniel Roseman
On Wednesday, 13 February 2013 03:52:20 UTC-8, Olivier wrote: > But before including template ( tasklist-one.html ) I would like to call a > function which take the tasklist_id and look for the task which compose > the tasklist. > Why? You don't show your models, which would have been useful,

Re: Object composition in django

2013-02-13 Thread Ray Hatfield
I've considered the address-type-and-foreign-key approach you describe — and implemented it and then backed it out again — but that approach bugs me at a philosophical level. Address is then bound explicitly to Producer and instead of having two addresses each with a specific designation I can h

Re: Django 1.5 - release date

2013-02-13 Thread Russell Keith-Magee
Hi Martin, We posted an update to the blog a couple of weeks ago [1]; we should be in a position to release the second RC in the very near future. [1] https://www.djangoproject.com/weblog/2013/jan/24/delay-final-release-django-15/ I'm sorry I can't give any more concrete answer than that -- beca

Re: Django 1.5 AbstractBaseUser with char primary key not JSON serializable

2013-02-13 Thread Russell Keith-Magee
On Wed, Feb 13, 2013 at 9:51 PM, Kaloian wrote: > > Hi Russell, > > > Thanks for the responce! I actually found the problem it was not where I > was looking for it and it was more of a typo. > And your suggestion No.2 appears to be right: > > * Do you have any models with foreign keys to your cus

Re: django generate pdf with tables and charts

2013-02-13 Thread Peter of the Norse
Django doesn’t run Javascript, that’s done in the browser. If you really want to have JS processing you’ll have to open a web browser and then print to PDF. On Feb 10, 2013, at 9:10 AM, Jaimin Patel wrote: > I am trying to generate pdf using django template, also need some support of > javascri

Re: django generate pdf with tables and charts

2013-02-13 Thread Waitman Gobble
On Feb 10, 2013 8:11 AM, "Jaimin Patel" wrote: > > I am trying to generate pdf using django template, also need some support of javascript code. I have tried PISA, ReportLib and wkhtmltopdf but it seems that it doesn't wait for Javascript. > > Can someone suggest good solution or example? > > -- >

Re: django generate pdf with tables and charts

2013-02-13 Thread Ovnicraft
On Sun, Feb 10, 2013 at 11:10 AM, Jaimin Patel wrote: > I am trying to generate pdf using django template, also need some support > of javascript code. I have tried PISA, ReportLib and wkhtmltopdf but it > seems that it doesn't wait for Javascript. Hello, can you explain us better what you mean

Re: Object composition in django

2013-02-13 Thread Jani Tiainen
Hi, You're trying to setup one-to-one relationship. It means that producer.mailing_address does have exactly one unique Address entity. Same goes for physical_address. What you want is really ForeignKey to address which means that you reuse addresses to multiple producer.mailing_address. T