Re: VIM as Modern Python/Dajngo IDE

2012-02-04 Thread David Markey
It looks like most of this could be scripted to be made automatic..

On 4 February 2012 19:31, yati sagade  wrote:

> Seriously dude, I think you should go about making a video of this.
>
>
> On Sun, Feb 5, 2012 at 12:56 AM, Vikas Ruhil wrote:
>
>>
>> Now working on graphics and how use all this content efficiently ,try to
>> make graphics those can give basic to advance understanding to the
>> Python/Django users.Really Good response this post is breaking records for
>> m .Keep Switch there More are coming
>>
>> On Sun, Feb 5, 2012 at 12:29 AM, yati sagade wrote:
>>
>>> Hi Vikash
>>> Appreciate the heads up! Why don't you share this link on G+ and other
>>> social media - Even I'll share with my friends - I haven't tried all of it
>>> yet, but it looks good. kudos man, Good Job! Keep it up :)
>>>
>>> Yati Sagade
>>>
>>> On Sat, Feb 4, 2012 at 5:33 PM, Vikas Ruhil wrote:
>>>
 I write a Blog about VIM as a Python/Dajngo Modern IDE .There are about
 15 Plugin and config of there is on post . I am looking for plugin
 suggestion for more .

 Also for newbie and Non-vim user's there is request  to checkout the
 post.Those Guys who ask what IDE should they need use or Which is Best IDE
 for Python/Django.


 http://learnhackstuff.blogspot.in/2012/02/vim-as-universal-idepart-1.html

 Regards
 Vikash Ruhil

 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-users@googlegroups.com.
 To unsubscribe from this group, send email to
 django-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/django-users?hl=en.

>>>
>>>
>>>
>>> --
>>> Yati Sagade 
>>>
>>> (@yati_itay )
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>>
>> Regards
>> Vikash Ruhil
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> Yati Sagade 
>
> (@yati_itay )
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Will Django run on z/linux?

2012-03-16 Thread David Markey
Yup.. Should be no problem at all.

On 16 March 2012 17:22, Dan Poirier  wrote:

> On Fri. 2012-03-16 at 01:06 PM EDT, jc  wrote:
>
> > We have a number of z/linux (z/vm s390) Linux servers and would like
> > to consider porting this application to one of the instances.  Will it
> > run on z?
>
> It's Linux, so sure.  (Now z/OS would be another story...)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Bus Error: 10 (Intro Tutorial)

2012-04-19 Thread David Markey
Bus error is usually a very low level problem.

Can you give a screen shot?

If you are on linux, also post dmesg.

On 19 April 2012 16:36, Harald Sigh Andertun wrote:

> Hi all
>
> I am totally new to django. Have followed the intro tutorial until part 
> 2,
> but when I start the development server and tries to access the admin page
> Python crashes immediately. The console prints "Bus error: 10".
> I have been googling for a while now, but can't figure out why this error
> occurs.
>
> Is it a code error, or an environment issue?
>
> I use Python 2.6.2 and Django 1.4.0, and I have choosen sqlite3 as db.
>
> I hope someone can enlighten me in what direction the problem might be ;)
>
> Cheers,
> Harald
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/8EP1qv3APR4J.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Bus Error: 10 (Intro Tutorial)

2012-04-19 Thread David Markey
Could have been an abi change between python and a new library installed
with one of the OSX upgrades.



On 19 April 2012 18:33, Harald Sigh Andertun wrote:

> The syntax error was not the only problem. It helped a bit, but I still
> got bus errors.
>
> I installed Python 2.7 and reinstalled Django-1.4 using pip insted of
> django's own setup.py install
>
> I don't know if I've been wiser, but at least it seems to work now :-)
>
>
> Den torsdag den 19. april 2012 17.36.53 UTC+2 skrev Harald Sigh Andertun:
>
>> Hi all
>>
>> I am totally new to django. Have followed the intro tutorial until part 
>> 2,
>> but when I start the development server and tries to access the admin page
>> Python crashes immediately. The console prints "Bus error: 10".
>> I have been googling for a while now, but can't figure out why this error
>> occurs.
>>
>> Is it a code error, or an environment issue?
>>
>> I use Python 2.6.2 and Django 1.4.0, and I have choosen sqlite3 as db.
>>
>> I hope someone can enlighten me in what direction the problem might be ;)
>>
>> Cheers,
>> Harald
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/wbphSrYwBCoJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Ways to handle long-running server-side processing in Django

2012-04-21 Thread David Markey
Sounds like the API should return a UUID that can then be used to poll,
while celery or similar does the heavy lifting in the background?

On 21 April 2012 21:53, jpk  wrote:

> Hi django-users,
>
> I've come looking for some advice.  I've built a json api using django,
> and POST/PUT to one of my endpoints does some non-trivial processing.  The
> gritty details are included at the end, but for the purposes of this
> discussion, the important things are probably 1) The action is for
> processing a user's previously uploaded data, 2) it takes a long time to
> complete, and 3) probably doesn't make sense to spread over multiple api
> calls.  The work that's done can take multiple minutes to complete, which
> is an awful long time to wait for an http response to event begin (right?
>  Or am I mistaken, there?).  Right now, that's what I'm doing.  The client
> just has to wait until the processing is finished to get the response.
>  This is functional, but I'm considering what can be done to make for a
> better user experience and/or make it less fragile (I'm honestly not sure
> what would happen if the connection died before the response goes out).
>
> So my question is, what are my options, here?  I'm thinking the api could
> respond immediately with a message like, "cool, I'll get right on that!"
> and the heavy lifting happens in the background sometime after the response
> goes out.  What constructs in django or python best facilitate that?  Then
> what do I tell the client?  "Poll the api until it's done."?  I could also
> maybe keep it all in one request like it is now, and stream progress
> information back to the client as the process does stuff.  What other
> approaches are there?  Am I over-thinking this? :-P  Any wisdom would be
> appreciated!
>
> Thanks!
> jpk
>
>
> P.S. - The gritty details:  The api call in question takes an image (that
> the user previously uploaded) and a set of ground control points (pairs of
> longitude,latitude on the world and x,y on the image) to generate map tiles
> of the image that can be overlayed on world map tiles.  Tools from OSGeo's
> excellent GDAL library are used to do this, then all the tiles are shipped
> off to S3.  Once this is finished, the client has a url it can use to grab
> tiles (this url is stored in the database, accessible via later api calls,
> and also included in the response generated after all that processing is
> done).  There's still lots I can do to optimize this process, but I don't
> expect it can be made near-instant.  The other component to this is the
> frontend: written using backbone.js.  I'm already using a custom
> Backbone.sync(), so I suppose extra gymnastics in there (particularly in
> the case of streaming progress information) to support whatever I do in the
> backend related to this wouldn't be out of bounds.
>
>
> --
> john p. kiffmeyer
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



