Re: how to semi-automate a choice in contrib.admin

2012-11-01 Thread Mike Dewhirst
On 2/11/2012 3:09pm, Mike Dewhirst wrote: If a user leaves a compulsory (blank=False) field empty in the Admin app I want to check the value of a different field and depending on that value either ... do nothing and let the system complain it needs data or fill in some appropriate data so it

how to semi-automate a choice in contrib.admin

2012-11-01 Thread Mike Dewhirst
If a user leaves a compulsory (blank=False) field empty in the Admin app I want to check the value of a different field and depending on that value either ... do nothing and let the system complain it needs data or fill in some appropriate data so it is no longer empty I have tried doing

Re: no Polls in the admin page

2012-11-01 Thread Sandeep kaur
On Fri, Nov 2, 2012 at 12:29 AM, Mihail Mihalache wrote: > I have followed the django tutorial up to part 2 - > https://docs.djangoproject.com/en/1.4/intro/tutorial02/ . > Everything worked fine, until I couldn't see the Polls entry on the admin > page. I have checked

Re: Problem with formset

2012-11-01 Thread Sandeep kaur
On Fri, Nov 2, 2012 at 1:41 AM, Lachlan Musicman wrote: > > I think you are saying you don't understand my response? I'm asking if the > problem is fixed by replacing formset.save() - with cd.save(), since you > have cd = formset.cleaned_data but no other instances of cd,

Re: Help me choose OS for django server

2012-11-01 Thread Nikolas Stevenson-Molnar
Whatever gives you separate physical resources. The idea is to prevent your app and static content delivery from interfering (i.e., consuming CPU, memory, bandwidth) with each other. The cheapest and most effective way to accomplish this is using a CDN or something like Amazon's S3. For

Re: Easy way to make all form fields read only?

2012-11-01 Thread Matt Woodward
On Thursday, November 1, 2012 4:33:47 AM UTC-7, Amyth wrote: > I would suggest you adding Boolean field to your UserProfile model like > is_authorized = models.BooleanField(default=False) Cool -- thanks for the suggestion. As I've said I'm new to the Django world but this community rocks! :-)

Re: Easy way to make all form fields read only?

2012-11-01 Thread Matt Woodward
On Wednesday, October 31, 2012 8:40:10 PM UTC-7, elena wrote: > I was also going to suggest using crispy forms -- having used it on a > recent project I'd strongly recommend it (it's great when it's plugged in > to existing stylings such as: uni-form or bootstrap). > > I've used it with

Re: Problem with formset

2012-11-01 Thread Lachlan Musicman
On Thu, Nov 1, 2012 at 6:32 PM, Satinderpal Singh < satinder.goray...@gmail.com> wrote: > On Thu, Nov 1, 2012 at 1:25 AM, Lachlan Musicman wrote: > >> On Thu, Nov 1, 2012 at 7:30 AM, Satinderpal Singh >> wrote: >> > I use formset in my views.py

Re: Error: One or more models did not validate:

2012-11-01 Thread Hendrikus Godvliet
This post is solved: https://groups.google.com/forum/?fromgroups=#!topic/django-users/u8joQF36BvE Hendrikus Godvliet Op donderdag 1 november 2012 12:44:29 UTC+2 schreef Hendrikus Godvliet het volgende: > > Hello Everone > > I am new to Django: > > I am in the Django tutorials_01 and now in

Re: Error: One or more models did not validate: admin.logentry: 'user' has a relation with model , which has either not been installed or is abstract.

