Re: How do you remove fields from a subclassed form?

2009-08-30 Thread buttman
class MyForm(ModelForm): field1 = CustomField(custom_option="sdsdsd") field2 = CustomField(custom_option="sdsdsd") field3 = CustomField(custom_option="sdsdsd") # class Meta: model = MyModel exclude = ('some_field') class AnotherForm(MyForm): field1 =

Re: How do you remove fields from a subclassed form?

2009-08-30 Thread buttman
On Aug 31, 12:08 am, nbv4 wrote: > class MyForm(ModelForm): >     field1 = CustomField(custom_option="sdsdsd") >     field2 = # ... >     # > >     class Meta: > > class AnotherForm(MyForm): sorry, I accidently pressed tab + space which prematurely submitted the

How do you remove fields from a subclassed form?

2009-08-30 Thread nbv4
class MyForm(ModelForm): field1 = CustomField(custom_option="sdsdsd") field2 = # ... # class Meta: class AnotherForm(MyForm): --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Blocks tags inside inclusion template tags are ignored

2009-08-30 Thread ips006
Is it possible to have block tags inside inclusion template tags overwrite the block tags in parent templates? I have a chunk of html generated by an inclusion tag, and I would like to assign a CSS file with it. I would like to be able to append to an extracss block in base.html (which has links

Re: interaction of django with paypal

2009-08-30 Thread Ryan Kelly
On Sun, 2009-08-30 at 19:54 -0700, Rafael Ferreira wrote: > you could also use this (I haven't used it myself but looks > promising): > > http://github.com/johnboxall/django-paypal/tree/master I can second this recommendation, I've been doing some basic paypal integration and django-paypal has

Re: How do you configure django+http+ftp?

2009-08-30 Thread Graham Dumpleton
On Aug 31, 6:30 am, Léon Dignòn wrote: > And causes new ones. My apache runs other also websites. Don't run the whole Apache as a different user. Use mod_wsgi daemon mode and make just that daemon process running Django run as a different user. Graham > On Aug 30,

Re: Getting all unique values of a field with Django ORM

2009-08-30 Thread Alex Gaynor
On Sun, Aug 30, 2009 at 9:37 PM, stevedegrace wrote: > > Hi guys, > > I'm making a refback type linkback app for my hobby CMS. I want to > find all the unique page targets. I am thinking broadly of a couple of > ways to do it. One with the ORM sort of line this: > > targets =

Re: interaction of django with paypal

2009-08-30 Thread Rafael Ferreira
you could also use this (I haven't used it myself but looks promising): http://github.com/johnboxall/django-paypal/tree/master and it will handle the IPN for you. - raf On Sun, Aug 30, 2009 at 9:07 AM, orschiro wrote: > > Hello guys, > > first thank you for your

Django POST data errors

2009-08-30 Thread Greg
Hi all, I have a large-ish form (40-odd fields) on a pretty busy site, and I'm constantly getting "ManagementForm data is missing or has been tampered with" or "IOError: request data read error" errors. I can't reproduce it, and it always seems to be IE users (sigh) Does anyone have any ideas

Re: Getting all unique values of a field with Django ORM

2009-08-30 Thread Russell Keith-Magee
On Mon, Aug 31, 2009 at 9:37 AM, stevedegrace wrote: > > Hi guys, > > I'm making a refback type linkback app for my hobby CMS. I want to > find all the unique page targets. I am thinking broadly of a couple of > ways to do it. One with the ORM sort of line this: > > targets =

Getting all unique values of a field with Django ORM

2009-08-30 Thread stevedegrace
Hi guys, I'm making a refback type linkback app for my hobby CMS. I want to find all the unique page targets. I am thinking broadly of a couple of ways to do it. One with the ORM sort of line this: targets = list(set([linkback.target_url for linkback in LinkBacks.objects.all()])) This seems

alternative to using index number to refer to inline admin formsets in template?

2009-08-30 Thread sico
Hey, I can get to the inline_admin_formset by indexing the inline_admin_formsets variable e.g. {{ inline_admin_formsets.0.formset }} is there an alternative to use the index number for picking the formset?? I've tried the model name but it doesn't seem to work... any suggestions?? thanks,

multiple admin interfaces for a single model

2009-08-30 Thread sico
Hey, Is it at all possible to have more than one admin interface for one model? I'd like to have a simple view that just edits the one model fields, and another (maybe more) that edit the model, plus several inline associated models. I can get this to work by having separate AdminSites, is

Re: ImportError: No module named stdimage in Django 1.0.3 under Fedora 11

2009-08-30 Thread Karen Tracey
On Sun, Aug 30, 2009 at 5:15 PM, Zico wrote: > I am facing problem with this error: *ImportError: No module named > stdimage* while i tries to run the command: > > *python manage.py runserver > * > this is a http://www.fixmystreet.com/ server. The server runs ok... as you >

Re: Defining subsets of "list" variable at template level

2009-08-30 Thread Jonathan
This explains how to do this using the dictsort and regroup filters. http://blueflavor.com/blog/2008/jul/28/advanced-django-template-tags-and-filters/ On Aug 30, 3:19 pm, Jonathan wrote: > I am looking for the exact same thing. > > On Aug 6, 11:35 pm, bweiss

Re: Defining subsets of "list" variable at template level

2009-08-30 Thread Jonathan
I am looking for the exact same thing. On Aug 6, 11:35 pm, bweiss wrote: > Is there a simple way to do the following that I'm just not seeing, or > am I looking at trying to write a custom tag?  The functionality I > need is similar to {% regroup %} but not quite the

ImportError: No module named stdimage in Django 1.0.3 under Fedora 11

2009-08-30 Thread Zico
I am facing problem with this error: *ImportError: No module named stdimage* while i tries to run the command: *python manage.py runserver * this is a http://www.fixmystreet.com/ server. The server runs ok... as you can see the server starting messages: *[r...@fedora fixmystreet]# python

Re: Django searching for admin template in admindocs directory

2009-08-30 Thread Jeff
Thank you very much, adding it did the trick. Not sure how I missed that. On Aug 30, 4:39 pm, Alex Gaynor wrote: > On Sun, Aug 30, 2009 at 4:33 PM, Jeff wrote: > > > Hi, > > > I'm a Django newbie and have run into a Template Not Found error when

Re: Django searching for admin template in admindocs directory

2009-08-30 Thread Alex Gaynor
On Sun, Aug 30, 2009 at 4:33 PM, Jeff wrote: > > Hi, > > I'm a Django newbie and have run into a Template Not Found error when > setting up the admin interface on a site I'm building. > > Here's the error: >

Django searching for admin template in admindocs directory

2009-08-30 Thread Jeff
Hi, I'm a Django newbie and have run into a Template Not Found error when setting up the admin interface on a site I'm building. Here's the error: -- Environment: Request Method: GET Request URL:

Re: How do you configure django+http+ftp?

2009-08-30 Thread Léon Dignòn
And causes new ones. My apache runs other also websites. On Aug 30, 9:12 pm, Mike Ramirez wrote: > On Sunday 30 August 2009 12:04:36 pm Léon Dignòn wrote: > > > > > > > Hello folks, > > > I read through the documentation and got my project up and running. > > But when I try

Problem subclassing Widget with value_from_datadict

2009-08-30 Thread Mike Ramirez
hey, I'm trying to write a recaptcha widget using the recaptcha client, the problem I'm having is that redefining value_from_datadict I get this error: 'ContactForm' object has no attribute named 'get'. This happens on the initial loading of the from. here is the traceback:

Re: How do you configure django+http+ftp?

2009-08-30 Thread Mike Ramirez
On Sunday 30 August 2009 12:04:36 pm Léon Dignòn wrote: > Hello folks, > > I read through the documentation and got my project up and running. > But when I try to upload something, I receive the error messages > 'permission denied'. I could sloppy fix that problem with chmod, but > that is not

How do you configure django+http+ftp?

2009-08-30 Thread Léon Dignòn
Hello folks, I read through the documentation and got my project up and running. But when I try to upload something, I receive the error messages 'permission denied'. I could sloppy fix that problem with chmod, but that is not want I want to do. Since then I am thinking about a good folder

Re: Advice on Subclassing a TextField

2009-08-30 Thread Mark (Nosrednakram)
I had at one time included the following and ended up putting it back so that syncdb would actually create the columns. Without it the table is created with the column being made. I am assuming this is correct but am not sure. def db_type(self): return TextField().db_type() Thanks

Re: Help with admin inlines

2009-08-30 Thread Frank Wiles
On Fri, Aug 28, 2009 at 3:12 AM, Léon Dignòn wrote: > > Hi, > > I tried to stack two models in the admin interface. Any ideas why I > get this error? > > issubclass() arg 1 must be a class > File "C:\Django\myproject\myapp\admin.py" in >  22.

Re: Table with search results and returning to previous page.

2009-08-30 Thread Frank Wiles
On Thu, Aug 27, 2009 at 5:40 PM, Viacheslav Chumushuk wrote: > Hello. > > I have project design question. Imaging that we have page with simple search > form at the top and search results at the bottom of the same page. And every > row of result table has a link to another page

Re: interaction of django with paypal

2009-08-30 Thread orschiro
Hello guys, first thank you for your suggestions. I have to admit I'm pretty new to Django and coding itself, so please be patient with me. *g* >From your the ideas I tried to implement the following one. >     if (None == request.META.get('HTTP_REFERER')): >         return

Custom Product/Custom TextFields not showing up in product order

2009-08-30 Thread Michael S
Hi, I am fairly new with Satchmo and try to make a product that can be personalized with a name. So I created a product in the admin gui, created a custom product and custom textfield as well. And enabled custom product in site settings. Now the field shows up in the product view and also when

Re: Store ImageField file using id as filename

2009-08-30 Thread Gonçalo Ferreira
Hi Mike, Thanks a lot for the input! I'll study all the alternatives you mentioned to see which suits my project better. Again, thanks! Gonçalo On Sun, Aug 30, 2009 at 2:45 AM, Mike Ramirez wrote: > On Saturday 29 August 2009 04:03:58 pm gon...@gmail.com wrote: > > I'm

customize the radio button diplay order in templates

2009-08-30 Thread Lokesh
Hi, Need help in understanding the template rendering for radio/check buttons 1. Is it possible to display the radio/check buttons in horizontal or customized(as per user interest) order. 2. How do I get the control on the radio button attribute/variable in templates. (Instead of just printing

Re: Advice on Subclassing a TextField

2009-08-30 Thread Alex Robbins
Also, maybe you aren't submitting all the code, but you could do the same thing by just passing an attrs dictionary to the text area widget. http://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.Widget.attrs Not sure that this requires two more classes. Hope that helps, Alex

Re: Django 1.0.2 + CSS how to?

2009-08-30 Thread adelaide_mike
Thank you Mike Ramirez. [1] makes a difference. I now see the css taking effect. Mike On Aug 30, 8:55 am, Mike Ramirez wrote: > On Saturday 29 August 2009 04:35:11 pm adelaide_mike wrote: > > > > > As a very newbie I am struggling to understand how to use CSS.  I read > >

Re: "django-pagination" and generic.views.date_based.archive_index()

2009-08-30 Thread tezro
Anyone? On Aug 14, 8:29 am, tezro wrote: > The question is that "django.views.generic.date_based.archive_index()" > takes an optional argument "num_latest" which is 15 by default. > Setting it manually to num_latest=10 is way off to correct to > me. It works. I

Re: interaction of django with paypal

2009-08-30 Thread Andy Shaw
orschiro wrote: > Well and that is also the problem with my solution. Everyone who knows > the URL can download the data without to pay before. > > What I'm now looking for is a possibility to inquire whether the > customer has paid before he was visiting the download page. Whilst you could check

Re: interaction of django with paypal

2009-08-30 Thread esatterwh...@wi.rr.com
You would probably want to create a unique key for each user and something to denote whether the key for the download had been used. the django-registration application does this pretty well, you might peek at that code. Or depending on the scope of the project, you could use the Satchmo app to

Re: template url tag issue

2009-08-30 Thread selcukcihan
Hi, i resolved the problem by creating a custom url tag named app1_url. I copied the code from URLNode and related url method (of defaulttags.py) and modified the calls to reverse so that it gets the argument urlconf. On Aug 29, 9:06 pm, selcukcihan wrote: > (Django

I want to know how to traversal all the urls in a django project?

2009-08-30 Thread butterhuang
for example, In a view function, I can get all the urls as string from all the apps in whole django project --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Advice on Subclassing a TextField

2009-08-30 Thread Alex Gaynor
On Sun, Aug 30, 2009 at 1:53 AM, Mark Anderson wrote: > Hello, > > I wanted a field that would render in a rich text editor and store the data > in a TextField so I created a field type of HtmlField and custom HtmlWidge. > It works but I was wondering is anyone would be