Strange Bug

2016-04-21 Thread Neto
I'm trying to delete but it's happening a strange error. models: class Account(models.Model): pass class Action(models.Model): account = models.ForeignKey('Account', on_delete=models.CASCADE) class Log(models.Model): account = models.ForeignKey('Account', on_delete=models.CASCADE)

Strange bug

2016-04-21 Thread Neto
I'm trying to delete but it's happening a strange error. models: class Account(models.Model): pass class Log(models.Model): account = models.ForeignKey('Account', on_delete=models.CASCADE) class ActionLog(Log): action = models.ForeignKey('Action', on_delete=models.SET_NULL)

Re: Disappearing desktop icons

2016-04-21 Thread Mario Gudelj
I think you're posting this to a wrong list Gary. This od django list. On Friday, 22 April 2016, Gary Roach wrote: > Debian Stretch system > amd64 system > > A couple of weeks ago I updated my system and all of my desktop icons > start looking as shown in attachment.

Re: Turn off migrations completely in Django 1.7

2016-04-21 Thread john . rg . orr
On Thursday, 21 April 2016 18:51:48 UTC+10, Marcin Nowak wrote: > > If you're building some report-like queries, or any static queries, I > would suggest to use raw sql. > You can optionally wrap results with model instances using > Model.objects.raw(). > Thanks Marcin. Yeah, good call

django-filetransfers

2016-04-21 Thread sum abiut
Hi, Have any one on the list used django-filetransfers before. Please advise how to install it. Cheers, -- 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

Why authenticate not returning User object in this case?

2016-04-21 Thread Chris Seberino
I can't seem to get authenticate to return a User object even when password is correct. I dropped into a Django shell to recreate the problem. >>> js >>> js.username 'jsmith' >>> js.check_password("test") True >>> django.contrib.auth.authenticate(username = 'jsmith', password = "test")

Re: Issue with Django Password Normalization

2016-04-21 Thread Rick Leir
Here are links to the dev discussions. https://groups.google.com/d/msg/django-developers/MBSWXcQBP3k/XgWzGhpDBAAJ On Thursday, 21 April 2016 10:47:43 UTC-4, Arun S wrote: > > thanks for some very useful information. > > I did raise this in the dev forum but it was not agreed to be a question >

Re: Issue with Django Password Normalization

2016-04-21 Thread Avraham Serour
so it seems it would only need to use unicodedata.normalize(input, 'NFKD') on usernames and passwords ? https://docs.python.org/2/library/unicodedata.html On Thu, Apr 21, 2016 at 6:11 PM, Rick Leir wrote: > username = models.CharField( >_('username'), >

Re: Issue with Django Password Normalization

