Re: Access to refering objects befor save

2013-01-16 Thread scaphilo
Found a solution in django 1.4 https://docs.djangoproject.com/en/1.4/ref/contrib/admin/ and one for django 1.3 http://igorsobreira.com/2011/02/12/change-object-after-saving-all-inlines-in-django-admin.html Am Donnerstag, 17. Januar 2013 06:23:35 UTC+1 schrieb scaphilo: > > Hi > > I would like t

Re: Django Baseball Site Model

2013-01-16 Thread Mac
You could create another field under Stat called team, and rename the class stat to "Stint" or "Term" or "Session" ( I can't think of a better word ) to represent the stats of the player's "stint" at that team, that year. You may also want to and another field to represent how many times the p

Access to refering objects befor save

2013-01-16 Thread scaphilo
Hi I would like to overwrite the save_model function of a model. During this save i need to have access to some refering models wich are also newly created with (admin.TabularInline). The post save method of accessing these would be: allReferingObjects = ReferingModel.objects.filter(refereTo=r

Re:

2013-01-16 Thread Mario Gudelj
Target the form filed using JS and populate it with JavaScript. You can make it a hidden field if you don't want the visitor to see it. On 17 January 2013 11:39, Randa Hisham wrote: > i want to pass value from javascript function to view in form submit > > -- > Randa Hesham > Software Developer

w3c accessibility design

2013-01-16 Thread Mike Dewhirst
Has anyone tackled WCAG 2.0 in their Django apps? http://www.w3.org/WAI/WCAG20/quickref/Overview.php I have been asked to advise on a CMS for a client needing to provide access for people with various disabilities. The CMS needs a public section as well as an intranet for logged-in users. Th

Re: jquery multi file uploads in single post

2013-01-16 Thread Randa Hisham
Try to use formsets On Mon, Jan 14, 2013 at 6:55 PM, Chad Vernon wrote: > I'm creating an asset management system with Django and I'm using this > jquery multi-file uploader: > http://blueimp.github.com/jQuery-File-Upload/ > > I want to be able to get all uploaded files in a single POST request

[no subject]

2013-01-16 Thread Randa Hisham
i want to pass value from javascript function to view in form submit -- Randa Hesham Software Developer Twitter:@ro0oraa FaceBook:Randa Hisham ٍ -- You received this message because you are subscribed to the Google Groups "

Re: ManyToOne or ManyToMany Confusion

2013-01-16 Thread acat...@gmail.com
Thanks. I tried that technique and doing so only let me add one topping to the pizza. On Wednesday, January 16, 2013 4:12:49 PM UTC-7, Javier Guerra wrote: > > On Wed, Jan 16, 2013 at 5:46 PM, aca...@gmail.com < > aca...@gmail.com > wrote: > > The pizza could have the olive topping and onion t

Django Baseball Site Model

2013-01-16 Thread David Gomez
Hi, I would like to make a website about baseball player from an specific country, but I'm stock how to make the model for the player stat. My Current a sample model is like this (The Stat Class is going to be much longer): class PLayer_Bios(models.Model): my_id = models.SlugFi

Re: can't createsuperuser

2013-01-16 Thread Russell Keith-Magee
On Wed, Jan 16, 2013 at 5:44 PM, zhfisher wrote: > I can't createsuperuser in 1.5rc1 > > Error: > >D:\Python27\lib\site-packages\django\utils\hashcompat.py:9: > DeprecationWarning: > django.utils.hashcompat is deprecated; use hashlib instead > DeprecationWarning) > > UnicodeEncodeError: 'as

Re: static files, runserver debug=True

2013-01-16 Thread Fred Kingham
perfect thanks Javier. I guess my question should have been phrased, if debug = False, does the runserver serve static files from the STATIC_ROOT. Clearly that's no. Thanks again. Fred On Wednesday, January 16, 2013 7:19:01 PM UTC, Javier Guerra wrote: > > On Wed, Jan 16, 2013 at 6:54 AM

Re: ManyToOne or ManyToMany Confusion

2013-01-16 Thread Javier Guerra Giraldez
On Wed, Jan 16, 2013 at 5:46 PM, acat...@gmail.com wrote: > The pizza could have the olive topping and onion topping, etc. But only one > of each. Thanks for any help. use an explicit 'through' table and set both foreignkeys as 'unique together' on that table. -- Javier -- You received this

Re: ManyToOne or ManyToMany Confusion

2013-01-16 Thread Lachlan Musicman
Does Field.unique address your needs? ManyToOne may be the better solution...but without models to look at, it may require a validity check at save to confirm that each Pizza only had one of each type of Topping. Cheers L. On Thu, Jan 17, 2013 at 10:46 AM, acat...@gmail.com wrote: > I'm trying t

ManyToOne or ManyToMany Confusion

2013-01-16 Thread acat...@gmail.com
I'm trying to setup a relationship between two django models that is very similar to the model of a Pizza having many Toppings. However, I need to make sure that if a Pizza is created then only one Pepperoni topping can be added. The pizza could have the olive topping and onion topping, etc.

Re: only utf-8 letters regex pattern

2013-01-16 Thread Adam Mesha
You can explicitly add the Turkish characters to the character class if there are just a few of them. You could also use the UNICODE regex flag and do something like ur'(?u)^[^\W\d_]+$', which will match any string consisting solely of alphabetic unicode characters. 2013/1/16 armagan > Hi, > > I

Re: static files, runserver debug=True

2013-01-16 Thread Javier Guerra Giraldez
On Wed, Jan 16, 2013 at 6:54 AM, Fred Kingham wrote: > Can you serve static files like you would in production from the django > runserver? it depends on what you mean by "like you would in production": if you mean "separate processes for static files and web app" then no, it can't since it's a

Custom queryset in a list_editable field of Admin changelist

2013-01-16 Thread Daniel França
Hello, I'm using list_editable of a ModelAdmin to allow users change a choicefield right in the changelist view. Ex: I've a list *Field1 Field2 ChoiceField* abc def foo ghj klm bar The idea is that ChoiceField is filled according to the *field1 *and *field2 *values, so the values

Re: Payment method for systempay

2013-01-16 Thread Mario Gudelj
Use request.GET.getlist('myvar') or request.GET.get('myvar') for a single item On 17 January 2013 03:10, mouna abdennadher wrote: > Hi, > I implemented a PaymentMethodProcessor for sytempay. LFS send POST to the > bank successfully, Now I have to receive in LFS the POST from the bank,so i > cr

Re: difficulty with static files

2013-01-16 Thread Fred Kingham
ok, I do think its confusing, but I'm happy to admit it might just be me. On Thursday, November 29, 2012 6:00:26 PM UTC, Sammy wrote: > > Hello django experts > I am unable to get my static files to work. Here are my settings: > > projectfiles > | > |-myproject > | | > | |-static

Payment method for systempay

2013-01-16 Thread mouna abdennadher
Hi, I implemented a PaymentMethodProcessor for sytempay. LFS send POST to the bank successfully, Now I have to receive in LFS the POST from the bank,so i create a django form with a view in order to capture all the parameters in the url (send by the bank).how can i capture this parameters?Requ

Re: difficulty with static files

2013-01-16 Thread Fred Kingham
ah ok cool thanks On Thursday, November 29, 2012 6:00:26 PM UTC, Sammy wrote: > > Hello django experts > I am unable to get my static files to work. Here are my settings: > > projectfiles > | > |-myproject > | | > | |-static > | | | > | | |-css > | | |-

Re: difficulty with static files

2013-01-16 Thread Tom Evans
On Wed, Jan 16, 2013 at 10:38 AM, Fred Kingham wrote: > not sure if this is the right place to post this, but doesn't this - > > https://docs.djangoproject.com/en/dev/howto/static-files/#serving-static-files-in-development > > "If using runserver for local development (and the DEBUG setting is Tru

Re: Django CRM Tool

2013-01-16 Thread Mário Neto
Very good! Ezequiel =] 2013/1/15 Ezequiel Bertti > Try this: > http://tree.io/ > > > On Tue, Jan 15, 2013 at 7:05 PM, scaphilo wrote: > >> Hi >> Well this thread is a bit outdated but as you have not had any answers >> yet. >> >> Insted of starting from scratch you could perhaps start with >> w

static files, runserver debug=True

2013-01-16 Thread Fred Kingham
not sure if this is a stupid question but... collect static works fine, running off apache it serves static files fine and it runs fine with debug=True. Can you serve static files like you would in production from the django runserver? Or is this just something that can't be done. Thanks for

Re: difficulty with static files

2013-01-16 Thread Fred Kingham
not sure if this is the right place to post this, but doesn't this - https://docs.djangoproject.com/en/dev/howto/static-files/#serving-static-files-in-development "If using *runserver*for local development (an

can't createsuperuser

2013-01-16 Thread zhfisher
I can't createsuperuser in 1.5rc1 Error: D:\Python27\lib\site-packages\django\utils\hashcompat.py:9: DeprecationWarning: django.utils.hashcompat is deprecated; use hashlib instead DeprecationWarning) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordin al not i

Re: Django CRM Tool

2013-01-16 Thread Ezequiel Bertti
Try this: http://tree.io/ On Tue, Jan 15, 2013 at 7:05 PM, scaphilo wrote: > Hi > Well this thread is a bit outdated but as you have not had any answers yet. > > Insted of starting from scratch you could perhaps start with > www.koalix.org > https://github.com/scaphilo/koalixcrm > Its open sour

Re: django: creating tag groups

2013-01-16 Thread Sammael
вторник, 15 января 2013 г., 16:34:36 UTC+4 пользователь Amirouche написал: > > > The example in the code is not working, <> class is not referenced > anywhere. I'm not familiar with multi-widgets but if a tree widgets is not > what you want or don't get it work, I think it's the right approach.

Re: only utf-8 letters regex pattern

2013-01-16 Thread Jian Chang
you can use unicode. 2013/1/16 armagan > Turkish chars -- 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, send email to django-users+unsubscr...

only utf-8 letters regex pattern

2013-01-16 Thread armagan
Hi, I'm trying to use regex patterns in django form. I successed in only letters regex pattern. But form controler declines Turkish chars. I think I must use utf-8 regex. Can you help me? name = forms.RegexField(regex =r'^[a-zA-Z]+$') Thanks for help. -- You received this message because you