A question about Model.full_clean

2012-06-01 Thread David Markey
Hi All,

Say I have this model

class TestModel(models.Model):
my_test = models.CharField(max_length=512, blank=True)

And I try this:

In [1]: from core.base.models import TestModel

In [2]: test_model = TestModel()

In [3]: test_model.my_test =* ""*

In [4]: test_model.full_clean()

In [5]: test_model.save()

*Ok cool, this is expected.*
*
*
*How about:*


In [6]: test_model2 = TestModel()

In [7]: test_model2.my_test =* None*

In [8]: test_model2.full_clean()

In [9]: test_model2.save()

##*IntegrityError raised*

Is there a way for full_clean() to catch that the "my_test" field is Null
when it shouldn't be, when blank=True?

If I have blank=False, it wont validate when my_test="".


Thanks

David

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A question about Model.full_clean

2012-06-01 Thread David Markey
That is my exact class for that model.

On 1 June 2012 15:27, Kurtis Mullins  wrote:

> From the docs:
> https://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#django.db.models.Model.full_clean
>
> from django.core.exceptions import ValidationError, NON_FIELD_ERRORStry:
> article.full_clean()except ValidationError as e:
> non_field_errors = e.message_dict[NON_FIELD_ERRORS]
>
> It looks like it's not firing off that exception in your case -- unless
> it's being supressed somehow. Did you override anything else in that Model?
> Or is this example literally 'it'?
>
> On Fri, Jun 1, 2012 at 9:47 AM, David Markey  wrote:
>
>> Hi All,
>>
>> Say I have this model
>>
>> class TestModel(models.Model):
>> my_test = models.CharField(max_length=512, blank=True)
>>
>> And I try this:
>>
>> In [1]: from core.base.models import TestModel
>>
>> In [2]: test_model = TestModel()
>>
>> In [3]: test_model.my_test =* ""*
>>
>> In [4]: test_model.full_clean()
>>
>> In [5]: test_model.save()
>>
>> *Ok cool, this is expected.*
>> *
>> *
>> *How about:*
>>
>>
>> In [6]: test_model2 = TestModel()
>>
>> In [7]: test_model2.my_test =* None*
>>
>> In [8]: test_model2.full_clean()
>>
>>  In [9]: test_model2.save()
>>
>> ##*IntegrityError raised*
>>
>> Is there a way for full_clean() to catch that the "my_test" field is Null
>> when it shouldn't be, when blank=True?
>>
>> If I have blank=False, it wont validate when my_test="".
>>
>>
>> Thanks
>>
>> David
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A question about Model.full_clean

2012-06-01 Thread David Markey
1.4

On 1 June 2012 15:54, Kurtis Mullins  wrote:

> What version of Django are you using?
>
>
> On Fri, Jun 1, 2012 at 10:47 AM, David Markey  wrote:
>
>> That is my exact class for that model.
>>
>>
>> On 1 June 2012 15:27, Kurtis Mullins  wrote:
>>
>>> From the docs:
>>> https://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#django.db.models.Model.full_clean
>>>
>>> from django.core.exceptions import ValidationError, NON_FIELD_ERRORStry:
>>> article.full_clean()except ValidationError as e:
>>> non_field_errors = e.message_dict[NON_FIELD_ERRORS]
>>>
>>> It looks like it's not firing off that exception in your case -- unless
>>> it's being supressed somehow. Did you override anything else in that Model?
>>> Or is this example literally 'it'?
>>>
>>>  On Fri, Jun 1, 2012 at 9:47 AM, David Markey  wrote:
>>>
>>>>  Hi All,
>>>>
>>>> Say I have this model
>>>>
>>>> class TestModel(models.Model):
>>>> my_test = models.CharField(max_length=512, blank=True)
>>>>
>>>> And I try this:
>>>>
>>>> In [1]: from core.base.models import TestModel
>>>>
>>>> In [2]: test_model = TestModel()
>>>>
>>>> In [3]: test_model.my_test =* ""*
>>>>
>>>> In [4]: test_model.full_clean()
>>>>
>>>> In [5]: test_model.save()
>>>>
>>>> *Ok cool, this is expected.*
>>>> *
>>>> *
>>>> *How about:*
>>>>
>>>>
>>>> In [6]: test_model2 = TestModel()
>>>>
>>>> In [7]: test_model2.my_test =* None*
>>>>
>>>> In [8]: test_model2.full_clean()
>>>>
>>>>  In [9]: test_model2.save()
>>>>
>>>> ##*IntegrityError raised*
>>>>
>>>> Is there a way for full_clean() to catch that the "my_test" field is
>>>> Null when it shouldn't be, when blank=True?
>>>>
>>>> If I have blank=False, it wont validate when my_test="".
>>>>
>>>>
>>>> Thanks
>>>>
>>>> David
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To post to this group, send email to django-users@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> django-users+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/django-users?hl=en.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A question about Model.full_clean

2012-06-01 Thread David Markey
Hmm..

In my opinion, Model.full_clean() should catch this particular error.





On 1 June 2012 16:17, Kurtis Mullins  wrote:

> It looks like the CharField is accepting 'none' in its to_python method.
> That might explain why we don't get the error until your to save it. I'm
> sure there is a reason behind this -- I just don't know what it is :)
> Source: django/db/models/fields/__init__.py
>
>
> On Fri, Jun 1, 2012 at 11:08 AM, Kurtis Mullins 
> wrote:
>
>> Yeah, I'm getting exactly the same results. It seems that it's not
>> throwing the IntegrityError until you try to save it. I suppose that's
>> because it's marked as 'not null' in the database. It appears to be
>> ignoring it in the actual clean() (and consequently clean_fields())
>> methods. I'm going to look into the source of the Model module and see
>> what's going on
>>
>>
>> On Fri, Jun 1, 2012 at 10:55 AM, David Markey  wrote:
>>
>>> 1.4
>>>
>>> On 1 June 2012 15:54, Kurtis Mullins  wrote:
>>>
>>>> What version of Django are you using?
>>>>
>>>>
>>>> On Fri, Jun 1, 2012 at 10:47 AM, David Markey wrote:
>>>>
>>>>> That is my exact class for that model.
>>>>>
>>>>>
>>>>> On 1 June 2012 15:27, Kurtis Mullins  wrote:
>>>>>
>>>>>> From the docs:
>>>>>> https://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#django.db.models.Model.full_clean
>>>>>>
>>>>>> from django.core.exceptions import ValidationError, NON_FIELD_ERRORStry:
>>>>>> article.full_clean()except ValidationError as e:
>>>>>> non_field_errors = e.message_dict[NON_FIELD_ERRORS]
>>>>>>
>>>>>> It looks like it's not firing off that exception in your case --
>>>>>> unless it's being supressed somehow. Did you override anything else in 
>>>>>> that
>>>>>> Model? Or is this example literally 'it'?
>>>>>>
>>>>>>  On Fri, Jun 1, 2012 at 9:47 AM, David Markey wrote:
>>>>>>
>>>>>>>  Hi All,
>>>>>>>
>>>>>>> Say I have this model
>>>>>>>
>>>>>>> class TestModel(models.Model):
>>>>>>> my_test = models.CharField(max_length=512, blank=True)
>>>>>>>
>>>>>>> And I try this:
>>>>>>>
>>>>>>> In [1]: from core.base.models import TestModel
>>>>>>>
>>>>>>> In [2]: test_model = TestModel()
>>>>>>>
>>>>>>> In [3]: test_model.my_test =* ""*
>>>>>>>
>>>>>>> In [4]: test_model.full_clean()
>>>>>>>
>>>>>>> In [5]: test_model.save()
>>>>>>>
>>>>>>> *Ok cool, this is expected.*
>>>>>>> *
>>>>>>> *
>>>>>>> *How about:*
>>>>>>>
>>>>>>>
>>>>>>> In [6]: test_model2 = TestModel()
>>>>>>>
>>>>>>> In [7]: test_model2.my_test =* None*
>>>>>>>
>>>>>>> In [8]: test_model2.full_clean()
>>>>>>>
>>>>>>>  In [9]: test_model2.save()
>>>>>>>
>>>>>>> ##*IntegrityError raised*
>>>>>>>
>>>>>>> Is there a way for full_clean() to catch that the "my_test" field is
>>>>>>> Null when it shouldn't be, when blank=True?
>>>>>>>
>>>>>>> If I have blank=False, it wont validate when my_test="".
>>>>>>>
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "Django users" group.
>>>>>>> To post to this group, send email to django-users@googlegroups.com.
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> django-users+unsubscr...@googlegroups.com.
>>>>>>> For more options, visit this group at
>>>>>

Re: A question about Model.full_clean