2012-11-01 Thread Hendrikus Godvliet
Tom thank you for helping me on my way in to Django! I uncomment: INSTALLED_APPS = ( 'django.contrib.auth', and with $ python manage.py syncdb I still get the eror: Error: One or more models did not validate: admin.logentry: 'user' has a relation with model , which has either not

Re: Using RequireJS with Django

2012-11-01 Thread David Hall
I realise that this is an old topic, but I hope this is useful to other people looking to use RequireJS with Django. You should take a look at django-require, which takes care of integrating the r.js optimizer with Django. I've just pushed up the 1.0.0 release.

Re: unable to save ModelForm with primary key change

2012-11-01 Thread msoulier
On Nov 1, 1:27 pm, Tom Evans wrote: > >> Please show the definition of MyForm. > > Please do show it. Sorry, the model was in the previous email, here's the form. class McdLoadForm(forms.ModelForm): VERSIONPAT = re.compile(r'^(\d+\.){3}\d+$') class Meta:

Re: Help me choose OS for django server

2012-11-01 Thread Chris Pagnutti
So by "another server entirely" you mean to actually subscribe to another hosting service (or a second account on my current service)? I'm sure it's in the docs if I look, but how would I deal with media uploads that way? On Tuesday, October 30, 2012 3:50:30 PM UTC-4, Chris Pagnutti wrote: > >

no Polls in the admin page

2012-11-01 Thread Mihail Mihalache
I have followed the django tutorial up to part 2 - https://docs.djangoproject.com/en/1.4/intro/tutorial02/ . Everything worked fine, until I couldn't see the Polls entry on the admin page. I have checked that I have done everything mentioned in the tutorial. I get no error whatsoever. I have no

Re: Extend Django UserProfile

2012-11-01 Thread Zoltán Bege
Thank you for your suggestion! I already done that, the problem is resolved for the moment using "through" for m2m model. On Thursday, November 1, 2012 2:40:37 PM UTC+2, Nicolas Emiliani wrote: > > > > On Thu, Nov 1, 2012 at 6:29 AM, Zoltán Bege > wrote: > >> I created an

Occasional IntegrityError on m2m fields using PostgreSQL

2012-11-01 Thread Bernardo
Hello guys, I can't detect any pattern, maybe 1 in each 1000 thousands edit of a certain model returns an IntegrityError on a m2m field. Most of the times this field wasn't even modified. When a model is saved I believe django always wipes the m2m field and then readds the items, right? I saw

Re: Help me choose OS for django server

2012-11-01 Thread Nikolas Stevenson-Molnar
Apache+mod_wsgi is one solution (the docs also mention several others). Their main point is that you shouldn't serve static content via Django. Ideally, you'd serve static content from another server entirely or via a CDN. If you are serving files + app on the same server, I think it's fine to use

Re: unable to save ModelForm with primary key change

2012-11-01 Thread Tom Evans
On Thu, Nov 1, 2012 at 5:15 PM, Michael P. Soulier wrote: > On 01/11/12 Tom Evans said: > >> Please show the definition of MyForm. Please do show it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: unable to save ModelForm with primary key change

2012-11-01 Thread Michael P. Soulier
On 01/11/12 Tom Evans said: > Please show the definition of MyForm. I assume you are certain that > the form is valid, ie you have put breakpoints there (or print > statements) and form.is_valid() is definitely returning true. I used MyForm as an example, the actual class is class

Re: unable to save ModelForm with primary key change

2012-11-01 Thread Tom Evans
On Thu, Nov 1, 2012 at 3:33 PM, msoulier wrote: > Hi, > > I'm trying to modify a model instance, specifically the field which is > the model's primary key. When I save, nothing seems to happen. > Everything in cleaned_data is good, but the model is not updated. No >

Re: Extend Django UserProfile

2012-11-01 Thread Nicolas Emiliani
On Thu, Nov 1, 2012 at 11:42 AM, Zoltán Bege wrote: > > > On Thursday, November 1, 2012 11:29:38 AM UTC+2, Zoltán Bege wrote: >> >> I created an accounts app in my project, I 'd like to extend users to be >> able to work with one or more partners. I need to define one or

unable to save ModelForm with primary key change

2012-11-01 Thread msoulier
Hi, I'm trying to modify a model instance, specifically the field which is the model's primary key. When I save, nothing seems to happen. Everything in cleaned_data is good, but the model is not updated. No exception is thrown, the field isn't updated, nothing. All I'm doing is form =

Re: Extend Django UserProfile

2012-11-01 Thread Zoltán Bege
On Thursday, November 1, 2012 11:29:38 AM UTC+2, Zoltán Bege wrote: > > I created an accounts app in my project, I 'd like to extend users to be > able to work with one or more partners. I need to define one or more admin > user for every partner. > > This is my accounts/models.py. In this

Store a list from a view in template language into a javascript array

2012-11-01 Thread Coulson Thabo Kgathi
Hi guys how can i Store a list from a view in template language into a javascript array this is how i pass the list from the django view (The List that i am trying to store in javascript is the household_list) views.py def plot_ward_points(request): """Plot points of a

Re: Error: One or more models did not validate: admin.logentry: 'user' has a relation with model , which has either not been installed or is abstract.

2012-11-01 Thread Tom Evans
On Thu, Nov 1, 2012 at 8:02 AM, Hendrikus Godvliet wrote: > Hello every one > > I am new to Django - I am on Google Python App engine and try to work with > Django to understand more about how Google App engine works. > For that i follow the tutorial on >

Re: Extend Django UserProfile

2012-11-01 Thread Nicolas Emiliani
On Thu, Nov 1, 2012 at 6:29 AM, Zoltán Bege wrote: > I created an accounts app in my project, I 'd like to extend users to be > able to work with one or more partners. I need to define one or more admin > user for every partner. > > This is my accounts/models.py. In this

Extend Django UserProfile

2012-11-01 Thread Zoltán Bege
I created an accounts app in my project, I 'd like to extend users to be able to work with one or more partners. I need to define one or more admin user for every partner. This is my accounts/models.py. In this case is_admin is set globally for all partners, how do I have to set is_admin

Error: One or more models did not validate: admin.logentry: 'user' has a relation with model , which has either not been installed or is abstract.

2012-11-01 Thread Hendrikus Godvliet
Hello every one I am new to Django - I am on Google Python App engine and try to work with Django to understand more about how Google App engine works. For that i follow the tutorial on https://docs.djangoproject.com/en/1.4/intro/tutorial01/ I finist tutorial 01 and started with tutorial

Error: One or more models did not validate:

2012-11-01 Thread Hendrikus Godvliet
Hello Everone I am new to Django: I am in the Django tutorials_01 and now in tutorial 02 in the admin part: when i update the database with: # python manage.py syncdb There is this message: Error: One or more models did not validate: admin.logentry: 'user' has a relation with model , which

Re: Easy way to make all form fields read only?

2012-11-01 Thread Amyth Arora
I would suggest you adding Boolean field to your UserProfile model like is_authorized = models.BooleanField(default=False) and then in the templates do something like: {% if user.is_authorized %} {% else %} On Thu, Nov 1, 2012 at 9:09 AM, Elena Williams wrote: > I

From Django using auth_mixin to 1.5 alpha 1 user model

2012-11-01 Thread Thiago Carvalho D' Ávila
Hello, I am trying to change my app from using auth_mixin (from git) to the new configurable user model. I've seen no tutorials of how to do that and moved to auth_mixin long time ago. Does anyone did that and remember the steps? Any hints? Tks -- You received this message because you are