Re: php fsockopen equivalent in Django

2007-09-09 Thread Brett Parker
On Mon, Sep 10, 2007 at 12:13:58AM -0500, James Bennett wrote: > > On 9/9/07, Arnold Chen <[EMAIL PROTECTED]> wrote: > > I am writing an application that require "silent" post of data to a > > specific URL. I know that is a function fsockopen in PHP which can > > achieve this, and i am looking fo

Re: choices/ and getting rid of the dashes?

2007-09-09 Thread Ryan
Use initial when calling your form class. formClass = forms.form_for_model(Person) form = formClass(initial={'gender': 'm'}) On Sep 6, 4:31 pm, Mark Green <[EMAIL PROTECTED]> wrote: > Hi all, > > This is my model: > > class Person(models.Model): > GENDER_CHOICES = ( > ( 'm', 'Male' )

Can u help me how to configure MOD_PYTHON am new one to django

2007-09-09 Thread Damodhar
hi I,am new one to django, I am very intrst to learn Django, so i install python latest verson, and try to install daango latest verson but it want;s's to configure .. mod_python module , can u help me am using WINDOWS XP SYSTEM now am working in PHP MYSQL USING XAMPLITE (APACHE +PHP + MYSQL Pa

Re: mod_python, multiple django-sites, memory usage

2007-09-09 Thread Damodhar
hi I,am new one to django, I am very intrst to learn Django, so i install python latest verson, and try to install daango latest verson but it want;s's to configure .. mod_python module , can u help me am using WINDOWS XP SYSTEM now am working in PHP MYSQL USING XAMPLITE (APACHE +PHP + MYSQL Pa

Newbie (Before I get started)

2007-09-09 Thread tmb
I've spent a few days Googling and searching this group for some guidance on a few newbie issues. I apologize in advance if these things have already been covered to death. I am basically trying to decide where to put my focus in the next project or two: Rails or Django. Haha, yeah I know... :) M

Re: Performance for django for years

2007-09-09 Thread Greg Donald
On Sun, 9 Sep 2007, Xan wrote: > Well, first of all, thank you for django. I'm not programmer and I > just wanted to code some web app easier as I can do. I tried rails but > there is no free documentation (almost all doc are books and books) I wasn't charged anything before being allowed to acce

Re: php fsockopen equivalent in Django

2007-09-09 Thread Arnold Chen
How come i don't remember using the python socket ? thanks James On Sep 10, 1:13 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 9/9/07, Arnold Chen <[EMAIL PROTECTED]> wrote: > > > I am writing an application that require "silent" post of data to a > > specific URL. I know that is a function

Re: php fsockopen equivalent in Django

2007-09-09 Thread James Bennett
On 9/9/07, Arnold Chen <[EMAIL PROTECTED]> wrote: > I am writing an application that require "silent" post of data to a > specific URL. I know that is a function fsockopen in PHP which can > achieve this, and i am looking for function in Django like that. http://docs.python.org/lib/module-socket.

php fsockopen equivalent in Django

2007-09-09 Thread Arnold Chen
Dear All, I am writing an application that require "silent" post of data to a specific URL. I know that is a function fsockopen in PHP which can achieve this, and i am looking for function in Django like that. fsockopen is used to Open Internet or Unix domain socket connection. and you can post

Re: Custom_SQL_Method in a Model

2007-09-09 Thread Iapain
You have written a member function to your class, its going to work like charm. But mind it your *baz* doesnt exist in class so you should pass it into your member function. Alternatively see Django custom managers. On Sep 10, 12:27 am, johnny <[EMAIL PROTECTED]> wrote: > I need to define custom

Re: Django Flatpages With Memcache as storage location

2007-09-09 Thread Brian Morton
What happens if you use a simple or dummy cache? On Sep 9, 2:51 pm, Sasha Weberov <[EMAIL PROTECTED]> wrote: > On Sep 9, 6:15 am, Thomas Badran <[EMAIL PROTECTED]> wrote: > > > > > My best guess would be that you are missing the / at the start and end > > of the url > > > Tom > > > On Sat, 2007-0

What's going on with Row Level Permissions?

2007-09-09 Thread djworth
I have been trying to figure out what the current status is of the RLP branch. Does anyone know? It seems dead or have I missed something? I'm going to need RLP in my project but I'm not sure if I need to implement it or if it's already done/almost done. What is everyone else doing about RLP?

Re: Django deployment à lá Capistrano

2007-09-09 Thread qwerty
Well, I'm interesed in the project and as first idea from the bainstrom is the name: Capistrano's url is http://www.capify.org/, why can we call it capipy, the py at the end is a clasic (tm) of projects coded in Python. Another good idea is to review the concept of the tool to draw what it should

Re: ifequal template tag quirks

2007-09-09 Thread Russell Keith-Magee
On 9/10/07, sagi s <[EMAIL PROTECTED]> wrote: > > I tried to compare user ids in a template almost exactly like the > example in the docs: > > {% ifequal user_id copy.checkout.user.id %} > > however, it seems like user_id (a context variable I'm passing) is a > string and the other id that com

WELCOME TO HITS2U

2007-09-09 Thread International Marketing
Hi, Submit your web site for FREE and be exposed to potentially TENS of THOUSANDS of new and unique visitors!! Click for more information ; http://www.hits2u.com/?428901 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Django deployment à lá Capistrano

2007-09-09 Thread Chris Hoeppner
Hi there, This is just to make it a bit more obvious. I've decided to make up a python application similar to Capistrano, for Django. I plan it to be similar in the sense of "it uses the same goal, and a few same ideas", and it's not going to be a port of Capistrano to Python. I've called this p

Re: Custom_SQL_Method in a Model

2007-09-09 Thread canen
I don't think it matters much. Depends on how large your models.py is. Just remember to add the new manager as part of the model. On Sep 9, 4:35 pm, johnny <[EMAIL PROTECTED]> wrote: > you create class called PersonManager(models.Manager) and define > my_custom_sql inside there. Do you place thi

Re: Capisdjango

2007-09-09 Thread qwerty
I know this isn't capistriano but there is a work already in pythonpaste for django: http://pythonpaste.org/djangopaste/ Maybe instead of work in something new that can be fixed/finished =) 2007/9/9, Andrey Khavryuchenko <[EMAIL PROTECTED]>: > > > Chris, > > CH> Sure. Anyone to join me? > > Show

Re: Custom_SQL_Method in a Model

2007-09-09 Thread johnny
you create class called PersonManager(models.Manager) and define my_custom_sql inside there. Do you place this class in the same models.py or in a separate file called apps/people/manager.py and then import it where ever you need it? What is the best practice? --~--~-~--~~-

Re: Capisdjango

2007-09-09 Thread Andrey Khavryuchenko
Chris, CH> Sure. Anyone to join me? Show me a code and I'll join, since have a nagging need for such tool. -- Andrey V Khavryuchenko Django NewGate - http://www.kds.com.ua/djiggit/ Development - http://www.kds.com.ua Call akhavr1975 on www.gizmoproject.com --~--~-~--~--

ifequal template tag quirks

2007-09-09 Thread sagi s
I tried to compare user ids in a template almost exactly like the example in the docs: {% ifequal user_id copy.checkout.user.id %} however, it seems like user_id (a context variable I'm passing) is a string and the other id that comes from the model is a long so the comparison always fails.

Re: Capisdjango

2007-09-09 Thread Jon Atkinson
Sure :-) On 9/8/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > > Sure. Anyone to join me? > > El s�b, 08-09-2007 a las 07:32 -0500, James Bennett escribi�: > > On 9/8/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > > > Why hasn't anyone thought of something like capistrano for django. (Yeah > > >

Custom_SQL_Method in a Model

2007-09-09 Thread johnny
I need to define custom sql for a model, so it is only accessible by model class but not by model instances. Where do I define is my_custom_sql, like below, inside the Person class (my guess is not, if need to access my_custom_sql, then I need to instantiate Person.): class Person(models.Model):

Re: Performance for django for years

2007-09-09 Thread Tim Chase
> Well, secondly I have one question: I have a model A that have a field > "year" that means the year that A was made. I just want to know if > it's best (for performance) to code as: > > class A(models.Model): > year = models.CharField(maxlength=4) > [...] > > or > class A(models.Model): >

Re: Objects.filter only on minutes range

2007-09-09 Thread Doug B
I was curious, so I took a look at how django does the year/day/month selects. They use a backend specific lookup. This is how you could do it using postgres. em.LoggedEvent.objects.filter().extra(where=['extract(MINUTE from event_loggedevent.when) < 20']) SQLite doesn't support extract, so dj

Performance for django for years

2007-09-09 Thread Xan
Hi, Well, first of all, thank you for django. I'm not programmer and I just wanted to code some web app easier as I can do. I tried rails but there is no free documentation (almost all doc are books and books) and there is no have easy way for writing models. With django I found the easier way fo

Re: Django Flatpages With Memcache as storage location

2007-09-09 Thread Sasha Weberov
On Sep 9, 6:15 am, Thomas Badran <[EMAIL PROTECTED]> wrote: > My best guess would be that you are missing the / at the start and end > of the url > > Tom > > > > On Sat, 2007-09-08 at 21:00 -0700, Sasha Weberov wrote: > > All of my flatpage pages throw a 404. If I turn debug on which > > disable

Login issues

2007-09-09 Thread MikeHowarth
Hi guys Was wondering if anyone knew of any bugs within the user authentication system associated to setting the backend attribute? Basically looking at the traceback the user object expects a attribute 'backend' to be set within however this doesn not seem to be set. Traceback: Traceback (mos

Debugging ?e=1 on admin search

2007-09-09 Thread Ariel Mauricio Nunez Gomez
Hi, recently i have been having problems with django-admin search on some models. (Searching in a django.contrib model like auth.User works flawlessly. But when I try other models (Integer and Charfields with some foreign keys) nothing happes after i click the search button, and the error "?e=1" s

Objects.filter only on minutes range

2007-09-09 Thread johnny
If I use a filter, how do retrieve pub_date falls between certain minutes (0 <= pub_date_minutes < 20 minutes, 20minutes <= pub_date_minutes < 40 minutes, so on) I looked at an example on django site: Entry.objects.filter( headline__startswith='What').exclude( pub_date__gte=datetime

... object has no attribute '_clone'

2007-09-09 Thread patrickk
what exactly does this error-message means? I had this a couple of times lately, esp. with using custom managers and generic views & pagination. thanks, patrick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Re: Django Book

2007-09-09 Thread Griffin Caprio
Right, but the question wasn't really answered. That thread was from may and it talks about the book being published in June. I was wondering if the question raised in the thread ( the book being aligned w/ Django 1.0 ) was ever answered. Griffin On Sep 7, 2007, at 7:17 PM, James Benne

Re: client.login() returns false

2007-09-09 Thread Anderson Santos
I knew that it was something stupid =P Thanks a lot =) On 9 set, 11:07, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 9/9/07, Anderson Santos <[EMAIL PROTECTED]> wrote: > > > > > Hello, I am trying to do a basic test authentication but I am unable > > to get it working. I made some ch

sql_custom

2007-09-09 Thread apacheco
Hello people! I'm new in django, I've checked out geo-django and after fighting a lot to resolve an annoying little geos problem in debian (ln -s /usr/lib/libstdc++.so.6 / usr/lib/libstdc++.so) :( I could reach the testing point of geo-django and I've noticed this executing ./manage.py sqlall myge

Re: client.login() returns false

2007-09-09 Thread Russell Keith-Magee
On 9/9/07, Anderson Santos <[EMAIL PROTECTED]> wrote: > > Hello, I am trying to do a basic test authentication but I am unable > to get it working. I made some changes to be sure that the user has > been created, here's my testcase: ... > user = > User(username='teste',password='teste',ema

CREATIVE WRITING

2007-09-09 Thread shamsee26
*Creative Writing Skill is not heriditary. We may learn it. * *Creative Writing* * * *http://www.100stuff.com/sdk/creative-writing/* -- --~--~-~--~~--

Re: unicode upgrade breaks non-ascii content

2007-09-09 Thread Anderson Santos
I had to work on my old website again to fix it, since even doing iconv on my files and database didn't converted well. It was a pain, and sometimes I get unicode error on my django app. I wish it could be more easy (or less painy) to migrate apps. =) On 8 set, 06:25, Kenneth Gonsalves <[EMAIL

client.login() returns false

2007-09-09 Thread Anderson Santos
Hello, I am trying to do a basic test authentication but I am unable to get it working. I made some changes to be sure that the user has been created, here's my testcase: from django.contrib.auth.models import User class StoreTest(TestCase): def setUp(self): from basecommerce.apps.st

Re: Django Flatpages With Memcache as storage location

2007-09-09 Thread Thomas Badran
My best guess would be that you are missing the / at the start and end of the url Tom On Sat, 2007-09-08 at 21:00 -0700, Sasha Weberov wrote: > All of my flatpage pages throw a 404. If I turn debug on which > disabled cacheing they re-appear. I've tried restarting memcached and > my SCGI server