Re: python list to string conversion

2008-09-01 Thread Valts Mazurs
yourList = ['1','2','3','4'] stringForQuery = ','.join(yourList) Regards, Valts. On Mon, Sep 1, 2008 at 4:30 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > Hi all. > > > I have a simple list such as: > ['1','2','3','4'] > > I need to convert this to a string such as: > 1,2,3,4 > > so that I ca

Re: python list to string conversion

2008-09-01 Thread Valts Mazurs
Hello, "selItems" is not the same as "selitems". Probably you have mixed the name of the field that you are looking for in the forst row. Valts. On Mon, Sep 1, 2008 at 4:44 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > > On Sep 1, 9:34 am, "

Re: Different __unicode__ return values for admin site?

2008-09-01 Thread Valts Mazurs
Hello, I guess that you want to have more details in admin list view. You can use list_display configuration attribute in admin class for your model. << models.py >> class MyModel(models.Model): short_name = models.CharField(max_length = 20) full_name = models.CharField(max_length = 100) de

Re: python list to string conversion

2008-09-01 Thread Valts Mazurs
Hello, So, which exact line raises the error? Valts. On Mon, Sep 1, 2008 at 4:52 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > On Sep 1, 9:47 am, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > > Hello, > > > > "selItems" is not the same

Re: lighttpd matters - setup

2008-09-10 Thread Valts Mazurs
Hi, Take a look at lighttpd's error log (see server.errorlog setting in lighttpd config file for exact error log location) Valts. On Wed, Sep 10, 2008 at 10:49 PM, wishi <[EMAIL PROTECTED]> wrote: > > Hi mates ;) > > These days I thought working myself into Django - to get some new > skills. I

Re: lighttpd matters - setup

2008-09-11 Thread Valts Mazurs
ailed: Connection refused socket: tcp:127.0.0.1:9090 > 2008-09-10 21:52:40: (mod_fastcgi.c.2667) fcgi-server re-enabled: > tcp:127.0.0.1:9090 > > > - Because at 9090 locally there's the django fcgi, which doesn't seem to > run. > What would be very helpful: a howto o

Re: fastCGI: always one server per site ?

2008-10-13 Thread Valts Mazurs
On Mon, Oct 13, 2008 at 3:33 PM, xavier dutoit <[EMAIL PROTECTED]> wrote: > > And on your config, you got each fastcgi running under a different > user too ? > I don't really need it but it is trivial with use of sudo. I use sudo to run all fcgi processes as the same user. If I would be less lazy

Re: fastCGI: always one server per site ?

2008-10-13 Thread Valts Mazurs
On Mon, Oct 13, 2008 at 12:15 PM, xavier dutoit <[EMAIL PROTECTED]> wrote: > Thanks for your reply. I do already run php under fcgi (as separated > server, as you point out). But the main difference is that this pool > of fcgi php processes (or thread, not sure) are available to all the > sites I

Re: fastCGI: always one server per site ?

2008-10-13 Thread Valts Mazurs
Hello, FastCGI works a little bit different than mod_python. FastCGI server is a separate process from web server. You can have multiple FastCGI servers and one web server that communicates to FastCGI servers. Use virtual hosts or whatever else settings in web server configuration to route traffic

Re: fastCGI: always one server per site ?

2008-10-13 Thread Valts Mazurs
On Tue, Oct 14, 2008 at 8:15 AM, Graham Dumpleton < [EMAIL PROTECTED]> wrote: > Dynamically loadable shared libraries even though loaded by > independent process instances will be mapped only once by operating > system. Thanks for the explanation. Valts. --~--~-~--~~~--

Re: Python package names

2008-11-03 Thread Valts Mazurs
Usually Django applications are specific to Django and are not really usable outside Django. That's why seeing "tagging" in my site-packages directory might confuse me as I could think that this package supports some general tagging. Valts. On Mon, Nov 3, 2008 at 3:51 PM, James Bennett <[EMAIL PR

Re: Python package names

2008-11-03 Thread Valts Mazurs
Sure, I also keep django apps outside site-packages directory but it is not really the same level of convenience :) Valts. On Mon, Nov 3, 2008 at 4:07 PM, Jonathan Buchanan < [EMAIL PROTECTED]> wrote: > > On Mon, Nov 3, 2008 at 1:59 PM, Valts Mazurs <[EMAIL PROTECTED]> wrote:

Re: simple reverse( ) errors

2008-11-23 Thread Valts Mazurs
Hello, Quick solution: use redirect from "/" to "/blog" or vice versa. -- Valts On Sun, Nov 23, 2008 at 19:16, goblue0311 <[EMAIL PROTECTED]> wrote: > > This post is an update to "NoReverseMatch question", which was an epic > fail in terms of resolving my issue. I blame myself for posting an >

Re: simple reverse( ) errors

2008-11-23 Thread Valts Mazurs
(r'^blog/', include('basicBlog.blog.urls')), ... ) -- Valts On Sun, Nov 23, 2008 at 20:29, goblue0311 <[EMAIL PROTECTED]> wrote: > > I'm not sure I understand what you're suggesting - can you provide a > brief example, or highlight the s

Appengine Admin

2008-11-26 Thread Valts Mazurs
s and what their needs are. Project page: http://code.google.com/p/appengine-admin/ Best regards, -- Valts Mazurs --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Best way to create a for a subset of a model

2008-12-07 Thread Valts Mazurs
Hello, Please take a closer look at ModelForm documentation: http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#using-a-subset-of-fields-on-the-form Best regards, -- Valts On Sun, Dec 7, 2008 at 15:46, Peter <[EMAIL PROTECTED]> wrote: > > Say I have model with many fields but I want

