FieldError in model form with "GenericRelation" field

2011-12-07 Thread eprikazc
Hi everyone, What is the correct way of working with generic.GenericRelation in forms? I suspect that I am missing something in django docs. Say I have modelForm class ArticleForm(forms.ModelForm): class Meta: model = Article fields = ["title", "body", "attachments"] where

Re: URL Issue - Slugged Url with Custom IDs

2011-12-07 Thread mattym
I found an article that described how theonion.com did something similar. Their url is the slug and an ID separated by a comma. The article said pulling by ID gives a performance gain. But they wanted to keep the seo friendly url as well.

Re: slow function

2011-12-07 Thread kenneth gonsalves
On Wed, 2011-12-07 at 05:48 -0800, Derek wrote: > > I make similar names - although frankly I do not know where I got > the > > impression from and whether it is correct or not. > > Yes, I would agree with that. So code like: > > scrs = Score.objects.all() > > could then be written as: > >

Python2.7.2 with MySQL documentation conflict

2011-12-07 Thread sturdyworks
The same MySQL-python file (MySQL-python-1.2.3.tar.gz) is available from both PyPI and the projects SourceForge site, BUT... sourceforge.net/projects/mysql-python says "Python versions 2.3-2.6 are supported" and pypi.python.org/pypi/MySQL-python says "Python-2.3 through 2.7 are currently

Re: Django E-Commerce Framework

2011-12-07 Thread Martin Tiršel
On Tue, 06 Dec 2011 22:45:05 +0100, Stuart Laughlin wrote: I have firsthand experience implementing satchmo for a very large storefront, and I can heartily recommend it. People who recommend writing your own ecommerce platform have an overly romanticized perspective.

Re: Django E-Commerce Framework

2011-12-07 Thread mattym
If the shop does not need to be majorly customized I also recommend Satchmo. If it is going to be a large store you might have to research implementing Custom Products with Satchmo. And do a little work making Custom Products as friendly to administrate and track in the store admin as

Re: custom attributes of model field

2011-12-07 Thread trubliphone
Thanks very much for this. This looks very promising. And I know that it may seem inappropriate to mix presentation logic with application logic, but I plan on doing other things on the model based on these field types. So your second example should fit well. On Dec 7, 1:22 am, Doug Ballance

Re: Query with no-correspondence results

2011-12-07 Thread Ian Clelland
On Wed, Dec 7, 2011 at 7:54 AM, wgis wrote: > First, thank you both for your answers. I'm now realizing that doing > this with the ORM is not so easy as I thought it would be to others > django fellows (it's my first django project, but I'm nailing it =P). > I saw your RAW

URL Issue - Slugged Url with Custom IDs

2011-12-07 Thread mattym
Hi all - Question. I would love to use a slug in the usual way for nice urls: #urls.py urlpatterns = patterns('app.views', (r'^(?P.*)/foo/$', 'viewfunction'), ) #views.py def viewfunction(request, myslug): themodel = get_object_or_404(MyModel, slug=myslug) However, due to requirements

custom view in admin

2011-12-07 Thread TeenSpirit83
i'm customizing the django admin with custom views for a model i need to create a custom view which is a little different frome the default changelist we all know clicking on the records in the default changelist just to open the object detail page , the django admin calls an url like this

Re: Query with no-correspondence results

2011-12-07 Thread Tom Evans
On Wed, Dec 7, 2011 at 5:09 PM, Tom Evans wrote: > Isn't this the secret sauce he is looking for? > Of course, I forget that the OP also wants to filter by a specific user: >>> qs = VoteContext.objects.filter((Q(vote__thing=carrot) | >>> Q(vote__isnull=True)) &

Re: Query with no-correspondence results

2011-12-07 Thread Tom Evans
On Tue, Dec 6, 2011 at 9:35 PM, Reinout van Rees wrote: > On 06-12-11 21:11, wgis wrote: >> >> I get >> (Carrots, Flavor,2.0) >> >> I want to list all the contexts in the "Carrot template", withou >> having to search and merge the ones missing. >> So if the result was >> >>

Re: Query with no-correspondence results

2011-12-07 Thread wgis
First, thank you both for your answers. I'm now realizing that doing this with the ORM is not so easy as I thought it would be to others django fellows (it's my first django project, but I'm nailing it =P). I saw your RAW SQL solution and it looked genius-simple. I have short experience with the

Re: Django E-Commerce Framework

2011-12-07 Thread bobhaugen
I'm guessing that the OP wanted to develop a "standard" e-commerce site for a single company, in which case I agree with Stuart and Andre that the way to go is a well-tested e-commerce framework. I had to roll my own because I was doing something very different: B2B e-commerce with an efficient

Re: urlresolver and custom Site model?

2011-12-07 Thread Andres Reyes
Also you can use FORCE_SCRIPT_NAMEin your settings 2011/12/7 Daniel Roseman > On Wednesday, 7 December 2011 12:49:47 UTC, aleksandra...@googlemail.comwrote: >> >> Hello everyone >> >> Becuase I do not