2012-06-01 Thread David Markey
In the actual code, I'm taking input from 3rd party code which could be
None :(

I think the best option is to override clean_fields* *to check for
non-nullable fields that are null.


*
*
*
*
On 1 June 2012 17:26, Alasdair Nicol  wrote:

>  On 01/06/12 14:47, David Markey wrote:
>
> Hi All,
>
>  Say I have this model
>
>  class TestModel(models.Model):
> my_test = models.CharField(max_length=512, blank=True)
>
>  And I try this:
>
>  In [1]: from core.base.models import TestModel
>
>  In [2]: test_model = TestModel()
>
>  In [3]: test_model.my_test =* ""*
>
>  In [4]: test_model.full_clean()
>
>  In [5]: test_model.save()
>
> *Ok cool, this is expected.*
> *
> *
> *How about:*
>
>
>  In [6]: test_model2 = TestModel()
>
>  In [7]: test_model2.my_test =* None*
>
>  In [8]: test_model2.full_clean()
>
>  In [9]: test_model2.save()
>
>  ##*IntegrityError raised*
>
>  Is there a way for full_clean() to catch that the "my_test" field is
> Null when it shouldn't be, when blank=True?
>
>  If I have blank=False, it wont validate when my_test="".
>
>
>
> I think the behaviour is explained by the clean_fields method called by
> full_clean:
>
> for f in self._meta.fields:
> if f.name in exclude:
> continue
> * # Skip validation for empty fields with blank=True. The
> developer
> # is responsible for making sure they have a valid value.
> *raw_value = getattr(self, f.attname)
> if f.blank and raw_value in validators.EMPTY_VALUES:
> continue
>
>
> https://github.com/django/django/blob/master/django/db/models/base.py#L851
>
> I can't think of a way for you to avoid checking for whether
> test_model2.my_test is None. Can you change the code that is assigning
> test_model2.my_test = None? The default value for the CharField is the
> empty string, which as you show in your first example, doesn't cause a
> problem.
>
> Cheers,
> Alasdair
>
> --
> Alasdair Nicol
> Developer, MEMSET
>
> mail: alasd...@memset.com
>  web: http://www.memset.com/
>
> Memset Ltd., registration number 4504980. 25 Frederick Sanger Road, 
> Guildford, Surrey, GU2 7YD, UK.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: . delete() don't work

2012-06-05 Thread David Markey
Did you do a python manage.py syncdb?

Are you using sqlite and have relative paths?

On 5 June 2012 14:37, Lucas Aride Moulin  wrote:

> When I use example.objects.all().delete() I get an error that the table
> example_delete wasn't found on the DB. Any ideas of what am I doing wrong?
> Thanks,
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: SCGI error

2011-09-14 Thread David Markey
Correct,

You need a webserver in front of manage.py runfcgi, which understands the
protocol.

To talk to django directly with your browser use manage.py runserver




On 14 September 2011 10:10, Tom Evans  wrote:

> On Sat, Sep 10, 2011 at 9:05 PM, Brian Myers 
> wrote:
> > It seems I am getting an error from the WSGI server after all. As a
> reminder, my uwsgi process is started from upstart like this:
> >
> > exec python /var/www/NurseTriage/triagedb/manage.py runfcgi protocol=scgi
> method=threaded host=127.0.0.1 port = 3033
> >
> > When I use Firefox to browse to 127.0.0.1:3033, I get this error
> message:
> >
> > XML Parsing Error: undefined entity
> > Location:
> jar:file:///usr/lib/firefox-3.6.21/chrome/toolkit.jar!/content/global/netError.xhtml
> > Line Number 60, Column 12:&loadError.label;
> > ---^
> >
> > Any ideas what this means? I get the same error with uWSGI. Is this a
> Firefox error?
> >
> > Thanx,
> >
> > Brian
> >
>
> I'm not entirely experienced with scgi or uWSGI, but I'm almost
> certain that neither of them talk HTTP, which is what Firefox uses to
> talk to servers. You need to connect your WSGI/SCGI server to a HTTP
> server like Apache, lighttpd, Cherokee or similar. See the extensive
> docs:
>
> https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/
> https://docs.djangoproject.com/en/1.3/howto/deployment/fastcgi/
>
> Cheers
>
> Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread David Markey
I had some problems with 1.3 and Postgres 8.1,

Are you using psycopg2 and pg 8.1?

On 26 September 2011 11:16, Russell Keith-Magee wrote:

> Hi Philip,
>
> I can't say I've seen the error you report.
>
> My immediate question when I see reports like this is "what else are
> you doing?". Django has an extensive test suite, and things like m2m
> fields are tested very heavily. Outside of Django's test suite, there
> are thousands of applications out there using Django, and many of them
> are using Django 1.3, and this is the first time that this particular
> problem has been reported. So, you are clearly doing *something* that
> is unusual (whether you know it's unusual or not).
>
> What we need is a reproducible test case -- the smallest possible
> sample of code that works under 1.2.7, but breaks under 1.3.1. That
> will provide us the basis on which to debug the problem, and form the
> core of a regression test to make sure the problem doesn't occur again
> in the future.
>
> Yours,
> Russ Magee %-)
>
> On Mon, Sep 26, 2011 at 4:27 PM, Philip Mountifield
>  wrote:
> > Has anyone else experienced this error? Any help would be appreciated.
> >
> > Thanks
> >
> > Philip
> >
> > On 23/09/2011 14:40, Philip wrote:
> >>
> >> Just been updating to Django 1.3.1 and come across an odd error. I'm
> >> getting the following error from some code which works with version
> >> 1.2.7.
> >>
> >> FieldError: Cannot resolve keyword 'email_config_set' into field.
> >> Choices are: id, name, site, type
> >>
> >> The odd thing being email_config_set is a related name for a
> >> ManyToMany field. I'm not sure why django is trying to resolve it into
> >> a field.
> >>
> >> To make it even more odd, this error occurs when DEBUG = TRUE and not
> >> when DEBUG = FALSE when testing with runserver.
> >>
> >> I've been trying to solve this for days now with much googling/pdb/
> >> logging, but since the exception originates deep inside django I'm not
> >> familiar enough to find what is going wrong:
> >>
> >> Traceback (most recent call last):
> >>   File "./core/driver.py", line 268, in run
> >> self.init_norm()
> >>   File "./driver/emailevent/background.py", line 130, in init_norm
> >> self.load_config()
> >>   File "./driver/emailevent/background.py", line 71, in load_config
> >> events = list(config.events.select_related())
> >>   File "/usr/local/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/
> >> django/db/models/manager.py", line 168, in select_related
> >> return self.get_query_set().select_related(*args, **kwargs)
> >>   File "/usr/local/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/
> >> django/db/models/fields/related.py", line 497, in get_query_set
> >> return
> >>
> >>
> superclass.get_query_set(self).using(db)._next_is_sticky().filter(**(self.core_filters))
> >>   File "/usr/local/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/
> >> django/db/models/query.py", line 550, in filter
> >> return self._filter_or_exclude(False, *args, **kwargs)
> >>   File "/usr/local/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/
> >> django/db/models/query.py", line 568, in _filter_or_exclude
> >> clone.query.add_q(Q(*args, **kwargs))
> >>   File "/usr/local/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/
> >> django/db/models/sql/query.py", line 1194, in add_q
> >> can_reuse=used_aliases, force_having=force_having)
> >>   File "/usr/local/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/
> >> django/db/models/sql/query.py", line 1069, in add_filter
> >> negate=negate, process_extras=process_extras)
> >>   File "/usr/local/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/
> >> django/db/models/sql/query.py", line 1260, in setup_joins
> >> "Choices are: %s" % (name, ", ".join(names)))
> >> FieldError: Cannot resolve keyword 'email_config_set' into field.
> >> Choices are: id, name, site, type
> >>
> >> Any ideas/solutions/pointers/tips would be most welcome.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, v

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread David Markey
I actually haven't moved.. I'm still using django 1.2.x. :)

Although we plan to move to PG 9.1 and django 1.3 within the next few
weeks(we are already using both in testing)

I think i read something somewhere in the django 1.3 documentation that PG
8.1 was not supported any more(could have dreamt it though).





On 26 September 2011 11:30, Philip Mountifield wrote:

