Re: Interrelated form fields

2009-11-03 Thread Julián C . Pérez
Nice discussion :D Any help on Ajax methods or something to achieve this? On Oct 30, 4:25 am, bruno desthuilliers wrote: > On 29 oct, 18:33, Daniel Roseman wrote: > > > On Oct 29, 4:42 pm, bruno desthuilliers > > > > > wrote: > > > (FWIW and IIRC, the appropriate english term is 'Customer' -

Interrelated form fields

2009-10-29 Thread Julián C . Pérez
Hi all I have a question to make I'm tryng to build a form using the following models: --- in models.py class Client(models.Model): user = models.ForeignKey(User, verbose_name=u'associated user') telephone = models.CharField(u'Telephone number', max_length=33, blank=False, null=False) cla

Re: Django and ZSI

2009-09-01 Thread Julián C . Pérez
Thanks On Aug 31, 3:22 pm, Antoni Aloy wrote: > 2009/8/31 Julián C. Pérez : > > > > > Anyone has experience with using web services in Django?? > > I mean, not necessarily with ZSI but others methods... > > Yes, we have many of the working. But this is no a D

Re: Django and ZSI

2009-08-31 Thread Julián C . Pérez
Anyone has experience with using web services in Django?? I mean, not necessarily with ZSI but others methods... On Aug 31, 11:56 am, Julián C. Pérez wrote: > Hi you all > I'm trying to serve a simple web service using ZSI > Anyone how can I configure an app's urls and vie

Re: template tag question

2009-08-31 Thread Julián C . Pérez
Hi I use Django 1.0 and I define a template function like... --- from django import template register = template.Library() def doSomething(param1, param2): # Do something like... return str(param1)+''+str(param2) register.simple_tag(doSomething) --- to use that in template system, assuming a

Django and ZSI

2009-08-31 Thread Julián C . Pérez
Hi you all I'm trying to serve a simple web service using ZSI Anyone how can I configure an app's urls and views files to do this?? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Get current user outside a view / without an request object

2009-08-06 Thread Julián C . Pérez
ser= inputUser super(SendMessageForm, self).__init__(*args, **kwargs) self.fields['recipientUser'].queryset = # Anything with the current user, in this case 'self.user' --- On Aug 6, 11:14 am, Julián C. Pérez wrote: > Thanks for reply, Pa

Re: Get current user outside a view / without an request object

2009-08-06 Thread Julián C . Pérez
f __init__(self, user, *args, **kwargs): >         super(ExperimentForm, self).__init__(*args, **kwargs) >         try: >             preferences = Preferences.objects.get(user=user) > > That last 'user' is just what came from the function call in the view. > > - Paulo > >

Re: Get current user outside a view / without an request object

2009-08-06 Thread Julián C . Pérez
urrentUser' is a callable function similar to: --- def get_image_path(instance, filename): return 'photos/%s/%s' % (instance.id, filename) class Photo(models.Model): image = models.ImageField(upload_to=get_image_path) --- how can I do that? On Aug 6, 9:58 am, Daniel Roseman wrot

Re: Get current user outside a view / without an request object

2009-08-06 Thread Julián C . Pérez
1:40 am, Daniel Roseman wrote: > On Aug 6, 2:24 am, Julián C. Pérez wrote: > > > > > Hi everyone > > I'm in trouble because of a form class > > I have a form class with attributes defined, but with one thing: > > One of the attributes requires the curr

Get current user outside a view / without an request object

2009-08-05 Thread Julián C . Pérez
Hi everyone I'm in trouble because of a form class I have a form class with attributes defined, but with one thing: One of the attributes requires the current user, or al least its username The form definition in as shown below: --- class SendMessageForm(forms.Form): recipientUser = ShowV

Re: Managing settings.py from admin site

2009-07-06 Thread Julián C . Pérez
 am, Julián C. Pérez wrote: > > > Hi everyone > > I have a doubt... > > Is it possible to edit or customize -not delete- variables created in > >settings.pyfrom theadminsite of my application?? > > I mean, in order to control the whole site from web interface instea

Managing settings.py from admin site

2009-07-02 Thread Julián C . Pérez
Hi everyone I have a doubt... Is it possible to edit or customize -not delete- variables created in settings.py from the admin site of my application?? I mean, in order to control the whole site from web interface instead of manually editing settings.py I hope I made myself clear... Any idea?? Tha

Re: ModelForm customizing

2009-05-11 Thread Julián C . Pérez
anyone?? pleeease?? :D On 10 mayo, 09:15, Julián C. Pérez wrote: > anyone?? any help?? > :) > > > hi all > > something like this had already been > > reported:http://code.djangoproject.com/ticket/6138 > > > i tried sean's solutions but nothing happens