Re: Import models from CSV files?

2009-01-06 Thread Valts Mazurs
Hello, Maybe this app could be helpful for you: http://code.google.com/p/django-batchimport/ If you have to import lots of data I would suggest creating python script that reads the files and inserts the data in database either using Django ORM or plain SQL. In case of hundreds of thousands of ro

Re: autodiscover not being called? why?

2009-01-06 Thread Valts Mazurs
1. Check your settings.py if it uses the correct urls.py file. Actually at first check if the correct settings.py is being used 2. Remove .pyc and pyo files from your project's directory to be sure that python interpreter really takes into account changes in source files. Regards, -- Valts On Tu

Re: autodiscover not being called? why?

2009-01-07 Thread Valts Mazurs
Check the output of: import sys print sys.modules['admin'] -- Valts On Tue, Jan 6, 2009 at 20:06, bongo wrote: > > > > In your application directory, the one created by manage.py startapp, > same > > as where models.py is. > > Thanks. > > Thats what I thought I should put it. This is getting

Re: Import models from CSV files?

2009-01-07 Thread Valts Mazurs
stuff go? Is it easier to do it via raw SQL, > or via the django models? Any chance of sample code =)? > > Cheers, > Victor > > On Jan 6, 7:05 pm, "Valts Mazurs" wrote: > > Hello, > > > > Maybe this app could be helpful for you: > http://code.google.

Re: HTTPS, Django

2008-04-16 Thread Valts Mazurs
Hi, Only Apache should be enough. Best regards, Valts. On Wed, Apr 16, 2008 at 12:22 PM, Monica Leko <[EMAIL PROTECTED]> wrote: > > Hi > > Do I need to configure Django for HTTPS, or this is only relevant to > server (Apache)? > > > > --~--~-~--~~~---~--~~ You

Re: Memory Usage on a VPS

2008-04-18 Thread Valts Mazurs
Definitely turn off DEBUG mode :) When DEBUG mode is on all SQL queries remain in memory. Best regards, Valts. On Fri, Apr 18, 2008 at 12:58 AM, Tim Sawyer <[EMAIL PROTECTED]> wrote: > > Hi Folks, > > I'm having trouble with Apache/Django memory usage on a Virtual Private > Server. I only have

Re: Confusion over new users and admin pages

2008-04-24 Thread Valts Mazurs
Hi, AFAIK both flags have to be set to true to allow user to log into admin interface. Regards, Valts On Thu, Apr 24, 2008 at 3:15 PM, LaundroMat <[EMAIL PROTECTED]> wrote: > > Hi, > > When creating a new user, is_active is automatically set to True. The > django docs say this means "Designates

Re: Gradually porting an established site to Django

2008-05-08 Thread Valts Mazurs
Hi, Nick, I would recommend to use webserver tools to route the traffic to different handlers. For example, to handle legacy URLs for bsdradius.org I use mod_redirect in lighttpd: - # legacy urls url.redirect = ( "index\.php$" => "/", "about\.php$" => "/about/",

Re: Getting back to the same page after completing a task in another page

2008-05-12 Thread Valts Mazurs
On Mon, May 12, 2008 at 4:13 PM, M.Ganesh <[EMAIL PROTECTED]> wrote: > > Thanks Ronny for your response, however this doesn't answer my > requirement. Probably I've to state my requirement more clearly. I have > various pages for general viewing where authentication is not required. > But if a us

Re: which python version?

2008-05-15 Thread Valts Mazurs
Latest stable Python version. Currently it is Python 2.5.2 Regards, Valts. On Thu, May 15, 2008 at 6:03 PM, bcurtu <[EMAIL PROTECTED]> wrote: > > Which python version do you use with your django project? Any special > issue with anyone? > > Cheers. > > > --~--~-~--~~~---

Re: Django and Linux distros

2008-05-16 Thread Valts Mazurs
Ubuntu for desktop. FreeBSD and OpenBSD for production server. Regards, Valts. On Fri, May 16, 2008 at 3:59 PM, Almir Karic <[EMAIL PROTECTED]> wrote: > > On Fri, May 16, 2008 at 12:24 PM, JonSidnell <[EMAIL PROTECTED]> wrote: > > What works for you? > > debian & vim, tho i'm considering switchi

Re: why my django site doesn't create .pyc file?

2008-06-09 Thread Valts Mazurs
Hello, Check if web server process has enough privileges to write in the directories containing .py files. Regards, Valts. On Mon, Jun 9, 2008 at 1:25 PM, pength <[EMAIL PROTECTED]> wrote: > > I have justed built my site on slicehost. Alhough my site is running > properly, I found if I update a

Re: Thanks!!!!!!!!!!!!!!!!!

2008-06-20 Thread Valts Mazurs
Sure, me too :) On Fri, Jun 20, 2008 at 1:32 PM, chris vigelius <[EMAIL PROTECTED]<[EMAIL PROTECTED]>> wrote: > > me2... > > Am Freitag, 20. Juni 2008 05:50:13 schrieb Juan Hernandez: > > me 2 :D > > > > On Fri, Jun 20, 2008 at 10:42 PM, k0001 <[EMAIL PROTECTED]> wrote: > > > Can I jump into the

Re: psycopg2

2008-06-26 Thread Valts Mazurs
Hi, Everything is about buying and selling something. If I work in software development company, use python, postgresql and want to use psycopg2 - nice web page helps in "selling" the idea of using psycpg2 to my boss. Of course, nice website is not the only important thing but it helps a lot. Peop