>  I am indeed using psycopyg2 and pg8.1, which version did you move to in
> order to solve the problem? I have just been using 8.1 since it was the
> default for CentOS 5, but I also see the 8.4 is available via yum.
>
> Philip
>
>
> On 26/09/2011 11:20, David Markey wrote:
>
> I had some problems with 1.3 and Postgres 8.1,
>
>  Are you using psycopg2 and pg 8.1?
>
> On 26 September 2011 11:16, Russell Keith-Magee 
> wrote:
>
>> Hi Philip,
>>
>> I can't say I've seen the error you report.
>>
>> My immediate question when I see reports like this is "what else are
>> you doing?". Django has an extensive test suite, and things like m2m
>> fields are tested very heavily. Outside of Django's test suite, there
>> are thousands of applications out there using Django, and many of them
>> are using Django 1.3, and this is the first time that this particular
>> problem has been reported. So, you are clearly doing *something* that
>> is unusual (whether you know it's unusual or not).
>>
>> What we need is a reproducible test case -- the smallest possible
>> sample of code that works under 1.2.7, but breaks under 1.3.1. That
>> will provide us the basis on which to debug the problem, and form the
>> core of a regression test to make sure the problem doesn't occur again
>> in the future.
>>
>> Yours,
>> Russ Magee %-)
>>
>> On Mon, Sep 26, 2011 at 4:27 PM, Philip Mountifield
>>  wrote:
>> > Has anyone else experienced this error? Any help would be appreciated.
>> >
>> > Thanks
>> >
>> > Philip
>> >
>> > On 23/09/2011 14:40, Philip wrote:
>> >>
>> >> Just been updating to Django 1.3.1 and come across an odd error. I'm
>> >> getting the following error from some code which works with version
>> >> 1.2.7.
>> >>
>> >> FieldError: Cannot resolve keyword 'email_config_set' into field.
>> >> Choices are: id, name, site, type
>> >>
>> >> The odd thing being email_config_set is a related name for a
>> >> ManyToMany field. I'm not sure why django is trying to resolve it into
>> >> a field.
>> >>
>> >> To make it even more odd, this error occurs when DEBUG = TRUE and not
>> >> when DEBUG = FALSE when testing with runserver.
>> >>
>> >> I've been trying to solve this for days now with much googling/pdb/
>> >> logging, but since the exception originates deep inside django I'm not
>> >> familiar enough to find what is going wrong:
>> >>
>> >> Traceback (most recent call last):
>> >>   File "./core/driver.py", line 268, in run
>> >> self.init_norm()
>> >>   File "./driver/emailevent/background.py", line 130, in init_norm
>> >> self.load_config()
>> >>   File "./driver/emailevent/background.py", line 71, in load_config
>> >> events = list(config.events.select_related())
>> >>   File "/usr/local/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/
>> >> django/db/models/manager.py", line 168, in select_related
>> >> return self.get_query_set().select_related(*args, **kwargs)
>> >>   File "/usr/local/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/
>> >> django/db/models/fields/related.py", line 497, in get_query_set
>> >> return
>> >>
>> >>
>> superclass.get_query_set(self).using(db)._next_is_sticky().filter(**(self.core_filters))
>> >>   File "/usr/local/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/
>> >> django/db/models/query.py", line 550, in filter
>> >> return self._filter_or_exclude(False, *args, **kwargs)
>> >>   File "/usr/local/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/
>> >> django/db/models/query.py", line 568, in _filter_or_exclude
>> >> clone.query.add_q(Q(*args, **kwargs))
>> >>   File "/usr/local/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/
>> >> django/db/models/sql/query.py", line 1194, in

Re: MS-SQL server support for DJango

2011-10-03 Thread David Markey
Did you try google?
http://code.google.com/p/django-mssql/ was the first result for "mssql
django"


On 3 October 2011 07:59, Ashith  wrote:

> I am using Reviewboard for code review process in our organization.
> Currently I am using sqlite3 backend for reviewboard since my boss
> hasn't approved installing MySQL on the reviewboard server which is
> already running MS-SQL server.
> Even though I am not a great big fan of MS-SQL I have to adhere to our
> organizational policies, thus now I am stuck with using sqlite3 as the
> backend for reviewboard.
> Since sqlite3 is not designed for production installation of
> reviewboard (we have just started so haven't run into issues yet. But
> I am sure as the DB grows big and the number of concurrent users grow
> sqlite3 will just not handle it) and since I am not able to use MySQL
> is it possible to include MS-SQL support to DJango so that in the
> future we can start using MS-SQL database?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problem getting django on mac (10.5/Leopard) working

2012-01-07 Thread David Markey
Is there a reason you didnt do easy_install django?

On 8 January 2012 01:50, larry.mart...@gmail.com wrote:

