Staticfiles on shared hosting using FCGI

2012-01-13 Thread Tundebabzy
I am stuck after running collectstatic. I don't know how to point the server to STATIC_ROOT. Can someone give assistance. -- 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

Re: Help me with django Form

2012-01-13 Thread Python_Junkie
I believe you are mixing methods. Django has built in generic views and generic forms for example. But, you have used a template with standard (html) from syntax. Since you are doing a post, request. In your view just assign a variable to each variable in the form that you are pulling back and

Re: Help me with django Form

2012-01-13 Thread coded kid
Thanks guys! @daniel I still don't get what django doc is trying to say about ModelForm. Can you please explain further? On Jan 12, 10:30 am, Daniel Roseman wrote: > On Thursday, 12 January 2012 01:49:40 UTC, coded kid wrote: > > > Hi guys, I’ve been trying to signup using

accessing template context from inside a custom filter

2012-01-13 Thread Vovk Donets
Hello, I want to make a filter with access to template context, like simple_tag with takes_context=True Is there a way do that? -- *Vovk Donets* -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: admin list_filter: limit choices to model values?

2012-01-13 Thread Micky Hulse
Maybe simpler: Is there an easy way to limit the list_filter to folks with "Superuser status"? -- 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,

admin list_filter: limit choices to model values?

2012-01-13 Thread Micky Hulse
Hi. Not sure where to start... Just hoping someone can give me a kick in the right direction. I have built a flat page app that allows for an author FK (optional field). When I setup the admin to allow author as a list_filter, the actual filter list of authors is way to long to be useful.

Re: Class-Based Generic Views (CreateView) - field exclusions and defaults

2012-01-13 Thread Juergen Schackmann
you made my day, working exactly like expected. :-) thanks a lot -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/RUSugDsY9K0J. To post to this group, send

Re: Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2?

2012-01-13 Thread Javier Guerra Giraldez
On Fri, Jan 13, 2012 at 4:03 PM, Stuart Laughlin wrote: > I don't construe that as Disqus officially preferring apache, but you > are certainly entitled to your own interpretation. right. their commentary at the PyCon (from memory, i haven't checked the video) was

Re: Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2?

2012-01-13 Thread Stuart Laughlin
On Fri, Jan 13, 2012 at 12:37 PM, Javier Guerra Giraldez wrote: > On Fri, Jan 13, 2012 at 1:03 PM, Stuart Laughlin > wrote: >> Just wanted to clarify that there are in fact some instructions out there >> for options other than apache/mod_wsgi, even

Re: Primary key for read-only models

2012-01-13 Thread Simone Federici
Try this: https://github.com/simone/django-compositekey/wiki and send me feedback :-) On Thu, Jan 12, 2012 at 16:03, Demetrio Girardi wrote: > I need to read data from an "external" database table from my django > project. I am not interested in modifying the data,

Re: Need to examine and act on old vs. new at .save() time

2012-01-13 Thread Jeff
Remarkably, I've just today tripped over this same exact problem again. Turns out even using a post_save signal callback function does not provide the information about the new M2M data. # callback for post_save signal, debug code removed for brevity def ldap_netgroup_save(sender, **kwargs):

Re: Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2?

