Re: View with keyword arguments

2009-08-15 Thread Juanjo Conti
lue for the second grouping } and the > first group will not be used. > > -- raja > > > On Aug 15, 5:24 pm, Juanjo Conti <jjco...@gmail.com> wrote: >> In the examples seems not to be mixed, positional and keyword >> argumentshttp://docs.djangoproject.com/en/dev/to

Re: View with keyword arguments

2009-08-15 Thread Juanjo Conti
In the examples seems not to be mixed, positional and keyword arguments http://docs.djangoproject.com/en/dev/topics/http/urls/ 2009/8/15 Juanjo Conti <jjco...@gmail.com>: > Which is the correct signature for a view to be used with this url > ^vista/ejemplo1/(\d{3})/(?P\d{3})/$ ?

View with keyword arguments

2009-08-15 Thread Juanjo Conti
Which is the correct signature for a view to be used with this url ^vista/ejemplo1/(\d{3})/(?P\d{3})/$ ? - Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: inspectdb and MySQL

2009-07-29 Thread Juanjo Conti
2009/7/29 Joshua Russo <josh.r.ru...@gmail.com>: > On Wed, Jul 29, 2009 at 12:35 PM, Juanjo Conti <jjco...@gmail.com> wrote: >> >> In http://docs.djangoproject.com/en/dev/ref/django-admin/ i read >> "inspectdb works with PostgreSQL, MySQL and SQLit

inspectdb and MySQL

2009-07-29 Thread Juanjo Conti
In http://docs.djangoproject.com/en/dev/ref/django-admin/ i read "inspectdb works with PostgreSQL, MySQL and SQLite. Foreign-key detection only works in PostgreSQL and with certain types of MySQL tables." Could you tell me the preferred MySQL table types? Thanks, -- Ju

Re: Django turns?

2009-04-24 Thread Juanjo Conti
Does anyone tried both? Any comment? 2009/4/24 Juanjo Conti <jjco...@gmail.com> > Seems good! I'd like to contact the author but cound't find his mail > address. Can someone point it out? > > Thanks! > > 2009/4/22 Sergio Durand <dja...@durand.eti.br> > >

Re: Django turns?

2009-04-24 Thread Juanjo Conti
t's what you are looking for... > > -- > Sergio Durand > > Juanjo Conti escreveu: > > Hi! > > > > I wonder know if there is a Django app suitable to handle turns as the > > ones given by a doctor to his pacients. > > Thanks

Re: How to add datepicker for InputDateField

2009-04-22 Thread Juanjo Conti
> admin. How do I add this datepicker to an InputDateField in my form? > > Thank you very much in advance > > -- > If you can't believe in God the chances are your God is too small. > > Read my blog: http://joshuajava.wordpress.com/ > Follow us on twitter: http

Django turns?

2009-04-22 Thread Juanjo Conti
Hi! I wonder know if there is a Django app suitable to handle turns as the ones given by a doctor to his pacients. Thanks in advance, -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

SECRET_KEY

2008-11-11 Thread Juanjo Conti
Is there any problem with changing my SECRET_KEY from a running project? Thanks, Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

django-navbar in 1.0

2008-10-20 Thread Juanjo Conti
Hi! I am trying to use django-navbar app[0], but I am getting troubles because it seems to be pre 1.0. Does anyone know about it? Does any one use it with django 1.0? Thanks, Juanjo [0] http://code.google.com/p/django-navbar/ -- mi blog: http://www.juanjoconti.com.ar

Re: Resizing images when uploading

2008-10-06 Thread Juanjo Conti
i = Image.open(path) i.thumbnail(800,600), Image.BILINEAR) i.save(path) Juanjo 2008/10/6 Juanjo Conti <[EMAIL PROTECTED]>: > Thanks for your reply, but... > > Whats resized? It's not in my namespace. > > 2008/10/4 varikin <[EMAIL PROTECTED]>: &g

Re: Resizing images when uploading

2008-10-06 Thread Juanjo Conti
Thanks for your reply, but... Whats resized? It's not in my namespace. 2008/10/4 varikin <[EMAIL PROTECTED]>: > > > > On Oct 3, 4:18 pm, "Juanjo Conti" <[EMAIL PROTECTED]> wrote: >> Hi, I used to use a pre 1.0 svn version of Django. There I had t

Re: Updating path and filename of ImageFieldFile