> I am trying to get django working on my mac. I downloaded it from SVN
> to /usr/local/django-trunk and it's there:
>
> $ ls /usr/local/django-trunk/
> __init__.py corehttptemplatetags bin
>  db  middleware  test
> confdispatchshortcuts   utils
>   contrib forms
> templateviews
>
> I updated my site-packages with a django.pth file:
>
> $ cat /Library/Python/2.5/site-packages/django.pth
> /usr/local/django-trunk
>
> python does have this dir in its path:
>
> $ python -c "import sys; print sys.path"
> ['', '/Library/Python/2.5/site-packages/cx_Oracle-5.0.2-py2.5-
> macosx-10.5-i386.egg', '/System/Library/Frameworks/Python.framework/
> Versions/2.5/lib/python25.zip', '/System/Library/Frameworks/
> Python.framework/Versions/2.5/lib/python2.5', '/System/Library/
> Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/
> System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
> plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.5/
> lib/python2.5/plat-mac/lib-scriptpackages', '/System/Library/
> Frameworks/Python.framework/Versions/2.5/Extras/lib/python', '/System/
> Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-
> tk', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/lib-dynload', '/Library/Python/2.5/site-packages', '/usr/
> local/django-trunk', '/System/Library/Frameworks/Python.framework/
> Versions/2.5/Extras/lib/python/PyObjC']
>
> But I still can't import it:
>
> $ python
> Python 2.5.1 (r251:54863, May  5 2011, 18:37:34)
> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import django
> Traceback (most recent call last):
>  File "", line 1, in 
> ImportError: No module named django
>
>
> What am I missing or doing wrong?
>
> TIA!
> -larry
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: get django with ftp

2013-06-21 Thread David Markey
No wget or curl command available?

wget https://www.djangoproject.com/download/1.5.1/tarball/ -O django.tar.gz

curl -L https://www.djangoproject.com/download/1.5.1/tarball/ >
django.tar.gz



On 21 June 2013 13:54, Larry Martell  wrote:

> Is there a ftp site I can download django 1.4 and 1.5 from? Usually I
> get it from https://www.djangoproject.com/download/1.5.1/tarball/
> but now I have to install it on a remote machine that I only have
> putty access to, so I can't run a browser.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: change the displayed name of the app in the Django admin?

2011-04-20 Thread David Markey
As i remember the only way is to override the template.

On 20 April 2011 15:06, rahul jain  wrote:

> Can you change the displayed name of the app in the Django admin?
>
> for ex: Select "app_name" to change
>
> Thanks.
>
> Rahul
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread David Markey
At the top of the WSGI script, set the LD_LIBRARY_PATH environment variable.

On 21 April 2011 11:07, kamalp.sha...@gmail.com wrote:

> Hi,
>
> I have installed cx_Oracle module in one of my Solaris box and then
> trying to create a django page to read data from oracle db. But I am
> getting following errors.
>
>
> mod_wsgi (pid=2600): Exception occurred processing WSGI script '/opt/
> www/ui/foo/web/app.wsgi'.
> Traceback (most recent call last):
> File "/opt/www/ui/foo/web/app.wsgi", line 30, in application
> return _application(environ, start_response)
> File "/usr/local/packages/python/2.6.6/lib/python2.6/site-packages/
> django/core/handlers/wsgi.py", line 230, in __call__
> self.load_middleware()
> File "/usr/local/packages/python/2.6.6/lib/python2.6/site-packages/
> django/core/handlers/base.py", line 42, in load_middleware
> raise exceptions.ImproperlyConfigured('Error importing middleware %s:
> "%s"' % (mw_module, e))
> ImproperlyConfigured: Error importing middleware web.web.framework:
> "ld.so.1: httpd: fatal: libclntsh.so.11.1: open failed: No such file
> or directory"
>
>
> I have tried from python shell and i can able to import cx_Oracle
> module as follows:
>
> bash-3.00$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
> bash-3.00$ python
> Python 2.4.4 (#1, Jan 10 2007, 01:25:01) [C] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import cx_Oracle
> >>>
>
> But from the web I am getting the ImproperlyConfigured: configured
> error. Can someone please help me to resolve this issue.
>
> FYI,
>
> I have followed this link to install cx_oracle module.
>
> http://agiletesting.blogspot.com/2005/05/installing-and-using-cxoracle-on-unix.html
>
> Please let me know if you need more info.
>
> Thanks,
> Kamal
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Error: No module named messages.

2011-05-04 Thread David Markey
You're probably using a version of django that is too old.. the messages
framework was introduced in 1.2 i think?

On 4 May 2011 10:10, Jacob Scherffenberg  wrote:

> Have been working on an Error: No module named debug toolbar for a
> couple hours, finally realized that i could just use the ubuntu
> package system, to get it.
> Thought that was all, but now i get Error: No module named messages.?
> What to do?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: [Django] Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread David Markey
What is your database?


On 4 May 2011 12:44, Aragorn  wrote:

> HI,
>
> I can not understand where is the error. when you insert a
> blog comment I receive an email, but this'
> the email I receive !
>
>
> Traceback (most recent call last):
>
>  File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/
> base.py", line 100, in get_response
>   response = callback(request, *callback_args, **callback_kwargs)
>
>  File "/home/max/public_html/examplesite.com/django/dbe/blog/
> views.py", line 78, in add_comment
>   comment.save(notify=notify)
>
>  File "/home/max/public_html/examplesite.com/django/dbe/blog/
> models.py", line 44, in save
>   self.body)
>
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position
> 41: ordinal not in range(128)
>
>
>  GET:,
> POST: [u'e6f50f68eea775e6913acfa18363c8a9'], u'author': [u'cm']}>,
> COOKIES:{'csrftoken': 'e6f50f68eea775e6913acfa18363c8a9'},
> META:{'CONTENT_LENGTH': '70',
>  'CONTENT_TYPE': 'application/x-www-form-urlencoded',
>  'CSRF_COOKIE': 'e6f50f68eea775e6913acfa18363c8a9',
>  'DOCUMENT_ROOT': '/etc/apache2/htdocs',
>  'GATEWAY_INTERFACE': 'CGI/1.1',
>  'HTTP_ACCEPT': 'application/xml,application/xhtml+xml,text/
> html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
>  'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
>  'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
>  'HTTP_ACCEPT_LANGUAGE': 'it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4',
>  'HTTP_CACHE_CONTROL': 'max-age=0',
>  'HTTP_CONNECTION': 'keep-alive',
>  'HTTP_COOKIE': 'csrftoken=e6f50f68eea775e6913acfa18363c8a9',
>  'HTTP_HOST': '10.0.0.163',
>  'HTTP_ORIGIN': 'http://10.0.0.163',
>  'HTTP_REFERER': 'http://10.0.0.163/10/',
>  'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/
> 534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24',
>  'PATH_INFO': u'/add_comment/10/',
>  'PATH_TRANSLATED': '/home/max/public_html/examplesite.com/django/dbe/
> apache/myblog.wsgi/add_comment/10/',
>  'QUERY_STRING': '',
>  'REMOTE_ADDR': '10.0.0.6',
>  'REMOTE_PORT': '6069',
>  'REQUEST_METHOD': 'POST',
>  'REQUEST_URI': '/add_comment/10/',
>  'SCRIPT_FILENAME': '/home/max/public_html/examplesite.com/django/dbe/
> apache/myblog.wsgi',
>  'SCRIPT_NAME': u'',
>  'SERVER_ADDR': '10.0.0.163',
>  'SERVER_ADMIN': 'y...@email.com',
>  'SERVER_NAME': '10.0.0.163',
>  'SERVER_PORT': '80',
>  'SERVER_PROTOCOL': 'HTTP/1.1',
>  'SERVER_SIGNATURE': 'Apache/2.2.16 (Ubuntu) Server at
> 10.0.0.163 Port 80\n',
>  'SERVER_SOFTWARE': 'Apache/2.2.16 (Ubuntu)',
>  'mod_wsgi.application_group': 'www.examplesite.com|',
>  'mod_wsgi.callable_object': 'application',
>  'mod_wsgi.handler_script': '',
>  'mod_wsgi.input_chunked': '0',
>  'mod_wsgi.listener_host': '',
>  'mod_wsgi.listener_port': '80',
>  'mod_wsgi.process_group': 'examplesite.com',
>  'mod_wsgi.request_handler': 'wsgi-script',
>  'mod_wsgi.script_reloading': '1',
>  'mod_wsgi.version': (3, 2),
>  'wsgi.errors': ,
>  'wsgi.file_wrapper':  mod_wsgi.Adapter object at 0x7f1963280c60>,
>  'wsgi.input': ,
>  'wsgi.multiprocess': True,
>  'wsgi.multithread': True,
>  'wsgi.run_once': False,
>  'wsgi.url_scheme': 'http',
>  'wsgi.version': (1, 1)}>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread David Markey
sqlite3 uses unicode by default so you should be ok.


Is that the full stack trace? Can you post another?

On 4 May 2011 13:06, Aragorn  wrote:

> Sqlite3
>
> On 4 Mag, 13:50, David Markey  wrote:
> > What is your database?
> >
> > On 4 May 2011 12:44, Aragorn  wrote:
> >
> >
> >
> > > HI,
> >
> > > I can not understand where is the error. when you insert a
> > > blog comment I receive an email, but this'
> > > the email I receive !
> >
> > > Traceback (most recent call last):
> >
> > >  File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/
> > > base.py", line 100, in get_response
> > >   response = callback(request, *callback_args, **callback_kwargs)
> >
> > >  File "/home/max/public_html/examplesite.com/django/dbe/blog/
> > > views.py", line 78, in add_comment
> > >   comment.save(notify=notify)
> >
> > >  File "/home/max/public_html/examplesite.com/django/dbe/blog/
> > > models.py", line 44, in save
> > >   self.body)
> >
> > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position
> > > 41: ordinal not in range(128)
> >
> > >  > > GET:,
> > > POST: > > [u'e6f50f68eea775e6913acfa18363c8a9'], u'author': [u'cm']}>,
> > > COOKIES:{'csrftoken': 'e6f50f68eea775e6913acfa18363c8a9'},
> > > META:{'CONTENT_LENGTH': '70',
> > >  'CONTENT_TYPE': 'application/x-www-form-urlencoded',
> > >  'CSRF_COOKIE': 'e6f50f68eea775e6913acfa18363c8a9',
> > >  'DOCUMENT_ROOT': '/etc/apache2/htdocs',
> > >  'GATEWAY_INTERFACE': 'CGI/1.1',
> > >  'HTTP_ACCEPT': 'application/xml,application/xhtml+xml,text/
> > > html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
> > >  'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
> > >  'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
> > >  'HTTP_ACCEPT_LANGUAGE': 'it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4',
> > >  'HTTP_CACHE_CONTROL': 'max-age=0',
> > >  'HTTP_CONNECTION': 'keep-alive',
> > >  'HTTP_COOKIE': 'csrftoken=e6f50f68eea775e6913acfa18363c8a9',
> > >  'HTTP_HOST': '10.0.0.163',
> > >  'HTTP_ORIGIN': 'http://10.0.0.163',
> > >  'HTTP_REFERER': 'http://10.0.0.163/10/',
> > >  'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/
> > > 534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24',
> > >  'PATH_INFO': u'/add_comment/10/',
> > >  'PATH_TRANSLATED': '/home/max/public_html/examplesite.com/django/dbe/
> > > apache/myblog.wsgi/add_comment/10/',
> > >  'QUERY_STRING': '',
> > >  'REMOTE_ADDR': '10.0.0.6',
> > >  'REMOTE_PORT': '6069',
> > >  'REQUEST_METHOD': 'POST',
> > >  'REQUEST_URI': '/add_comment/10/',
> > >  'SCRIPT_FILENAME': '/home/max/public_html/examplesite.com/django/dbe/
> > > apache/myblog.wsgi',
> > >  'SCRIPT_NAME': u'',
> > >  'SERVER_ADDR': '10.0.0.163',
> > >  'SERVER_ADMIN': 'y...@email.com',
> > >  'SERVER_NAME': '10.0.0.163',
> > >  'SERVER_PORT': '80',
> > >  'SERVER_PROTOCOL': 'HTTP/1.1',
> > >  'SERVER_SIGNATURE': 'Apache/2.2.16 (Ubuntu) Server at
> > > 10.0.0.163 Port 80\n',
> > >  'SERVER_SOFTWARE': 'Apache/2.2.16 (Ubuntu)',
> > >  'mod_wsgi.application_group': 'www.examplesite.com|',
> > >  'mod_wsgi.callable_object': 'application',
> > >  'mod_wsgi.handler_script': '',
> > >  'mod_wsgi.input_chunked': '0',
> > >  'mod_wsgi.listener_host': '',
> > >  'mod_wsgi.listener_port': '80',
> > >  'mod_wsgi.process_group': 'examplesite.com',
> > >  'mod_wsgi.request_handler': 'wsgi-script',
> > >  'mod_wsgi.script_reloading': '1',
> > >  'mod_wsgi.version': (3, 2),
> > >  'wsgi.errors': ,
> > >  'wsgi.file_wrapper':  > > mod_wsgi.Adapter object at 0x7f1963280c60>,
> > >  'wsgi.input': ,
> > >  'wsgi.multiprocess': True,
> > >  'wsgi.multithread': True,
> > >  'wsgi.run_once': False,
> > >  'wsgi.url_scheme': 'http',
> > >  'wsgi.version': (1, 1)}>
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Django users" group.
> > > To post to this group, send email to django-users@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > django-users+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/django-users?hl=en.- Nascondi testo
> citato
> >
> > - Mostra testo citato -
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Error: No module named messages.

