Re: ManyToMany relationship

2015-08-23 Thread Carlos A. Carnero Delgado
El ago. 23, 2015 3:34 PM, "venkat" escribió: > > How can i overcome this?? > I think you should be using the related_name property in the ManyToMany fields of the model. Giving different names, of course, since that maybe the cause of your problems. It is documented, BTW.

Re: Running DJango with uWSGI with a user that has sudo access?

2015-06-14 Thread Carlos A. Carnero Delgado
> ... Should I try to use a user that is not a sudoer or does it not really matter? You should use the least privileged user you can. In the (unlikely or not) event of an exploit and the user can gain access to console, what can happen? Do you trust the system's configuration? I think that in a

Applying migrations to (non-interactive) production server

2014-10-02 Thread Carlos A. Carnero Delgado
Hi, I have succesfully upgraded an application to 1.7, and the time has come to apply a migration. In my development environment this is, as expected, a non issue; however, this particular application is hosted in a server where I'm not allowed to run interactive commands. This means that

Re: size of an image

2011-01-24 Thread Carlos A. Carnero Delgado
Hi, On Mon, Jan 24, 2011 at 3:09 PM, refreegrata wrote: > hello list, I have a question. How can I get the width and the size of > an image previously saved?... is the image a field in a model? AKA, ImageField. If that's the case, what's wrong with the width and height

Re: auto populating primary key

2009-09-06 Thread Carlos A. Carnero Delgado
Hi, On Sun, Sep 6, 2009 at 6:53 AM, ThinRhino wrote: > This is my first post to the group and comparatively new to django. Welcome! > In my models, I have a primary key field. This primary key, will be used > like a transaction id. > > I want to create it based on the data

Re: How to run a static html page as a section of django website?

2009-08-20 Thread Carlos A. Carnero Delgado
Hi, On Thu, Aug 20, 2009 at 4:42 PM, Bins wrote: > > I've a django powered blog, say http://example.com. I desire to make a > section http://example.com/htmlpage/ and run a simple static html page > at the url. > > How to I do it? *maybe* direct_to_template will help? More

Re: Question about request.user

2009-08-10 Thread Carlos A. Carnero Delgado
Hi, On Mon, Aug 10, 2009 at 4:46 PM, David wrote: > Why request.user.username did not bind to "john" in this scenario? > Anybody knows what caused such a problem? And any ideas how to fix > it? Are you using the same web browser? Maybe two tabs? HTH, Carlos.

Re: Database connection closed after each request?

2009-07-23 Thread Carlos A. Carnero Delgado
Hi, On Thu, Jul 23, 2009 at 5:24 PM, Glenn Maynard wrote: > Why is each thread's database connection closed after each request? I believe that this is related to Django's shared-nothing-by-default approach. HTH, Carlos. --~--~-~--~~~---~--~~ You

OT: running custom management command from cron & Unicode output error

2009-06-06 Thread Carlos A. Carnero Delgado
Hi there! I'm having a problem with a custom management command. Running interactively on the console will work perfectly, merrily printing its output in Unicode (I need that; accented characters among other things). But, if I put that command in a cron job, it will fail with

Re: Unintended date to Unicode string conversion

2009-05-23 Thread Carlos A. Carnero Delgado
Hi, On Sat, May 23, 2009 at 1:22 PM, Karen Tracey wrote: > On Sat, May 23, 2009 at 1:05 PM, Alex Gaynor wrote: >> >> For what it's worth, neither I, nor anyone else, have ever seen the issue >> on a non-Windows platform.  However, I seem to recall

Re: Unintended date to Unicode string conversion

2009-05-23 Thread Carlos A. Carnero Delgado
Hi, On Sat, May 23, 2009 at 12:54 PM, Alex Gaynor wrote: > There was a bug like this seen when aggregates were first added that no one > was ever able to figure out.  If you search django-developers you'll see the > discussions of this, it was only ever seen on Windows

Unintended date to Unicode string conversion

2009-05-23 Thread Carlos A. Carnero Delgado
Hello, I'm having a little problem that's making my head hurt. I'm getting an unintended date to string conversion in my application. >>> import django >>> django.VERSION (1, 1, 0, 'beta', 1) >>> import djtest.settings >>> djtest.settings.DATABASE_ENGINE 'sqlite3' Obviously, djtest

Aggregation of field properties?

2009-05-13 Thread Carlos A. Carnero Delgado
Hello, I'm trying to get an aggregate to work. These are the (abridged) domain objects: class Site(models.Model): name = models.CharField(max_length=512) class Archive(models.Model): site = models.ForeignKey(Site) file_system_object = models.FileField(upload_to='.')

Re: FileField uploading into an user-specific path

2009-04-28 Thread Carlos A. Carnero Delgado
Oops, too quick to press reply :o On Tue, Apr 28, 2009 at 11:53 PM, Carlos A. Carnero Delgado > destination_file = open('somewhere based on the user', 'wb+') >  for chunk in request.FILES['audio_file'].chunks(): >      destination_file.write(chunk) >  destination_file.close() with

Re: FileField uploading into an user-specific path

2009-04-28 Thread Carlos A. Carnero Delgado
Hello, 2009/4/28 Julián C. Pérez : > > anyone?? > how can i make that happen?? What's wrong with having something like the following in the view that processes the form? destination_file = open('somewhere based on the user', 'wb+') for chunk in

Re: Moving a Django project to another directory/server

2009-03-14 Thread Carlos A. Carnero Delgado
Hello, what follows is NOT a solution to your needs, but I wanted to chime in with a workflow that has proved effective to my three-developers team. We have two "environments": developer and production. Each developer has, in their respective home directory (be that Windows or Linux,) a file

Re: Accessing django app that is start with FCGI

2009-03-13 Thread Carlos A. Carnero Delgado
> I think I kinda understand the way it works now. I can see that I > require a mysite.fcgi. How does that file look like? It is not written > in the docs You could try http://cleverdevil.org/computing/24/python-fastcgi-wsgi-and-lighttpd although I've had more luck with

Re: Where to put jquery/dojo js files

2009-03-08 Thread Carlos A. Carnero Delgado
Hi there, On Sun, Mar 8, 2009 at 2:32 PM, raj wrote: > This causes a js error, stating no dojo is defined. Similar error is > raised for jquery also. What went wrong with the above code? Have you looked at

Re: Django And os.path Behavior

2008-12-05 Thread Carlos A. Carnero Delgado
Hello, > The path in this demo contains "El Camarón de la Isla", where the > accent character is the trouble maker. Can you post your music.models? Best regards, Carlos. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google