2008-10-03 Thread Juanjo Conti
a name of >> >> > > images/processed/XXX.png >> >> > I've tried using FieldFile.save as in >> >> > > myModelInstance.image.save('new/path/new.png', File(file('path to >> > processed image file'))) >> >> > and this mostly seems to

Resizing images when uploading

2008-10-03 Thread Juanjo Conti
Hi, I used to use a pre 1.0 svn version of Django. There I had this class: class Foto(models.Model): descripcion = models.CharField(max_length=30, blank=True, verbose_name=u"descripción") imagen = models.ImageField(upload_to='imagenes', verbose_name=u"foto") inmueble =

Re: pyRTF and unicode

2008-09-24 Thread Juanjo Conti
e-unicode the data I'm passing to it or something? > > > -- Juanjo Conti --~--~-~--~~~---~--~~ 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

Is the same request.method == "POST" and request.POST?

2008-07-22 Thread Juanjo Conti
I have used both ways in my views, now I am wondering know if one is wrong and why. Thanks in advance, -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Is the same request.method == "POST" and request.POST?

2008-07-21 Thread Juanjo Conti
2008/7/21 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > The correct way to test is to do request.method == "POST", not test > request.POST, because that could be empty even on a post request. > OK. But it will not have content if the view is reached via G

Re: NEED HELP BADLY

2008-07-17 Thread Juanjo Conti
In views.py you define as many python functions as cotrollers you want. Hech one has thsi signature: def view1(request, *args, **kwargs) You also have a urls.py file that maps urls to view functions. -- Juanjo Conti --~--~-~--~~~---~--~~ You received

Re: Dreamhost now supports Django

2008-07-17 Thread Juanjo Conti
; > Please give feedback > > -- > Ramdas S > +91 9342 583 065 > My Personal Blog: http://ramdas.diqtech.com > > > -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&q

Re: "ImportError No module named django"

2008-07-08 Thread Juanjo Conti
How did you exactly install it? Which folders are in your PYTHONPATH? Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: User is in models.py

2008-07-08 Thread Juanjo Conti
You have to pass request.user from some view to the apropiate save method. views.py: def save_human(reqiest): # do some stuff human.save(request.user) models.py: class Human(Model): # ... def save(self, user): # do something with user

Re: newforms-admin: root() takes exactly 3 arguments (2 given)

2008-07-07 Thread Juanjo Conti
furby escribió: [...] > admin.site.root() takes 3 arguments: self, request, url. There is no > way to specify arguments in urls.py, so I have no idea how to fix > this. Any help would be appreciated. Thanks. > Yes there is. You can use regex groups: (r'^admin/(.*)', site1.root), The string

Re: Autoupdate field?

2008-07-06 Thread Juanjo Conti
I you want your data to be normalized, telephone_home char(9) should not be an attribute of Person. If mary is a Person you always can do: mary.family.telephone_home to get her telephone_home. Juanjo -- mi blog: http://www.juanjoconti.com.ar

Re: Copyright issues for an application developed using django, python and mySQL

2008-07-03 Thread Juanjo Conti
Are you going to distribute copies of your software or is just an internal development of the company? -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: deleting a session

2008-07-02 Thread Juanjo Conti
I am just guessing, but try: request.session.clear() 2008/7/2 Bobby Roberts <[EMAIL PROTECTED]>: > >> On Jul 2, 2:50 pm, "Juanjo Conti" <[EMAIL PROTECTED]> wrote: >> You mean in the views? >> >> del request.session['somedata'] > > Well If

Re: deleting a session

2008-07-02 Thread Juanjo Conti
You mean in the views? del request.session['somedata'] 2008/7/2 Bobby Roberts <[EMAIL PROTECTED]>: > > i can't find a way to delete session data (other than user removing > their cookie perhaps?) in the django docs. Is there an easy way to do > this like in ASP? > &g

Re: template via email

2008-07-01 Thread Juanjo Conti
Of course. Create a mail template, compile it and sendmail the result. Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Dynamic rtf files with Django templates

2008-06-27 Thread Juanjo Conti
Hi, I have just comment in my blog how to use Django template system to generate dynamic rtf files. A string filter was made to encode unicode strings into rtf format. BTW, it's in spanish: http://www.juanjoconti.com.ar/2008/06/27/generar-archivos-rtf-en-forma-dinamica-desde-django/ Juanjo