2011-05-05 Thread David Markey
A quick google yields:


https://github.com/robhudson/django-debug-toolbar

On 5 May 2011 19:51, Jacob Scherffenberg  wrote:

> I found the problem, but stil doesn't really know what to do.
> But i was fairly sure that i used 1.3, which i did.
> But when i install the debug-toolbar with sudo apt-get install pyhton-
> djang-debug-toolbar.
> My django version changes to version 1.1.1
> Where can i get the toolbar otherwise, and without apparently reseting
> my django version?
>
> On 5 Maj, 14:12, Karen Tracey  wrote:
> > On Thu, May 5, 2011 at 7:43 AM, Jacob Scherffenberg <
> dikumol...@gmail.com>wrote:
> >
> > > Im using Django-1.3
> >
> > Are you absolutely sure about that? The message generally happens when
> you
> > have a settings file produced by 1.2+ or higher (thus including the
> > django.contrib.messages app in INSTALLED_APPS) but the running level of
> > Django is from before that module was added.
> >
> > Karen
> > --http://tracey.org/kmt/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: I need to create a Django WebService to be consumed by AspNet

2011-06-22 Thread David Markey
Xml-rpc or SOAP?

On 22 June 2011 22:19, Emmanuel Rojas  wrote:

> Hi,
>
> I was test a lot of tutorials in internet but I canĀ“t get it yet, I do
> not understand how to create a web service in Django, would you help
> me?
>
> Thanks in advance
> Emmanuel
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



ERROR: test_14377 (django.contrib.auth.tests.views.LogoutTest), AttributeError: 'module' object has no attribute 'handler500'