Re: ModelForm customizing

2009-05-10 Thread Julián C . Pérez
anyone?? any help?? :) > hi all > something like this had already been > reported:http://code.djangoproject.com/ticket/6138 > > i tried sean's solutions but nothing happens... > stand by... > ;) > > On May 8, 7:25 pm, Julián C. Pérez wrote: > > > t

Re: ModelForm customizing

2009-05-08 Thread Julián C . Pérez
hi all something like this had already been reported: http://code.djangoproject.com/ticket/6138 i tried sean's solutions but nothing happens... stand by... ;) On May 8, 7:25 pm, Julián C. Pérez wrote: > thank you,s ean > i will try > ahh one thing i'd like to comment...

Re: ModelForm customizing

2009-05-08 Thread Julián C . Pérez
thank you,s ean i will try ahh one thing i'd like to comment... when creating an ProfileForm object I even give it the class as an argument like this: ... profile, created = Profile.objects.get_or_create(user=request.user) myProfileForm = ProfileForm(request.POST, instance=profile, error_class=Div

ModelForm customizing

2009-05-08 Thread Julián C . Pérez
hi everyone me again... i need some help i want to change the error_class in a modlefrom instance the class looks like this: # in a models.py file 1 .class ProfileForm(forms.ModelForm): 2. 3. error_class = DivErrorList 4. 5. class Meta: 6. model = P 7. exclude

Re: url template tag help

2009-05-03 Thread Julián C . Pérez
hi everyone... i just took the easiest option i had i rewrite my urls.py file completely again and by now... it works! weird, i know... i'm just appending the former urlpatterns lines i had, one by one, testing every single of them one by one... and working thank u all so much! ;) On May 3, 10:37

Re: Template tags and variables overlapping

