Re: Strange Bug

2016-04-22 Thread Neto
I discovered the problem, I have a post_delete for Action that creates a log, the problem is that this log is related to the Account, and it tries to create a log for an account being deleted, this was the conflict. Unfortunately Django does not say that the problem was in post_save. Thank you,

Problems changing django version of docs with non engligh languages

2016-04-22 Thread Miguel Coronado
Hi there, I recently found that documentation of django 1.9 is available in Spanish (es). However, when "es" is selected, I don't have the option to select the documentation for version 1.8 (which is not available in that language) To do so I have to first switch to "en" and then to 1.8. It

Re: Strange Bug

2016-04-22 Thread Michal Petrucha
> Em sexta-feira, 22 de abril de 2016 01:59:25 UTC-3, Neto escreveu: > > > > 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',

Getting Options preflight error while accessing API from angularjs

2016-04-22 Thread Chitrank Dixit
Hello developers, I am using Django 1.9 with python 3.5. On the frontend we are using Angularjs and we are trying to access the API. While trying to access POST, the API hits with OPTIONS method and the data does not comes up. I thought to use django-cors-headers and used all the settings as

Question about admin.StackedInline

2016-04-22 Thread Said Akhmedbayev
Thank you in advance! I am new to Django, trying to build a small app for my friend. The app mock-up is here Basically, the app will include Units/Lessons with Subsection, each Subsection will end with several questions. Here my models.py from django.db import

Re: Strange Bug

2016-04-22 Thread Neto
Erick, *ActionLog* is inheriting *Log*. Please, pay attention before commenting, and see that the error has nothing to do with what you said. Em sexta-feira, 22 de abril de 2016 01:59:25 UTC-3, Neto escreveu: > > I'm trying to delete but it's happening a strange error. > > models: > class

Re: scarico() got an unexpected keyword argument 'string'

2016-04-22 Thread Steven Crockett
Your are capturing a URL parameter and naming it "string". First, I'm going to recommend you call your parameter something other than "string" (although that is a valid name). I will use "my_string" instead, so your url will look like: url(r'^scarico/(?P.+)/$', views.scarico, name='scarico')

Re: Authentication for mobile devices

2016-04-22 Thread Steven Crockett
If you are writing a native app, and using Django as a backend web service, there is no built-in library within django, as far as I know. I have used https://github.com/jpulgarin/django-tokenapi with some success. It is rather secure as long as you are using https in production. On Friday,

Re: A Problem about UnicodeEncodeError

2016-04-22 Thread Steven Crockett
Hi. Could you post more of the exception traceback? Here is a workaround others have found for a problem similar to yours: https://code.djangoproject.com/ticket/23704 It seems to be something to do with your PATH setting within Windows possibly containing some non-standard character. On

Re: Why authenticate not returning User object in this case?

2016-04-22 Thread Chris Seberino
Solved...must add AUTHENTICATION_BACKENDS = ["django.contrib.auth.backends.ModelBackend"] to settings.py On Thursday, April 21, 2016 at 5:20:38 PM UTC-5, Chris Seberino wrote: > > I can't seem to get authenticate to return a User object even when > password is correct. > > I dropped into a

Authentication for mobile apps

2016-04-22 Thread Deep Shah
I am new to Django. I want to know how does authentication work for mobile apps. How do I keep the user logged in? Is there any in-built way in Django to manage tokens or something similar for mobile apps? -- You received this message because you are subscribed to the Google Groups "Django

Authentication for mobile devices

2016-04-22 Thread Deep Shah
I am new to Django. I want to know how will authentication work on mobile apps. How do I keep the user logged in on my mobile apps and not make them login every time? Is there any in-built method to save a token or something? -- You received this message because you are subscribed to the

A Problem about UnicodeEncodeError

2016-04-22 Thread nku . mtl
Hello, I'm a beginner of Python. Recently,I want to learn something about django.But I meet a problem: I created a django project following the tutorial successfully , but when I ran the command "python manage.py runserver", the cmd show the error information: UnicodeEncodeError:

scarico() got an unexpected keyword argument 'string'

2016-04-22 Thread 'luca72' via Django users
Hello my view is as follow def scarico(request, data): print(data) . the url is : url(r'^scarico/(?P.+)/$', views.scarico, name='scarico'), the form is Norma Azione {% for data in lista_norme %} {% data %} Scarica {%

Re: my mysite/templates/admin/base_site.html is ignored (tutorial unclear?)

2016-04-22 Thread woodz
Aloha Andreas Ka, have you been able to get this to work? I am currently going through the version 1.9 and facing the same issue. Is the suggestion of Marc Moncrief * a way to go? Did you go for your own solution and would you mind to share?*Thanks a lot, woodz On Sunday, November 16, 2014 at

Re: Turn off migrations completely in Django 1.7

2016-04-22 Thread Marcin Nowak
On 22 April 2016 at 02:02, wrote: > Yeah, good call perhaps. We're certainly drawn to raw sql (which we all > know fairly well) compared to learning Django's tricks for complex queries, > but the originator of our project chose to write lots of unit tests using > sqlite

Re: Disappearing desktop icons

2016-04-22 Thread Gary Roach
Sure did. Debian-list is just above Django list on my main client filter. Sorry Gary R. On 04/21/2016 08:24 PM, Mario Gudelj wrote: I think you're posting this to a wrong list Gary. This od django list. On Friday, 22 April 2016, Gary Roach

Re: Strange Bug

2016-04-22 Thread Erik Cederstrand
Hi Neto, > Den 22. apr. 2016 kl. 06.59 skrev Neto : > > [...] > class ActionLog(Log): > action = models.ForeignKey('Action', on_delete=models.SET_NULL) > > [...] > > ActionLog.objects.create(account=account, action=action) Something's wrong with your example.

Re: Q() chaining with & returns empty set

2016-04-22 Thread Peter of the Norse
They talk about this in the documentation. https://docs.djangoproject.com/en/1.8/topics/db/queries/#spanning-multi-valued-relationships Anything in a single filter() involves the same object. For example, if you wanted to find all baskets containing a three pound banana, you would do