2011-07-03 Thread David Markey
Anyone any idea how to fix this, in my urls.py im explicitly doing:

from django.conf.urls.defaults import handler404, handler500, include,
patterns, url


==
ERROR: test_14377 (django.contrib.auth.tests.views.LogoutTest)
--
Traceback (most recent call last):
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/contrib/auth/tests/views.py",
line 270, in test_14377
response = self.client.get('/logout/')
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/test/client.py",
line 305, in get
response = self.request(**r)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/test/client.py",
line 245, in request
response = self.handler(environ)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/test/client.py",
line 79, in __call__
response = self.get_response(request)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/core/handlers/base.py",
line 141, in get_response
return self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/core/handlers/base.py",
line 179, in handle_uncaught_exception
callback, param_dict = resolver.resolve500()
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/core/urlresolvers.py",
line 263, in resolve500
return self._resolve_special('500')
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/core/urlresolvers.py",
line 253, in _resolve_special
callback = getattr(self.urlconf_module, 'handler%s' % view_type)
AttributeError: 'module' object has no attribute 'handler500'

--
Ran 21 tests in 0.481s

Thanks...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ERROR: test_14377 (django.contrib.auth.tests.views.LogoutTest), AttributeError: 'module' object has no attribute 'handler500'

2011-07-07 Thread David Markey
Anyone any ideas? Is this a bug in 1.2.5?

On 3 July 2011 12:52, David Markey  wrote:

> Anyone any idea how to fix this, in my urls.py im explicitly doing:
>
> from django.conf.urls.defaults import handler404, handler500, include,
> patterns, url
>
>
> ==
> ERROR: test_14377 (django.contrib.auth.tests.views.LogoutTest)
> --
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/contrib/auth/tests/views.py",
> line 270, in test_14377
> response = self.client.get('/logout/')
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/test/client.py",
> line 305, in get
> response = self.request(**r)
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/test/client.py",
> line 245, in request
> response = self.handler(environ)
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/test/client.py",
> line 79, in __call__
> response = self.get_response(request)
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/core/handlers/base.py",
> line 141, in get_response
> return self.handle_uncaught_exception(request, resolver,
> sys.exc_info())
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/core/handlers/base.py",
> line 179, in handle_uncaught_exception
> callback, param_dict = resolver.resolve500()
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/core/urlresolvers.py",
> line 263, in resolve500
> return self._resolve_special('500')
>   File
> "/usr/local/lib/python2.7/dist-packages/Django-1.2.5-py2.7.egg/django/core/urlresolvers.py",
> line 253, in _resolve_special
> callback = getattr(self.urlconf_module, 'handler%s' % view_type)
> AttributeError: 'module' object has no attribute 'handler500'
>
> --
> Ran 21 tests in 0.481s
>
> Thanks...
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: CSRF Cookie in IE

2011-03-09 Thread David Markey
If its not too much trouble for you, I've switched to GETs instead of POSTs
for my AJAX calls, so i wont have to think about CSRF again.



On 9 March 2011 14:12, krzysiekpl  wrote:

> Did you try add custom header X-CSRFToken ? Try this solution if youre
> using jquery
>
> $.ajaxSetup({
>beforeSend: function(xhr, settings) {
>if (!(/^http:.*/.test(settings.url) || /
> ^https:.*/.test(settings.url))) {
>// Only send the token to relative URLs i.e. locally.
>xhr.setRequestHeader("X-CSRFToken",
> $("#csrfmiddlewaretoken").val());
>}
>}
>});
>
> http://www.djangoproject.com/weblog/2011/feb/08/security/
>
> On 9 Mar, 14:59, cootetom  wrote:
> > I am experiencing some off behaviour with CSRF but only in IE
> > browsers. Using Django 1.2.5 (final).
> >
> > I have a page that has no form and no use of {% csrf_token %} but it
> > does make a POST request using JavaScript. I have implemented the
> > jQuery code to grab the CSRF cookie value for all AJAX requests. The
> > strange thing is that in IE browsers there is no CSRF cookie but in
> > all other browsers, on the same page that cookie exists. So IE
> > browsers get 403 for AJAX requests and other browsers work just fine.
> >
> > I'm just using the django.middleware.csrf.CsrfViewMiddleware
> > middleware.
> >
> > Here is the scenario to replicate this:
> >
> > 1. Visit a page that does have a form and so does have a {% csrf_token
> > %}
> > 2. Move onto a page that doesn't make use of {% csrf_token %} but does
> > still do a JavaScript POST. The JavaScript POST will work this time
> > around.
> > 3. Close the web browser down, re-open it but go directly to the web
> > page that doesn't use {% csrf_token %} but does make a JavaScript
> > POST. This will now fail as no cookie has been set for CSRF.
> >
> > The documentation says the cookie is set for every request so I don't
> > understand this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django in low memory environments

2011-03-18 Thread David Markey
Perhaps a cheerypy/python based webserver? (So you only need one process)

On 18 March 2011 17:35, Shawn Milochik  wrote:

> I use gunicorn with nginx, albeit on a much more powerful machine.
>
> I think you'll find nginx or lighttpd recommended for a lightweight server.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to Generate a 5 character unique alpha-numeric string

2011-04-10 Thread David Markey
Ermm.. Why not just use a UUID?

On 10 April 2011 18:48, GOUTAM KUMAR RANA  wrote:

> how to Generate a 5 character unique alpha-numeric string to use as primary
> key in my model.
>
> how to show the generated string in a particular textbox when loading a
> particular form or page?
>
>
> Please help
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



python manage.py reset contenttypes doesnt work with mysql 5.5.1 Works with 5.1

2011-04-12 Thread David Markey
Simple django setup, when I try to reset contenttypes app, just after doing
a syncdb..

python manage.py reset contenttypes

You have requested a database reset.
This will IRREVERSIBLY DESTROY any data for
the "contenttypes" application in the database "my_test".
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes
Error: Error: contenttypes couldn't be reset. Possible reasons:
  * The database isn't running or isn't configured correctly.
  * At least one of the database tables doesn't exist.
  * The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlreset contenttypes'. That's
the SQL this command wasn't able to run.
The full error: (1217, 'Cannot delete or update a parent row: a foreign key
constraint fails')

Using django 1.2.5.


Any ideas?

Regards,

David

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.