Re: urlresolver and custom Site model?

2011-12-07 Thread Daniel Roseman
On Wednesday, 7 December 2011 12:49:47 UTC, aleksandra...@googlemail.com wrote: > > Hello everyone > > Becuase I do not use django database at all my application currently > can't be deployed to a custom location different from "/" quite > simply. I use {% url ... %} template tags within

Re: Django E-Commerce Framework

2011-12-07 Thread CrabbyPete
There are lots of good payment packages you can use. I'm using this one https://bitbucket.org/adroll/authorize/wiki/Home for CIM services with Authorize.Net, but there are lots of good packages you can use and its really very easy to implement them. Satchmo is great, but if you really want to

Re: slow function

2011-12-07 Thread Derek
On Dec 6, 12:34 pm, kenneth gonsalves wrote: > On Tue, 2011-12-06 at 02:15 -0800, Derek wrote: > > Another side comment would be a suggestion to avoid "old skl vrbl nms" > > - in other words, use "player" for "ply", "month" for "mnth", "scores" > > for "scrs", "form" for

Re: Django E-Commerce Framework

2011-12-07 Thread Andre Terra
On Tue, Dec 6, 2011 at 7:45 PM, Stuart Laughlin wrote: > In my opinion ecommerce is not where you want to make > your own mistakes and go by trial and error. Better to benefit from > the experience, mistakes, and corrections of others when it comes to > ecommerce. Leave the

Re: pip installs the wrong version of django-registration

2011-12-07 Thread Andre Terra
Hello, Kenneth *I am posting this here as the app in question has not got the issue > tracker available. On doing pip install registration, a version without > the registration.default.backends.**urls is installed. Can this be > corrected?* > Only if the author updates the package in pypi[1],

urlresolver and custom Site model?

2011-12-07 Thread aleksandra.tarkow...@googlemail.com
Hello everyone Becuase I do not use django database at all my application currently can't be deployed to a custom location different from "/" quite simply. I use {% url ... %} template tags within templates and django.core.urlresolvers.reverse to populate urls. The problem is that if I deploy

Need help for using easy_thumbnails

2011-12-07 Thread Nibil M.S
I am using Django Development trunk version on Fedora 15. I tried to enable the thumbnails option on my project followed by the instructions given in https://github.com/SmileyChris/easy-thumbnails . But the thumbnail is not working. Only the image is loading. Please help to fix the problem.

Need help for using easy_thumbnails

2011-12-07 Thread Nibil M.S
I am using Django Development trunk version on Fedora 15. I tried to enable the thumbnails option on my project followed by the instructions given in https://github.com/SmileyChris/easy-thumbnails . But the thumbnail is not working. Only the image is loading. Please help to fix the problem.

Django and Windows Forms application data exchange?

2011-12-07 Thread Eugene Goldberg
Hello! Could you please give me a piece of advice? I've got two applications: Web-application on Django and Windows Forms application on C#. The task is to organise communication between this two applications. C# application need to get some data from server and post data to server (server is

pip installs the wrong version of django-registration

2011-12-07 Thread kenneth gonsalves
hi I am posting this here as the app in question has not got the issue tracker available. On doing pip install registration, a version without the registration.default.backends.urls is installed. Can this be corrected? -- regards Kenneth Gonsalves -- You received this message because you are

Re: Django E-Commerce Framework

2011-12-07 Thread Kai
Hi, On 2011-12-06 05:40:04 +, Md,Mehedi Hasan Kabir(Tanim) said: Can anyone give me some suggestion/link for Django E-Commerce Framework? You might want to look into LFS: http://www.getlfs.com. If you need help you are welcome to join us on IRC:

Re: Django E-Commerce Framework

2011-12-07 Thread Kai
On 2011-12-06 21:45:05 +, Stuart Laughlin said: People who recommend writing your own ecommerce platform have an overly romanticized perspective. In my opinion ecommerce is not where you want to make your own mistakes and go by trial and error. Better to benefit from the experience,

documentation patch questions

2011-12-07 Thread Annie
Hi all - I have some questions before I submit a ticket with a patch to change a few things in the docs/topics/testing.txt file. One change is a typo fix, and another is a possible change I have a question about. Since they're both relatively minor changes to the same file (no major rewrites

Re: custom attributes of model field

2011-12-07 Thread Doug Ballance
Just to clarify that last bit about a mapping on the model since it's closest to what you originally described. Just pseudo-code, but you can see the idea. class Model1(models.Model): FIELD_DISPLAY={ 'foo': ['a'], 'bar': ['b','c'] } a = models.CharField() b =

Re: custom attributes of model field

2011-12-07 Thread Doug Ballance
I may not be clear on what you are trying to accomplish, but maybe something like class Form1(forms.ModelForm): class Meta: model=Model def type_one_fields(self): return [self.fields['a']] # Or use whatever criteria you want for type_one fields. def