2009-05-03 Thread Julián C . Pérez
okss thank u all for your replies i have a new question about it... in order to make more portable my code, i like to create warepper functions to anything... i want to make a function -in this case a template tag- for creation of links... example: {% createLink "a link to something" src "class

Re: Template tags and variables overlapping

2009-04-30 Thread Julián C . Pérez
jajaja i know that what just a stupid example to make my point... i plan to make more complex custom tags On Apr 30, 12:11 pm, Lakshman Prasad wrote: > Why cant you just do something like > > {% sayHello " Hello Robert and " %} {{ currentname }} > > 2009/4/30 Julián C.

Template tags and variables overlapping

2009-04-30 Thread Julián C . Pérez
hi u all... again this has become my first resource on getting help a new doubt i have... in templates... i have a variable, let's say varOne -suposse it's equal to "Kathleen" ... {{ currentName }} ... and i have created a custom tag which takes an argument, called sayHello ... {% sayHello "Robert

Re: url template tag help

2009-04-30 Thread Julián C . Pérez
anyone?? i can't get around this... and i don't want to hard-code the urls in templates either :( On 30 abr, 09:20, Julián C. Pérez wrote: > by now, i'll try to found some other way to create dynamic urls based > on the views... > maybe using a custom template tag > &

Re: url template tag help

2009-04-30 Thread Julián C . Pérez
by now, i'll try to found some other way to create dynamic urls based on the views... maybe using a custom template tag On 29 abr, 21:52, Julián C. Pérez wrote: > uhhh > i tried but nooo... your suggestion doesn't work... > let me show you 2 versions of error...

Re: url template tag help

2009-04-29 Thread Julián C . Pérez
uhhh i tried but nooo... your suggestion doesn't work... let me show you 2 versions of error... 1. "Reverse for 'proyName.view_aboutPage' with arguments '()' and keyword arguments '{}' not found." settings: # in proyName.packages.appName.urls.py: ... url(r'^about/$', 'view_aboutPage', name='proy

Re: FileField uploading into an user-specific path

2009-04-29 Thread Julián C . Pérez
> > photo_1 = models.ImageField(upload_to=upload_location, blank=True) > > Cheers, > Kevin > > On Apr 29, 8:12 am, Julián C. Pérez wrote: > > > thanks... > > but... > > how can i make that attribute a callable tto work with user-specif >

Re: url template tag help

2009-04-29 Thread Julián C . Pérez
jajaja it's not top secret what more information should i provide?? On 29 abr, 11:55, Malcolm Tredinnick wrote: > On Wed, 2009-04-29 at 08:10 -0700, Julián C. Pérez wrote: > > actually... i don't use underscores into my url or views names... > > that 'view_aboutPag

Re: FileField uploading into an user-specific path

2009-04-29 Thread Julián C . Pérez
thanks... but... how can i make that attribute a callable tto work with user-specif paths?? On 29 abr, 03:18, Kip Parker wrote: > upload_to can be a callable > -http://docs.djangoproject.com/en/dev/ref/models/fields/#filefield. > > On Apr 29, 4:59 am, "Carlos A. Carnero Delgado" > > wrote: > >

Re: url template tag help

2009-04-29 Thread Julián C . Pérez
men are bound to slug resitrictions. > > On 29 Apr., 03:06, Julián C. Pérez wrote: > > > hi everyone > > i need some help over here... please! > > i don't know what it's wrong... > > > the url i'm trying to get around is:http://proyName/about/ > > &

Re: FileField uploading into an user-specific path

2009-04-28 Thread Julián C . Pérez
ok, you're right... sorry for the rush i can wait ;) On Apr 28, 8:12 pm, Russell Keith-Magee wrote: > 2009/4/29 Julián C. Pérez : > > > > > anyone?? > > how can i make that happen?? > > You asked your original question 4 hours ago. This is an international &

Re: FileField uploading into an user-specific path

2009-04-28 Thread Julián C . Pérez
anyone?? how can i make that happen?? On Apr 28, 3:41 pm, Julián C. Pérez wrote: > hi u all > i'm progressing in my django wisdom jeje > but everyday i face new challenges and/or problems... > 'im working on a uploading files application... > and i want to store eve

url template tag help

2009-04-28 Thread Julián C . Pérez
hi everyone i need some help over here... please! i don't know what it's wrong... the url i'm trying to get around is: http://proyName/about/ the error: "Reverse for 'proyName.view_aboutPage' with arguments '()' and keyword arguments '{}' not found." in a template, the dispatcher of the error:

FileField uploading into an user-specific path

2009-04-28 Thread Julián C . Pérez
hi u all i'm progressing in my django wisdom jeje but everyday i face new challenges and/or problems... 'im working on a uploading files application... and i want to store every uploaded file into its right path, arranged by username example... if a user called 'user123' uploads a file from a reg

More than one DB configuration in settings.py

2009-03-17 Thread Julián C . Pérez
Hi everyone I need some help here I'm in a rush, so I don't took first the time to explore the board and solve this doubt... How can I make two different DB configurations on the settings.py?? I mean... I manage my project through svn, but i make changes all over it on two enviroments... Yes, you

A distributed DB

2009-03-17 Thread Julián C . Pérez
Hi again Another questions circling my head... Anyone know any distributed DB system to engaged with Django/python?? I'm developing an storage application (uploading files into an account) and it'd be useful What about something like Cassandra, or Project Voldemort?? - opensource alternatives to A

Re: a little help on creating a 'global' file

2009-03-10 Thread Julián C . Pérez
now as I'm on mobile but search for template tags or auto > escape and you should hit some relevant stuff. > > ~Briel > > On 9 Mar., 19:12, Julián C. Pérez wrote: > > > ok briel, maybe i should explain myself better > > you're right about the function with that in

Re: a little help on creating a 'global' file

2009-03-09 Thread Julián C . Pérez
ld be to do, > from myproject import globalValues as global > this would give you all the functions in the globalValues file on > "global", so you could do, global.ocultarEstado(...). You could change > the name after "as" into anything you like. > > ~Briel >

Re: a little help on creating a 'global' file

2009-03-09 Thread Julián C . Pérez
ales.py # -- import * def ocultarEstado(request): valor = """ (aceptar) """ return { 'ocultarEstado' : valor } # -- ... that?? another thing... don't you know how to output that dictionary entry with ht

a little help on creating a 'global' file

2009-03-09 Thread Julián C . Pérez
hi everyone from colimbia i'm new on django... so far, i love it... i'm very used to php, but the solution with django/python is just awesome i have started a project and i've been catching up with the basics... right now i have 2 doubts... 1. i created a file called 'globalValues.py' in the root