2012-01-13 Thread Javier Guerra Giraldez
On Fri, Jan 13, 2012 at 1:03 PM, Stuart Laughlin wrote: > Just wanted to clarify that there are in fact some instructions out there > for options other than apache/mod_wsgi, even though mod_wsgi remains the > official preferred option ("If you’re new to deploying Django

Re: Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2?

2012-01-13 Thread Stuart Laughlin
Having now looked more closely at the official deployment docs, I see they have been updated at some point to mention gunicorn and uwsgi, as well as nginx, cherokee, and lighttpd. So that's good. However, I also see that the deployment docs are a bit of a mess and could really use some love and

Re: Web Servers for Django Projects [WAS: Does anyone know any blogs...]

2012-01-13 Thread Stuart Laughlin
Tom, it seems to me that you and I are basically in agreement. What you are saying (correct me if I'm wrong) is that apache performs great and is a perfectly good option for django -- so long as you don't rely on stock versions and configurations. What I am proposing is that most django devs

Re: Web Servers for Django Projects [WAS: Does anyone know any blogs...]

2012-01-13 Thread Tom Evans
On Fri, Jan 13, 2012 at 3:18 PM, Stuart Laughlin wrote: > I hope you are not lumping me in with the relentless grudge-bearing > apache attackers. (After all, I've already been accused of ad hominem > attacks and some sort of fanboy me-too'ism on this thread [seriously >

Re: Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2?

2012-01-13 Thread Andre Terra
nginx runs on windows xp, and should run on vista/7 too. I've even managed to compile a version on cygwin with an additionally patched module that allows for file upload progress tracking. If anyone wants it, i can put it on github with a sample .conf file, but no strings attached at all.

Re: Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2?

2012-01-13 Thread Stuart Laughlin
On Jan 12, 9:16 pm, Andres Reyes wrote: > You mean that the webserver that Django itself recommends in > https://docs.djangoproject.com/en/dev/howto/deployment/is not a good > choice? > When that documentation was written, apache/mod_wsgi was likely the best, easiest, and

Web Servers for Django Projects [WAS: Does anyone know any blogs...]

2012-01-13 Thread Stuart Laughlin
On Jan 13, 5:01 am, Tom Evans wrote: > On Thu, Jan 12, 2012 at 11:32 PM, Stuart Laughlin > wrote: > > I don't care a whit about what "the cool boys" are doing. What I care about > > is a production deployment that works efficiently and reliably

Re: restricting choices of foreign key to objects owned by user

2012-01-13 Thread Kevin
You will need to alter the methods for the AdminModel: https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.queryset Your main focus will be the queryset method to limit what users can see, this should also limit drop down boxes as well. You may also want to

Re: How to avoid "no such column" error when I add a new property to a model?

2012-01-13 Thread David Harks
On Jan 11, 2012, at 4:26 AM, callum wrote: > I created an "Article" model with a few simple properties. I ran > syncdb, and set up the Django admin site, and added > "admin.site.register(Article)" in admin.py. Using the Django admin > site, I created an article by filling

Re: Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2?

2012-01-13 Thread Tom Evans
On Thu, Jan 12, 2012 at 11:32 PM, Stuart Laughlin wrote: > I don't care a whit about what "the cool boys" are doing. What I care about > is a production deployment that works efficiently and reliably and that is > diagnosable when something doesn't work. Apache fails those

Re: change min_length in form __init__?

2012-01-13 Thread Alasdair Nicol
On 13/01/12 10:47, bruno desthuilliers wrote: On Jan 11, 12:15 pm, galgal wrote: Is there any way, to change the field's *min_length* argument inside form constructor? That doesn't work: def __init__(self, *args, **kwargs): super(CreateTeamForm,

Re: change min_length in form __init__?

2012-01-13 Thread bruno desthuilliers
On Jan 11, 12:15 pm, galgal wrote: > Is there any way, to change the field's *min_length* argument inside form > constructor? That doesn't work: > > def __init__(self, *args, **kwargs): >     super(CreateTeamForm, self).__init__(*args, **kwargs) >    

Re: change min_length in form __init__?

2012-01-13 Thread bruno desthuilliers
On Jan 13, 7:02 am, Wen 温业逵Yekui wrote: > why you use the "*" in your function argument? > Because it's the sensible thing to do here - cf http://docs.python.org/release/2.6.7/tutorial/controlflow.html#more-on-defining-functions -- You received this message because you are

Re: A demo of django-inlinetrans and django-inplaceedit

2012-01-13 Thread J . Pablo Martín Cobos
2012/1/12 Juergen Schackmann > > >> >> >>> 2. If I do not want to send field by field, but possibly a set of fields >>> back to the to the server, like the row of a table. Would that be feasible? >>> >> >> Now this is not implemented, and I think it is not

Web application in high demand

2012-01-13 Thread Kevin
I am getting ready to put together a Django web application portfolio, but first I am doing some research on which apps I will build for the portfolio itself to show off to possible employers. Is there an online resource which lists the top requests web applications? I did a google search and

list_filter not showing up in admin

2012-01-13 Thread The Ape
Hi everyone, I am quite new to delevoping with django and I am trying to setup a simple blog app. I wanted to use a "list_filter" in the admin but it is somehow not showing up at all... I am using django 1.3 and python 2.7.1. (The models are listed below...) Does anyone have a suggestion how to

Re: Internationalization and localization

2012-01-13 Thread Daniel Gerzo
On Tue, 6 Dec 2011 16:40:42 -0800 (PST), rentgeeen wrote: But what I want to achieve is if I give somebody link: it/sample/ en/sample/ it will show that page in that language, now I have to choose language and then go to the page and see it in that language... you need django 1.4 and