Re: الى من يريد مشاركتي معي في الموقع

2008-07-01 Thread Karen Tracey
On Wed, Jul 2, 2008 at 12:15 AM, Torsten Bronger < [EMAIL PROTECTED]> wrote: > I was moderated (because my first posting), and even worse, couldn't > post through Gmane without being on the list, which was *very* > awkward, and then they have spam here nevertheless? > If you don't want your

MySQL-python-1.2.2 - build errors

2008-07-01 Thread [EMAIL PROTECTED]
Hello, I've been having quite a few problems building MySQL-python-1.2.2. Most recently I'm getting these errors when trying to build: python setup.py build running build running build_py creating build creating build/lib.macosx-10.3-i386-2.5 copying _mysql_exceptions.py ->

Client testing with custom http request referrer

2008-07-01 Thread Rob P
I am writing an application that tracks URLs and stores different information about them (ie URL, referrer, user agent, etc...). Currently I am writing unit tests for it and I need to be able to spoof the referrer to test functionality (I only want to log specific referrers). Is there anyway I

Re: CheckboxInput unchecked at formload

2008-07-01 Thread roj
what if you make default true for that form field. Cheers! Django Errors, Django Tutorials, Django Blog http://django.freelancernepal.com On Jul 1, 5:37 pm, Brian Luft <[EMAIL PROTECTED]> wrote: > Yes there is a way :) > > However, in order for us to help you, it will probably be necessary

Re: الى من يريد مشاركتي معي في الموقع

2008-07-01 Thread Torsten Bronger
Hallöchen! bhunter writes: > On Jul 1, 11:40 pm, "Juan Hernandez" <[EMAIL PROTECTED]> wrote: >> im my lil' town this is called SPM :D > > That's why it's not relevant. :) I was moderated (because my first posting), and even worse, couldn't post through Gmane without being on the list,

Re: Tag arguments rendering

2008-07-01 Thread Malcolm Tredinnick
On Tue, 2008-07-01 at 20:44 -0700, Yosifov Pavel wrote: > I made own tags. Sometimes I want to "rendering" arguments (when > arguments of the tag are Django-template-expressions). So, I use > template.render() method. All is OK but it's look like this: > > {% some_tag {{var}} %} You can put

Tag arguments rendering

2008-07-01 Thread Yosifov Pavel
I made own tags. Sometimes I want to "rendering" arguments (when arguments of the tag are Django-template-expressions). So, I use template.render() method. All is OK but it's look like this: {% some_tag {{var}} %} but in built-in tags this is usually without {{..}}: {% builtin_tag var %} What

Re: الى من يريد مشاركتي معي في الموقع

2008-07-01 Thread bhunter
On Jul 1, 11:40 pm, "Juan Hernandez" <[EMAIL PROTECTED]> wrote: > im my lil' town this is called SPM :D That's why it's not relevant. :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: الى من يريد مشاركتي معي في الموقع

2008-07-01 Thread Juan Hernandez
im my lil' town this is called SPM :D 2008/7/2 bhunter <[EMAIL PROTECTED]>: > > > On Jul 1, 8:30 pm, GLOBAL705 <[EMAIL PROTECTED]> wrote: > > السلام عليكم > > اما بعد اريد ان الفت انتباهكم الى انة مجموعة كلوبال705 افتتحة موقع من > > محرك

Re: الى من يريد مشاركتي معي في الموقع

2008-07-01 Thread bhunter
On Jul 1, 8:30 pm, GLOBAL705 <[EMAIL PROTECTED]> wrote: >                                                       السلام عليكم > اما بعد اريد ان الفت انتباهكم الى انة مجموعة كلوبال705 افتتحة موقع من > محرك كوكل وهو موقع من تاسيس كوكل بيج فاذا ارادة احدا سواء انثى ام ذكر > ان ياتي معي الى الموقع

Re: unique_together and null=True fields

2008-07-01 Thread Malcolm Tredinnick
On Tue, 2008-07-01 at 23:10 -0400, Wanrong Lin wrote: > Hi, > > This topic has been discussed before here: > http://groups.google.com/group/django-users/browse_thread/thread/fcd04f766b101a95/b65b70aa6b03729e?lnk=gst=unique_together%2C+null# > > Don't you agree that two field combinations like

unique_together and null=True fields