Re: The Lost Fingers

2008-06-27 Thread Juanjo Conti
Could you recommend me some Django (the artist) hits? Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Development environment

2008-06-25 Thread Juanjo Conti
Fernando Rodríguez escribió: > Hi, > > I'm currently learning django on Ubuntu, but my background is Windows, > so I'm not a VIM kind of guy. What kind of IDE do you guys use or > recommend? > I use kate, it has python sintax highlighter and a very nice feature that guess the next word I am

Common data in templates

2008-06-25 Thread Juanjo Conti
I have this problem I'd like to share with you. Supose that the name of a web site is storage in the database (let's say you have the Config model). Config.objects.get(id=1).site_name How do you show that name in all your web pages? Do you have to pass it from all your views while

Re: Django Popups?

2008-06-24 Thread Juanjo Conti
I think there is no built-in functionality for that. I use jquery for this kind of stuff. -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Accessing model from view

2008-06-20 Thread Juanjo Conti
In views.py: from models import ROLES Greets, Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

OneToOneField

2008-06-13 Thread Juanjo Conti
. ''' Is that last note the change mentioned in the first note? Is the first note out of date? I'd like to use OneToOneField, but I'am note sure because of the first note. Thanks -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you

Template engine

2008-06-12 Thread Juanjo Conti
write this because I think that this behaibour should bi fixed, am I right? Anyway I have putted the load tag in the second line of my tempalte :) Juanjo -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: clean_ question

2008-06-10 Thread Juanjo Conti
When you need to use data from more than one form field, THAT validations should be done in a method called 'clean', becasue when clean is execute you are sure that all the fields were c cleaned. -- Juanjo Conti & Ceci --~--~-~--~~~---~--~~ You rece

Django graphic designers

2008-06-09 Thread Juanjo Conti
I'd like to know if there is a community of graphic designers working with django. Maybe a website with resources (css, html tamplates...)? I am writing a little personal app and it looks really ugly :) One of my options is to hire a designer, but I would prefer to hire one with Django

Re: unsubscribe?

2008-06-08 Thread Juanjo Conti
[EMAIL PROTECTED] escribió: > how do i unsubscribe? > --~--~-~--~~~---~--~~ > 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

Re: custom css in password change form built using oldforms

2008-06-04 Thread Juanjo Conti
For the admin app? On Wed, Jun 4, 2008 at 4:08 PM, Mayank Dhingra <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > I needed a work around to add custom css in the default(oldforms) > password change form > that I am using . How to go about it ? > > Th

JQuery Ajax Widget for multiple and simple select

2008-06-04 Thread Juanjo Conti
I am trying to implement an ajax-widget with JQuery to handle simple and multiple select that retrives options that match what the user has typed. Is there something of this all ready done out there? I'd like to see it. Thanks, -- Juanjo Conti

Re: "Includes" directory?

2008-06-02 Thread Juanjo Conti
ence it as "myproject.includes". > > Please let me know if this approach is frowned upon in favor of some > other paradigm. If so, can you show me an example of the preferred > method? > > Thank you in advance. > > > -- Juanjo Conti --~--~-~--~---

Re: Use variables inside an 'include' tag (and/or: how to set a variable in a template)

2008-05-27 Thread Juanjo Conti
You should create an inclusion tag: http://www.djangoproject.com/documentation/templates_python/#inclusion-tags Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: design patterns

2008-05-23 Thread Juanjo Conti
t, id_prov=None): if id_prov: p = Provincia.objects.get(id=id_prov) data = serializers.serialize('json', p.localidad_set.all(), fields=('nombre')) return HttpResponse(data) else: return HttpResponse(str([])) -- Juanjo Conti --~--~-~--~~--

Re: class diagram from models.py

2008-05-23 Thread Juanjo Conti
R Diagram using MySQL Workbench. > First get your CREATE TABLE statements with: python manage.py sqlall. > Then, make your MySQL Workbench generate an ER Diagram with your > statements. > > []s > Diego Ucha > > > On 23 maio, 15:48, "Juanjo Conti" <[EMAIL PROTEC

Re: class diagram from models.py

2008-05-23 Thread Juanjo Conti
Thanks: http://code.google.com/p/django-command-extensions/ http://django-command-extensions.googlecode.com/svn/trunk/extensions/management/modelviz.py It'll check it out. -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you

class diagram from models.py

2008-05-22 Thread Juanjo Conti
Several times I tried to generate an UML class diagram from my python classes. I have used epydoc and the buil-in feature of SPE but the resulting diagram did not like me. Is there a way to generate an UML class diagram from models.py? a stanalone app or command? Thanks you, -- Juanjo Conti

Re: Authenticated user from models.py

2008-05-21 Thread Juanjo Conti
Thanks! http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser is what I was looking for. Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Authenticated user from models.py

2008-05-21 Thread Juanjo Conti
I can access the request from my views, but how can I acces the request from models.py? I am redefining a Model's save method. -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&q

Authenticated user from models.py

2008-05-21 Thread Juanjo Conti
I'd like to know which user has trigger the execution of some code in models.py. For example, while redefining the save method of some Model. How can I access this information from the code? -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message

Re: how to make two fields appear on a single line

2008-05-21 Thread Juanjo Conti
amar escribió: > HI, > I am developing a simple project on django and now i want to make two > text boxes appear on a single row, please help me What are your doing now? {{ form }}? Try {{ field.label_tag1 }}: {{ form.field1 }} {{ field.label_tag2 }}: {{ form.field2 }} Juanjo -- mi blog:

Re: do sessions work when redirecting?

2008-05-13 Thread Juanjo Conti
On Tue, May 13, 2008 at 7:04 PM, Mike Chambers <[EMAIL PROTECTED]> wrote: > > Anyone know why I cant store request.POST.copy() in the session? Not sure way, but I save it as a regular dict like this: request.session['POST'] = dict(request.POST.items()) Greets! --

Re: Pagination: how to find out on what page a give object will end up

2008-05-09 Thread Juanjo Conti
VidJa Hunter escribió: > > paginator.is_on_page(object) would return page 6 if object is element 31 of > the given queryset. > I am leaving right now, but, what about something like this? for page in paginator.page_range: if object in paginator.page(page).object_list:

Re: Reusable Web Controls

2008-05-06 Thread Juanjo Conti
Ben Firshman escribió: > I like to use the {% include %} tag along with {% with %} around the > include tag to pass variables to the template. I'm not sure if this is > the best way to do it, but it works well for me! You can define a inclusion tag for that. Juanjo -- mi blog:

Re: Reusable Web Controls

2008-05-06 Thread Juanjo Conti
[EMAIL PROTECTED] escribió: > There is the includes tag, or you can make a template tag. You can even create a inclusion template tag: http://www.djangoproject.com/documentation/templates_python/ I have created some. Feel free to ask if you need help to get started with them. Juanjo -- mi

Re: Tutorial: __str__() problems

2008-04-29 Thread Juanjo Conti
Try with this code: def __str__(self): return "testing" Does that work? -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: Queryset-refactor branch has been merged into trunk

2008-04-28 Thread Juanjo Conti
Malcolm Tredinnick escribió: > I merged queryset-refactor into trunk just now. This was changeset > r7477. Could you give me a url where new features are explained? Is this backwards compatible or should I svn up with care? Thanks Juanjo -- mi blog: http://www.juanjoconti.com.ar

Re: Django Names

2008-04-21 Thread Juanjo Conti
Not sure, but I think WordPress versions are named with jazz players. Greets. Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: A modeling/implementation quiz

2008-04-21 Thread Juanjo Conti
Kenneth Gonsalves escribió: > > On 21-Apr-08, at 8:15 PM, Michael wrote: > >> What about using the count() method on a filtered subset to get your >> id? >> >> Eg: >> p = People(type="S") >> p.id = People.objects.filter(type=p.type).count() + 1 > > I dont know what the context of this is,

Re: Widgets with an error class

2008-04-20 Thread Juanjo Conti
J. Pablo Fernández escribió: > No ideas on this? Hi! By default they are wrapped in ERROR MESSAGE. Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Admin page doesn't show calendar popup

2008-04-20 Thread Juanjo Conti
sinker escribió: > I checked it out on every browser I have installed on my machine > (incl. Firefox) ... no calendar on any of them. I'll try switching to > trunk. > I had no this problem in 0.96 running firefox on Ubuntu. Juanjo -- mi blog: http://www.juanjoconti.com.ar

Re: Custom form field overrides model attributes?

2008-04-20 Thread Juanjo Conti
Berco Beute escribió: > Using: Latest from trunk > > I'm using a custom widget for datetimefields: > BTW, which one are you using? The one that wrappers jscalendar? Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this

Re: DateTimeField calendar not showing

2008-04-20 Thread Juanjo Conti
chiefmoamba escribió: > Hi All, > > For some reason my DateTimeField is not showing a calendar next to the > 'DateTime' box in my view. My code from models.py is below. Can anyone > offer me any suggestions? I am using 0.96. You mean in the admin or in any other place? Juanjo -- mi blog:

Re: A modeling/implementation quiz

2008-04-19 Thread Juanjo Conti
andy baxter escribió: > Is there a strong reason why the count should depend on the type? Yes, I am creating a system for a real state business where this code schema is used for the different type of houses. Juanjo -- mi blog: http://www.juanjoconti.com.ar

A modeling/implementation quiz

2008-04-19 Thread Juanjo Conti
Hi all, I am worried about how to model the next scene (this is an example, but an appropriated one): In the model we have People, and there are different kind of people, let's say: Professors, Students and Other. Each People object has a 'type' attribute. Type can be P, S or O. So far, all

Re: Django en Dreahost

2008-04-18 Thread Juanjo Conti
Brett Parker escribió: > On 18 Apr 08:24, Kenneth Gonsalves wrote: >> >> On 18-Apr-08, at 5:01 AM, Juanjo Conti wrote: >> >>>>2. Download, Compile and install Python 2.5. DH default is 2.3 and >>>>2.4. >>> Why this? Does not Dj

Re: Django en Dreahost

2008-04-17 Thread Juanjo Conti
book4e escribió: > I've installed and run a django app on dreamhost without problem. I > recommend do the following things before install your django app. > >1. Install virtualenv to >create your own Python environment. >2. Download, Compile

Re: Django en Dreahost

2008-04-16 Thread Juanjo Conti
:( Is the one I have hired a time ago and I can't move easily. Is there a free hosting where I can try my django applications (not for production sites). Maybe someone here could let me some space anywhere, I am small and don't make noise :) Thanks, Juanjo -- mi blog:

Django en Dreahost

2008-04-15 Thread Juanjo Conti
Hi! I have followed this tutorial to install Djangono DreamHost, over sqlite: http://wiki.dreamhost.com/index.php/Django But when I reach the syncdb part i get this error: [squirt]$ python2.4 manage.py syncdb Traceback (most recent call last): File "manage.py", line 11, in ?

Re: django calendar for a datatime field

2008-04-15 Thread Juanjo Conti
Chris escribió: > Hello friends, > Is there a simple way to add the calendar widget (as seem in admin) > into a custom form field such as if I have a form with a date of birth > field? Yes! I am using this snippet that embeds jscalendar: http://www.djangosnippets.org/snippets/391/ Follow the

Re: Exception in template

2008-04-12 Thread Juanjo Conti
Perfect, I want the empty string :) I was just asking myself if I was forcing some extra processing. Seems not. Thanks both of you. Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Exception in template

2008-04-12 Thread Juanjo Conti
Suppose this template code: {% for a in list %} a.foo a.bar {% endfor %} The point is that only some elements of the "list" sequence have the "foo" attribute, so a exception is thrown, but the template engine silence it. Is may template code correct or some check should be done to

Re: Application Concepts

2008-04-11 Thread Juanjo Conti
jurian escribió: > Does anyone else think I should add a ticket request for this as a > future feature? I do. Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: customize forms

2008-03-26 Thread Juanjo Conti
Rocio Figueroa escribió: > 2008/3/26, Esteban Saavedra L. <[EMAIL PROTECTED]>: >> 2008/3/26, Rocio Figueroa <[EMAIL PROTECTED]>: >> >> > 2008/3/26, Esteban Saavedra L. <[EMAIL PROTECTED]>: >> > >> > > >> > > You could generate the form based on the model: >> > > >> > > UsuarioForm =

Re: Showing day in html but cannot check the day on django

2008-03-25 Thread Juanjo Conti
soe escribió: > Hi joe, >where can i search python date, I am beginner to django and python. > thank ur help, http://pleac.sourceforge.net/pleac_python/datesandtimes.html http://docs.python.org/lib/module-datetime.html Greets, Juanjo -- mi blog: http://www.juanjoconti.com.ar