2016-04-21 Thread Rick Leir
username = models.CharField( _('username'), max_length=150, unique=True, help_text=_('Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.'), validators=[ validators.RegexValidator( r'^[\w.@+-]+$', It looks as if you could just clear the LOCALE

Re: Issue with Django Password Normalization

2016-04-21 Thread Michal Petrucha
On Thu, Apr 21, 2016 at 07:47:42AM -0700, Arun S wrote: > thanks for some very useful information. > > I did raise this in the dev forum but it was not agreed to be a > question in that forum to discuss whether this should be taken up. > > I guess with all this input, this can be suggested

Re: Issue with Django Password Normalization

2016-04-21 Thread Arun S
thanks for some very useful information. I did raise this in the dev forum but it was not agreed to be a question in that forum to discuss whether this should be taken up. I guess with all this input, this can be suggested tough. -- You received this message because you are subscribed to the

Re: Issue with Django Password Normalization

2016-04-21 Thread Michal Petrucha
On Thu, Apr 21, 2016 at 07:30:07AM -0700, Rick Leir wrote: > Here are the Stackoverflow discussions I mentioned Ñ )oops I have the > Espanol keyboard selected= > > http://stackoverflow.com/questions/16173328/what-unicode > -normalization-and-other-processing-is-appropriate-for-passwords-w >

Re: Issue with Django Password Normalization

2016-04-21 Thread Rick Leir
Here are the Stackoverflow discussions I mentioned Ñ )oops I have the Espanol keyboard selected= http://stackoverflow.com/questions/16173328/what-unicode -normalization-and-other-processing-is-appropriate-for-passwords-w http://stackoverflow.com/questions/2798794/how-do-i-properly-implement-

Re: remove ./ from commands

2016-04-21 Thread Григор Колев
I have no idea how it is on the OSX, but on Linux ./ mean ( run as program and i must have +x on file). The good idea is on the first line in manage.py to add something like that: #!env/bin/python or #!/usr/bin/env python It is the python interpreter path Try to add this line. On linux if have

Help with testing of custom Django admin actions

2016-04-21 Thread Derek
Hi I am looking for help with writing tests for custom Django admin actions; both with and without intermediate pages (ones containing forms). I confess (hangs head in shame) that I have written lots of actions, but not added any tests for these to my test suite. It would be great if there were

Re: remove ./ from commands

2016-04-21 Thread ludovic coues
Do you have the current dir in your path ? 2016-04-21 6:46 GMT+02:00 : > I just installed django 1.9.5. Now I have to type ./manage.py when I used > to just type manage.py. How do I get rid of the need to type ./ > osx el capitan > > -- > You received this

Re: Can not read request.body from a POST request

2016-04-21 Thread Gergely Polonkai
A JSON/XML payload, for example. If you use plain Django (on DRF and other extensions), then request.body is the only way to access said payload. Best, Gergely Gergely Polonkai [image: https://]about.me/gergely.polonkai

Re: remove ./ from commands

2016-04-21 Thread Gergely Polonkai
This is not a Django question per se, but you can either use python manage.py or add the directory where the manage.py script reside to the path. This latter depends on what shell you use, but I guess it’s the default of OS X, so your command becomes this: export

Re: Can not read request.body from a POST request

2016-04-21 Thread Vijay Khemlani
What could be in the body that's not in the supplied Django fields? I have implemented RESTful APIs as you say (no idea why that matters as they are just HTTP requests) and never had the need to read the actual body.. On Thu, Apr 21, 2016 at 2:13 AM, Gergely Polonkai wrote:

Re: Any way to tolerate Unicode w/o changing '' to u''?...

2016-04-21 Thread Tim Graham
I guess you might want six.text_type. https://docs.djangoproject.com/en/dev/topics/python3/#string-handling may help. On Wednesday, April 20, 2016 at 11:41:47 PM UTC-4, Fred Stluka wrote: > > Tim, > > Excellent response, thanks! The link to the doc is just what I > needed. > > One more

Re: No Downtime Code Releases

2016-04-21 Thread Tom Christie
I'd also recommend against splitting your models into a separate repo. There's a decent article on migrations without downtime here: http://pankrat.github.io/2015/django-migrations-without-downtimes/ Essentially "don't run your migrations at the same time as you deploy" and "split

remove ./ from commands

2016-04-21 Thread ken . foust
I just installed django 1.9.5. Now I have to type ./manage.py when I used to just type manage.py. How do I get rid of the need to type ./ osx el capitan -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

(Another) Authentication Question

2016-04-21 Thread Jason Wolosonovich
Hello All, I'm completely new to Django and I've been following along with the excellent video series from CodingEntrepreneurs on YouTube and applying what I can to my project. I'm stuck on the authentication process. I don't believe that the request is being passed to my template correctly

Re: Turn off migrations completely in Django 1.7

2016-04-21 Thread Marcin Nowak
On 21 April 2016 at 10:06, wrote: > Either way - we recently hit another Django limitation - as best I've been > able to tell, joining a table with itself seems to be very poorly supported > - so we're heading towards SqlAlchemy, and probably away from Django > altogether

Re: Turn off migrations completely in Django 1.7

2016-04-21 Thread john . rg . orr
Thanks for the comment Matt. I wasn't trying to change anything in the database, it was just that Django wanted the django_migrations table to exist, but it didn't, and the db was read-only for safety during testing. Could well be that I wasn't using fake properly, I'm not sure, but I'd