2008-07-01 Thread Wanrong Lin
Hi, This topic has been discussed before here: http://groups.google.com/group/django-users/browse_thread/thread/fcd04f766b101a95/b65b70aa6b03729e?lnk=gst=unique_together%2C+null# Don't you agree that two field combinations like ("A", null) and ("A", null) should be considered identical and

Re: template via email

2008-07-01 Thread James Bennett
On Tue, Jul 1, 2008 at 8:37 PM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Look at the render_to_string() method for converting templates to > strings: > http://www.djangoproject.com/documentation/templates_python/#the-render-to-string-shortcut And if you end up using a template to generate

Re: Development File Structure

2008-07-01 Thread Kenneth Gonsalves
On 01-Jul-08, at 9:23 PM, [EMAIL PROTECTED] wrote: > I downloaded Python 2.5.2, the most recent release of PostgreSQL, and > Django 0.96. with the latest python and latest postgres why are you using an ancient version of django? Please use the latest version from the svn head. Then worry

Re: a thread problem or my bad codes?

2008-07-01 Thread pength
I am using transaction, but still have the problem. ;( You are right, my problem is from "concurrent requests", which I have searched in this group, but haven't found a very good solution... On 7月2日, 上午1时45分, phillc <[EMAIL PROTECTED]> wrote: > i think you need transactions? > > problem being

Re: template via email

2008-07-01 Thread Malcolm Tredinnick
On Tue, 2008-07-01 at 18:25 -0700, Bobby Roberts wrote: > hola - > > I'm just about through with my first Django project. This has been a > wonderful experience and I thank you for helping me learn so quickly. > > the last part of my application should send and email and I'm > wondering if

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,

template via email

2008-07-01 Thread Bobby Roberts
hola - I'm just about through with my first Django project. This has been a wonderful experience and I thank you for helping me learn so quickly. the last part of my application should send and email and I'm wondering if it's possible to somehow use a template as the html in my email receipt.

Re: Tutorial method was_published_today() - problem

2008-07-01 Thread [EMAIL PROTECTED]
Got it. I had to delete the tabs and use spaces. I guess I won't cut/ paste or use tabs. Thanks, Jason On Jul 1, 5:23 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Jul 1, 2008 at 8:06 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > It IS indented correctly, it looks like it

Re: Tutorial method was_published_today() - problem

2008-07-01 Thread Karen Tracey
On Tue, Jul 1, 2008 at 8:06 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > It IS indented correctly, it looks like it wasn't due to copy/paste > but it is in fact inline with def __str__(self): BTW running .96.1 > I don't know what to tell you. Cut/pasting your models, fixing the

Re: Tutorial method was_published_today() - problem

2008-07-01 Thread [EMAIL PROTECTED]
It IS indented correctly, it looks like it wasn't due to copy/paste but it is in fact inline with def __str__(self): BTW running .96.1 On Jul 1, 12:26 pm, Matthias Kestenholz <[EMAIL PROTECTED]> wrote: > On Tue, 2008-07-01 at 12:18 -0700, [EMAIL PROTECTED] wrote: > > Hello, > > > I'm just going

Custom Referrer for Unit Tests?

2008-07-01 Thread Rob P
I am writing an application that tracks URLs and stores different information about them (ie URL, referrer, user agent, etc...). Currently I am writing unit tests for it and I need to be able to spoof the referrer to test functionality (I only want to log specific referrers). Is there anyway I

Re: memcache not used?

2008-07-01 Thread Steven Armstrong
Oscar Carlsson wrote on 07/01/08 23:32: > ...you were very correct - I didn't have CacheMiddleware loaded, and when I > loaded it... > Everything worked. > > Thanks for all your help! :-) > > Oscar > (I feel a bit stupid, tho) Hacking for to long without a break, ey? Guess we've all been

Re: memcache not used?

2008-07-01 Thread Oscar Carlsson
...you were very correct - I didn't have CacheMiddleware loaded, and when I loaded it... Everything worked. Thanks for all your help! :-) Oscar (I feel a bit stupid, tho) On Tue, Jul 1, 2008 at 11:10 PM, Steven Armstrong <[EMAIL PROTECTED]> wrote: > > Oscar Carlsson wrote on 07/01/08 19:02: >

Re: memcache not used?

2008-07-01 Thread Steven Armstrong
Oscar Carlsson wrote on 07/01/08 19:02: > Heh, ops! > > That was a typo, but even after fixing it, nothing changed :( > (still no change in memory usage, that is) > Looking at your dpaste entry again it seems you haven't configured the cache middleware. > Here is the ZeroDivisionError, btw:

Re: CharField as text?

2008-07-01 Thread Brian Luft
What is your purpose in defining a form field if it won't be used for user input? On Jul 1, 12:46 pm, Stuart Grimshaw <[EMAIL PROTECTED]> wrote: > Is it possible (with newforms) to either display a CharField as just > text, or have it's value used as the label on another field? I'm >

Re: memcache not used?

2008-07-01 Thread Oscar Carlsson
I can connect to the daemon, and it's memory usage went up a bit (from 0.2% to 0.4%) >>> print mc.get('foo') bar But after restarting apache and loading the page in a browser, memcache doesn't get any bigger. And if I restart the memcache daemon and then restart apache again, memcache stays on

Re: memcache not used?

2008-07-01 Thread Steven Armstrong
Oscar Carlsson wrote on 07/01/08 21:48: > I've checked the following logs, but nothing turned up: > /var/log/nginx* > /var/log/httpd* (apache) > > Previously, when something went wrong with the app, all error messages > appeared in /var/log/httpd-error.log, but this time - nothing. > > This is

Re: memcache not used?

2008-07-01 Thread Oscar Carlsson
I've checked the following logs, but nothing turned up: /var/log/nginx* /var/log/httpd* (apache) Previously, when something went wrong with the app, all error messages appeared in /var/log/httpd-error.log, but this time - nothing. This is all the output I get when I restart apache (apachectl

CharField as text?

2008-07-01 Thread Stuart Grimshaw
Is it possible (with newforms) to either display a CharField as just text, or have it's value used as the label on another field? I'm displaying names against checkboxes and I want the names to appear as the checkbox labels (or at least appear like they are) Any tips anyone? -S

Re: Development File Structure

2008-07-01 Thread Brian Luft
You need to either copy the python executable to a directory on the Windows system path (C:\windows\system32 for example), or add the path to the Python installation (often C:\Python25 or similar) to the PATH environment variable. On Jul 1, 11:25 am, bruno desthuilliers <[EMAIL PROTECTED]>

Re: Tutorial method was_published_today() - problem

2008-07-01 Thread [EMAIL PROTECTED]
oops, it is, that was a result of copy/paste. On Jul 1, 12:23 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Jul 1, 2008 at 3:18 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I'm just going through this tutorial and the custom method > > was_published_today() is

Re: Polymorphic model: many-to-many is not properly resolved

2008-07-01 Thread Richard Dahl
Yes, of course you did, I just didn't read your post quite right, disregard. -richard :) On 7/1/08, Torsten Bronger <[EMAIL PROTECTED]> wrote: > > > Hallöchen! > > Richard Dahl writes: > > > In your example SpecialProcess inherits from Process and Sample > > has a M2M to Process, where should

Re: Tutorial method was_published_today() - problem

2008-07-01 Thread Matthias Kestenholz
On Tue, 2008-07-01 at 12:18 -0700, [EMAIL PROTECTED] wrote: > Hello, > > I'm just going through this tutorial and the custom method > was_published_today() is not recognized as an attribute of Poll, > though it's defined in the model as follows: > > from django.db import models > import

Re: Polymorphic model: many-to-many is not properly resolved

2008-07-01 Thread Torsten Bronger
Hallöchen! Richard Dahl writes: > In your example SpecialProcess inherits from Process and Sample > has a M2M to Process, where should the SpecialProcess come in? I created instances of SpecialProcess and added them to a Sample. I have many child classes of Process, and in the field

Re: Tutorial method was_published_today() - problem

2008-07-01 Thread Karen Tracey
On Tue, Jul 1, 2008 at 3:18 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello, > > I'm just going through this tutorial and the custom method > was_published_today() is not recognized as an attribute of Poll, > though it's defined in the model as follows: > > from django.db import models

Re: Polymorphic model: many-to-many is not properly resolved

2008-07-01 Thread Matthias Kestenholz
On Tue, 2008-07-01 at 19:41 +0200, Torsten Bronger wrote: > Hallöchen! > > I use the current SVN version of Django. > > Consider the following models: > > class Process(models.Model): > ... > > class SpecialProcess(Process): > ... > > class Sample(models.Model): >

Tutorial method was_published_today() - problem

2008-07-01 Thread [EMAIL PROTECTED]
Hello, I'm just going through this tutorial and the custom method was_published_today() is not recognized as an attribute of Poll, though it's defined in the model as follows: from django.db import models import datetime class Poll(models.Model): question = models.CharField(maxlength=200)

Re: Polymorphic model: many-to-many is not properly resolved

2008-07-01 Thread Richard Dahl
In your example SpecialProcess inherits from Process and Sample has a M2M to Process, where should the SpecialProcess come in? Is this what you mean: class Sample(models.Model): processes = models.ManyToManyField(SpecialProcess) If you do this, you should get SpecialProcess from print

Re: initializing a model with a dicitonary

2008-07-01 Thread Scott Moonen
Hi, try doing this: c = Customer(**customerdict).save() -- Scott On Tue, Jul 1, 2008 at 12:56 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I have an object called customer that I trying to initialize from a > large XML parse. I parse the XML into a dictionary into something > like

Re: initializing a model with a dicitonary

2008-07-01 Thread J Meier
On Jul 1, 10:56 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > c = Customer(first_name = customerdict['first_name'], last_name = > customerdict['last_name']).save() try c= Customer(**customerdict) > What am I doing > wrong? Not reading your python manual :)

initializing a model with a dicitonary

2008-07-01 Thread [EMAIL PROTECTED]
I have an object called customer that I trying to initialize from a large XML parse. I parse the XML into a dictionary into something like customerdict = {'first_name' : 'mike', 'last_name' : 'c', 'etc' : 'etc' } and so forth then I try to do c = Customer(customerdict).save() I get a "Can't

Polymorphic model: many-to-many is not properly resolved

2008-07-01 Thread Torsten Bronger
Hallöchen! I use the current SVN version of Django. Consider the following models: class Process(models.Model): ... class SpecialProcess(Process): ... class Sample(models.Model): processes = models.ManyToManyField(Process) ... Then I populate one

Re: Development File Structure

2008-07-01 Thread bruno desthuilliers
On 1 juil, 20:12, [EMAIL PROTECTED] wrote: > brian, thnx. > > i got python2.5 installed and django9.6 installed. when i run my > python command line and import django and test the version it works. > however when i run the command prompt in windows and go to the django > directory in

Re: Development File Structure

2008-07-01 Thread mccomas . chris
brian, thnx. i got python2.5 installed and django9.6 installed. when i run my python command line and import django and test the version it works. however when i run the command prompt in windows and go to the django directory in python25\lib\site-packages\ and type in python django- admin.py

Re: Need help filtering a queryset

2008-07-01 Thread Brandon Taylor
Thanks very much for the advice Brian. I'll definitely switch that up and try both approaches. I hadn't seen another way to get at a subset of objects other than: model_set.all but now I do, thanks to your example. Kind regards, Brandon On Jul 1, 12:28 pm, Brian Luft <[EMAIL PROTECTED]>

Re: Strange display of date

2008-07-01 Thread phillc
having trouble understand what you mean On Jul 1, 2:09 am, gumbah <[EMAIL PROTECTED]> wrote: > Anyone? > > On Jun 27, 9:38 am, gumbah <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > does anyone know what i am doing wrong when i see adatelooking like > > this in the "change history" part of the

Re: a thread problem or my bad codes?

2008-07-01 Thread phillc
i think you need transactions? problem being that if all those processes happen at about the same time, they will all see enough money, then they will all process it. On Jul 1, 5:12 am, pength <[EMAIL PROTECTED]> wrote: > sorry for the bad indent of the "#models.py" part. I post it again, >

Re: Need help filtering a queryset

2008-07-01 Thread Brian Luft
Another approach would be to add a method to your events model. Name it something like "current_occurrences" and have it return the filtered occurrences. Ex: class event( models.Model ): ... def current_occurrences( self ): return self.occurrence_set.filter(

Re: memcache not used?

2008-07-01 Thread Steven Armstrong
Oscar Carlsson wrote on 07/01/08 19:02: > Heh, ops! > > That was a typo, but even after fixing it, nothing changed :( > (still no change in memory usage, that is) > > Here is the ZeroDivisionError, btw: > http://dpaste.com/60185/ > > Oscar > The python-memcached client fails silently if it

Re: Need help filtering a queryset

2008-07-01 Thread Brian Luft
Ok, you are asking for a list of events that have occurences on or after today's date. Then with each event instance you are asking for ALL occurence instances (event.occurrence_set.all). ALL means EVERY occurence associated with that event object. You haven't done anything to filter out

Re: Need help filtering a queryset

2008-07-01 Thread Brandon Taylor
I made a custom filter that tests for the date: import datetime from django import template register = template.Library() @register.filter('is_current') def isPast(occurrence): if occurrence.date >= datetime.datetime.today().date(): return True return False which works, but

Re: memcache not used?

2008-07-01 Thread Oscar Carlsson
Heh, ops! That was a typo, but even after fixing it, nothing changed :( (still no change in memory usage, that is) Here is the ZeroDivisionError, btw: http://dpaste.com/60185/ Oscar On Tue, Jul 1, 2008 at 6:47 PM, Brian Luft <[EMAIL PROTECTED]> wrote: > > In your settings file you have

Need help filtering a queryset

2008-07-01 Thread Brandon Taylor
Hi everyone, I have Events and Occurrences of an Event. Occurrence contains a foreign_key for the Event. In my template, I need to display the Event and Occurrences as such: Event Title One June 1, 2008 [times] July 23, 2008 [times] Event Title Two August 25, 2008 [times]

Writing tests for views that use built-in decorators

2008-07-01 Thread Manoj Govindan
I routinely write views which use two built-in decorators, viz., login_required and transaction.commit_on_success. I am able to easily write test cases for the former. A typical test case looks like this: self.client.logout() response = self.client.get(reverse('my_view')) redirect_url =

Re: memcache not used?

2008-07-01 Thread Brian Luft
In your settings file you have indicated that memcached is running on port 112211 but your process listing shows it running on 11211. -Brian On Jul 1, 9:34 am, "Oscar Carlsson" <[EMAIL PROTECTED]> wrote: > Hi! > > For some reason, django doesn't seem to add anything to my memcache - the >

Re: memcache not used?

2008-07-01 Thread Paolo Ambrosio
Hi, just a quick note... the port (112211) wrong only on your email, or in the settings file too? > CACHE_BACKEND = 'memcached://127.0.0.1:112211/' Paolo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Development File Structure

2008-07-01 Thread Brian Luft
Any 3rd-party Python package or module that you intend to use needs to be on the Python path. The Django documentation actually provides some instructions on how to accomplish this: http://www.djangoproject.com/documentation/install/#install-the-django-code -Brian On Jul 1, 8:53 am, [EMAIL

memcache not used?

2008-07-01 Thread Oscar Carlsson
Hi! For some reason, django doesn't seem to add anything to my memcache - the process is using 0.2% RAM (seems to be the absolute minimum on my system, FreeBSD 7 with 512 MByte RAM) and never starts using more memory. Why is this? I have no idea where to begin debug this, nothing ever shows up

Re: dreaded FieldError (used to be KeyError) can only replicate on production, ugh!

2008-07-01 Thread Milan Andric
On Jul 1, 5:03 am, "Scott Moonen" <[EMAIL PROTECTED]> wrote: > Milan, I took another look at the error and your template.  Judging from the > error (it seems to be complaining about some access to the member object, > rather than the project list), I think the reference to line 9 is a red >

Re: Inheriting from auth.models.User

2008-07-01 Thread Rob Hudson
On Jun 30, 9:43 pm, Michael Richardson <[EMAIL PROTECTED]> wrote: > > There's a patch for this -http://code.djangoproject.com/ticket/3011 Dangit! Michael beat me to it! :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: MySQL-python-1.2.2 install problems

2008-07-01 Thread [EMAIL PROTECTED]
This worked after running: sudo port clean --work py25-hashlib sudo port install py25-hashlib Thanks, Jason On Jul 1, 7:50 am, "Adi J. Sieker" <[EMAIL PROTECTED]> wrote: > On Tue, 01 Jul 2008 06:56:08 +0200, Malcolm Tredinnick > > <[EMAIL PROTECTED]> wrote: > > On Mon, 2008-06-30 at 20:13

Development File Structure

2008-07-01 Thread mccomas . chris
Hey, I downloaded Python 2.5.2, the most recent release of PostgreSQL, and Django 0.96. I've installed PostgreSQL and Python, as well as psycopg for PostgreSQL. I ran my Python command line and it can't find Django. Where do I need to put Django so that the Python can find it?

CheckboxInput unchecked at formload

2008-07-01 Thread Bobby Roberts
Is there a way to make a CheckboxInput unchecked at formload... I can only seem to get it to load in a checked state. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Regex assistance

2008-07-01 Thread mike171562
Gul, That was it, thx a bunch.. On Jul 1, 10:27 am, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On Tue, Jul 1, 2008 at 11:15 AM, John Lenton <[EMAIL PROTECTED]> wrote: > >> local numbers start with 281, 832, 713 , or 1281, 1832, or 1713, my > >> regex which isnt working looks like this > > >

Re: Regex assistance

2008-07-01 Thread Marty Alchin
On Tue, Jul 1, 2008 at 11:15 AM, John Lenton <[EMAIL PROTECTED]> wrote: >> local numbers start with 281, 832, 713 , or 1281, 1832, or 1713, my >> regex which isnt working looks like this > > in other words, local numbers match the regex > > r'^(?:281|832|713|1281|1832|1713)' Or, to simplify it

Re: Restriction of Model Inheritance - mixing multi table and abstract

2008-07-01 Thread zobbo
On Jul 1, 12:58 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I don't have time to look at this at the moment (I'm up to my armpits in > somebody else's problem), but this looks like a bug. Would you mind to > open a ticket and include your example so it doesn't get lost? You can >

Re: Missing traceback for 500 errors

2008-07-01 Thread ekellner
Thanks, indeed that is all I was missing. I somehow managed to miss the setting documentation and instead found some information on the 500 view. On Tue, Jul 1, 2008 at 3:11 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Tue, Jul 1, 2008 at 8:15 AM, Elizabeth Kellner <[EMAIL PROTECTED]> >

Re: Regex assistance

2008-07-01 Thread John Lenton
On Tue, Jul 1, 2008 at 12:12, mike171562 <[EMAIL PROTECTED]> wrote: > > Hello, > I am trying to build a regex for a query that excludes local phone > numbers from a list of calls thus leaving only long distance. I dont > have alot of experience with the "re" module > > local numbers start with

Regex assistance

2008-07-01 Thread mike171562
Hello, I am trying to build a regex for a query that excludes local phone numbers from a list of calls thus leaving only long distance. I dont have alot of experience with the "re" module local numbers start with 281, 832, 713 , or 1281, 1832, or 1713, my regex which isnt working looks like

Re: MySQL-python-1.2.2 install problems

2008-07-01 Thread Adi J. Sieker
On Tue, 01 Jul 2008 06:56:08 +0200, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-06-30 at 20:13 -0700, [EMAIL PROTECTED] wrote: >> Hello, >> >> I'm having problems installing MySQL-python-1.2.2. I've installed this >> on my iMac with no problems but can't figure out how to

Re: combining unrelated tables

2008-07-01 Thread Shane McNamee
when i try doing that i get a really weird error, but i was doing it like "render_to_response('Template.html', {'first_qs': Model1.objects.all()}, {'second_qs':Model2.objects.all()})", with the {} around each one, so hopefully i just had wrong syntax. ill try it like u said. thanks for the help

Re: url views problem

2008-07-01 Thread sebey
cool sorry i will try that out sorry for replying so late but I will post what the results are thanks again On Jun 26, 9:23 pm, "Emil Styrke" <[EMAIL PROTECTED]> wrote: > This line: > >    query = show.objects.filter(show_feed__contains="http://;) > > selects all shows that have a feed url(?)

Re: combining unrelated tables

2008-07-01 Thread Richard Dahl
Not sure exactly where you are going, but what do you mean by ' Inside views.py it only lets me send 1 queryset to the template' why can't you do something like: render_to_response('Template.html', {'first_qs': Model1.objects.all(), 'second_qs':Model2.objects.all()}) -richard On 7/1/08,

Re: testing login problem

2008-07-01 Thread [EMAIL PROTECTED]
> How do I create username and password for the test database. What I do is either create a test user on SetUp(), or put that username inside the "initial_data" fixture, which loads automatically when Django creates the test DB... HTH, Carlos

combining unrelated tables

2008-07-01 Thread Shane_McNamee
hey, i searched around this forum and found a lot of questions similar to this, but i couldnt find an answer to my question. I need to send data to my templates that comes from multiple tables in my database. Inside views.py it only lets me send 1 queryset to the template, so i figured the only

Re: MediaTemple Containers

2008-07-01 Thread joshuajonah
For expandability and dedicated memory you'd probably want a dedicated or Dedicated grid machine. I use a MediaTemple DV with python2.5 and django latest trunk, works great, even for tons of video. On Jul 1, 9:55 am, Niall McCormack <[EMAIL PROTECTED]> wrote: > They do look good, but I want

Re: MediaTemple Containers

2008-07-01 Thread Niall McCormack
They do look good, but I want some more bandwidth and hard disk space for that sorta price to be honest. I'm relaunching my site and have lots of video on it so I want to be covered if need be... On 1 Jul 2008, at 01:30, elithrar wrote: > > Have you considered WebFaction at all, if

Re: Missing traceback for 500 errors

2008-07-01 Thread Karen Tracey
On Tue, Jul 1, 2008 at 8:15 AM, Elizabeth Kellner <[EMAIL PROTECTED]> wrote: > > The full python traceback is missing from my apache logs. In fact, > I've just seen that the only notification of a 500 error is in > access_log and the browser. Can anyone suggest any place to look to > see why

generating tables and forms at runtime with the django subsystem

2008-07-01 Thread José Moreira
hello, i'm a recent django developer. Sometime soon i will have to develop a module for a cms solution to allow the content publishers to design custom forms (including form layout) for webpages and to store the results of the data of those forms. the most obvious solution is to keep the form

Re: Internal Redirects Limit

2008-07-01 Thread Gorm Lai
On Mon, 2008-06-30 at 19:26 +1000, Malcolm Tredinnick wrote: > > > On Mon, 2008-06-30 at 10:03 +0200, Gorm Lai wrote: > > Hey, > > > > I now have our django project set up both locally and on our own remote > > server. Everything works fine. > > > > However, I still have trouble getting it

Missing traceback for 500 errors

2008-07-01 Thread Elizabeth Kellner
The full python traceback is missing from my apache logs. In fact, I've just seen that the only notification of a 500 error is in access_log and the browser. Can anyone suggest any place to look to see why this is the case? Here is the python view that I am using to test... def

Re: Restriction of Model Inheritance - mixing multi table and abstract

2008-07-01 Thread Malcolm Tredinnick
On Tue, 2008-07-01 at 12:53 +0100, Ian J Cottee wrote: > Take this simple models file. If I try and do > > pi = PlayableItem(funfactor=33,code='PS2',description='Play station > 2') > > I get > > "TypeError: 'code' is an invalid keyword argument for this function" > > If PlayableItem

Restriction of Model Inheritance - mixing multi table and abstract

2008-07-01 Thread Ian J Cottee
Take this simple models file. If I try and do pi = PlayableItem(funfactor=33,code='PS2',description='Play station 2') I get "TypeError: 'code' is an invalid keyword argument for this function" If PlayableItem inherits directly from Item, this does not happen. Is there some rule I'm breaking

Re: a recent update broke form.save(commit=False) on FK fields

2008-07-01 Thread omat
I have submitted a ticket for the issue: http://code.djangoproject.com/ticket/7585 Thanks... On Jul 1, 12:51 pm, omat <[EMAIL PROTECTED]> wrote: > More specifically, I think the problem is in > ReverseSingleRelatedObjectDescriptor in related.py, where it does not > check if commit=False at

Re: User Authentication - index/base

2008-07-01 Thread Julien
Ok, then are you passing RequestContext to the template? A possibility is that your 'user' variable is parasited by another one in the context. I guess 'request.user' would do the trick... On Jul 1, 8:14 pm, Alfonso <[EMAIL PROTECTED]> wrote: > Hi Julien, > > Thanks for that  but the auth

Re: testing login problem

2008-07-01 Thread laspal
How do I create username and password for the test database. On Jul 1, 2:24 pm, Julien <[EMAIL PROTECTED]> wrote: > Hi, > > If you're using the SVN version you can try: > > >>> c = Client() > >>> c.login(username='fred', password='secret') > > More info

GeoDjango/GoogleMaps: No support for points/markers

2008-07-01 Thread [EMAIL PROTECTED]
I noticed that the automatic Google Map creation in the Django GIS branch does not support the display of point features, only polylines and polygons. Unless there was a specific reason not to include this, I have a patch that will include points as GMarkers on maps, which I could contribute.

Re: User Authentication - index/base

2008-07-01 Thread Alfonso
Hi Julien, Thanks for that but the auth processor is in place in settings, along with the debug and il8n processor obviously. Allan On Jul 1, 10:29 am, Julien <[EMAIL PROTECTED]> wrote: > Hi, > > Have you tried adding the auth context processor in your settings? >

Re: dreaded FieldError (used to be KeyError) can only replicate on production, ugh!

2008-07-01 Thread Scott Moonen
Milan, I took another look at the error and your template. Judging from the error (it seems to be complaining about some access to the member object, rather than the project list), I think the reference to line 9 is a red herring. In other words, the outermost tag that Django is rendering at the

Re: a recent update broke form.save(commit=False) on FK fields

2008-07-01 Thread omat
More specifically, I think the problem is in ReverseSingleRelatedObjectDescriptor in related.py, where it does not check if commit=False at line 249: ... if value is None and self.field.null == False: raise ValueError('Cannot assign None: "%s.%s" does not allow null values.'

Re: a recent update broke form.save(commit=False) on FK fields

2008-07-01 Thread omat
But it is raised at the line: photo = form.save(commit=False) On Jul 1, 12:26 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-07-01 at 02:18 -0700, omat wrote: > > Hi, > > > I updated Django to svn trunk v. 7811 from about a week old version. > > > When saving a form

Re: requiring fields in the admin page

2008-07-01 Thread David Keegan
Awesome! thanks On Jul 1, 2008, at 2:15 AM, Julien wrote: > > By default all items are required. To make a field optional you have > to use blank=True. > Some interesting reading here: > http://www.b-list.org/weblog/2006/jun/28/django-tips-difference-between-blank-and-null/ > > On Jul 1, 7:10

Re: User Authentication - index/base

2008-07-01 Thread Julien
Hi, Have you tried adding the auth context processor in your settings? "django.core.context_processors.auth" Alfonso wrote: > Hey, > > I've implemented a user login widget on my site. A simple 'Sign in' > at top of every page that turns into 'Welcome John, View your profile' > following

Re: a recent update broke form.save(commit=False) on FK fields

2008-07-01 Thread Malcolm Tredinnick
On Tue, 2008-07-01 at 02:18 -0700, omat wrote: > Hi, > > I updated Django to svn trunk v. 7811 from about a week old version. > > When saving a form (ModelForm instance) with a foreign key to another > model, this used to work: > > photo = form.save(commit=False) > photo.album = album >

XMLField not working

2008-07-01 Thread Alex Rades
Hi, I'm trying to use an XMLField in latest nfa but it doesn't work at all (it doesn't do the validation). The code in validators.py/RelaxNGCompact is not executed at all, so this field is pretty meaningless at the moment. Do you know why this field is not working?

Re: testing login problem

2008-07-01 Thread Julien
Hi, If you're using the SVN version you can try: >>> c = Client() >>> c.login(username='fred', password='secret') More info here: http://www.djangoproject.com/documentation/testing/ On Jul 1, 5:51 pm, laspal <[EMAIL PROTECTED]> wrote: > Hi, > > I am writing the test case but I am getting

a recent update broke form.save(commit=False) on FK fields

2008-07-01 Thread omat
Hi, I updated Django to svn trunk v. 7811 from about a week old version. When saving a form (ModelForm instance) with a foreign key to another model, this used to work: photo = form.save(commit=False) photo.album = album photo.save() But now it raises a ValueError at the

Re: requiring fields in the admin page

2008-07-01 Thread Julien
By default all items are required. To make a field optional you have to use blank=True. Some interesting reading here: http://www.b-list.org/weblog/2006/jun/28/django-tips-difference-between-blank-and-null/ On Jul 1, 7:10 pm, keegan3d <[EMAIL PROTECTED]> wrote: > Hey guys, > > I am trying to

Re: a thread problem or my bad codes?

2008-07-01 Thread pength
sorry for the bad indent of the "#models.py" part. I post it again, hope this time that part will be shown OK. #models.py class Apple_For_Sale(models.Model): price = models.PositiveSmallIntegerField() has_been_sold = models.BooleanField(default=False) class People(models.Model):

  1   2   >