Re: Best solution to this problem?

2010-04-07 Thread Marcos Marín
Personally I like 2 best, it seems more flexible in case you later decide to show different kinds of links or other information (like a note that says the profile is viewable only to friends, etc.) On Wed, Apr 7, 2010 at 14:02, mtnpaul wrote: > I have a logged in user. The user does a search for

Re: PK and FK questions

2010-04-07 Thread Marcos Marín
Hi, I'm not too experienced with django myself so I will let someone else answer the rest of your questions. But for 2, wouldn't it be fairly simple to create primary keys for these tables? worst case scenario you just add a column that is a auto_incremented int and run a script to set it for exist

Re: Problems with model with optional FileField in Admin

2010-04-06 Thread Marcos Marín
Yes, sorry for not mentioning it. On Tue, Apr 6, 2010 at 08:12, Walt wrote: > Did you also specify null=True? > > > Walt > > -~ > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegro

Re: Error when doing the tutorial

2010-04-05 Thread Marcos Marín
Make sure you have installed MySQLdb http://sourceforge.net/projects/mysql-python/ On Mon, Apr 5, 2010 at 21:31, John wrote: > Hello all, > > I am new to django and am doing the tutorial and when I run the > command below I get the following error. > > Does anyone know how to solve this? > > E:

Problems with model with optional FileField in Admin

2010-04-05 Thread Marcos Marín
Hi, So I have a site where I want the client to be able to add/remove links from a menu on the site through the admin site. Usually these links are to files on the server but not always. So I created a Link model which has a name, file and url field. The plan here is that if a file is given it's u

Re: File in admin with TabularInline don't get uploaded

2009-12-02 Thread Marcos Marín
Please disregard this message. It was a dumb mistake on my part and I found it. On Wed, Dec 2, 2009 at 16:08, Marcos Marín wrote: > Hi, > > I have a site where you can create news items that can have attached files. > I'm using TabularInline so the the admin interface shows

File in admin with TabularInline don't get uploaded

2009-12-02 Thread Marcos Marín
Hi, I have a site where you can create news items that can have attached files. I'm using TabularInline so the the admin interface shows attached files in the same view where you create the news items. When I create a new news item and attach files it gives no errors, but the file isn't actually

Re: Modulo not working in query using extra() to define specific where

2009-11-30 Thread Marcos Marín
esired result. Looks like an issue with python string formatting. > > Alternatively, you could try `print Semestre.objects.extra(where=['num %% 2 > = 0']).query` to see what it's trying to execute on the database itself, > which may help you track down your problem. >

Modulo not working in query using extra() to define specific where

2009-11-30 Thread Marcos Marín
Hi, I'm trying to do a query where I select all rows where a field is divisible by 2. In pure SQL this is what I want: select * from contenido_semestre where num % 2 = 0; which works fine. When trying to do it with Django I do Semestre.objects.extra(where=['num % 2 = 0']) But this gets me an empty

Re: mp3 converstion

2009-03-31 Thread Marcos Marín
I'm not sure I understand the problem but I doubt it is a format problem. I think maybe the server does not have permission to write in the folder you are trying to save files too. On Tue, Mar 31, 2009 at 18:44, oregon10 wrote: > > DISCLAMER: I'm not a program - only an end user and part-time ad

Re: overriding the UserChangeForm

2009-03-31 Thread Marcos Marín
ue, Mar 31, 2009 at 17:51, Malcolm Tredinnick wrote: > > On Tue, 2009-03-31 at 16:50 -0600, Marcos Marín wrote: > > I have overridden the user change form, I only want to have the email > > field however the username field seems to always appear no matter > > what. Is this a bu

overriding the UserChangeForm

2009-03-31 Thread Marcos Marín
I have overridden the user change form, I only want to have the email field however the username field seems to always appear no matter what. Is this a bug or by design? I'm using the beta. class EstudianteForm(UserChangeForm): class Meta(UserChangeForm.Meta): fields = ( 'e