Re: Translation is not working for Template even though po and mo files are created

2015-11-02 Thread Andreas Kuhne
Hi, I am unsure about the project level translations path, if they should be found as well. I have added them manually to settings, but only that path. Application paths get imported automatically. Regards, Andréas 2015-11-02 6:38 GMT+01:00 Sean Xu : > Sorry, > > ~/django-swingtime/django-swin

django- allauth facebook login does not return any information other than "name" and "id"

2015-11-02 Thread Saleem Jaffer
I have added django-auth to my application to authenticate a user via facebook. But on authentication, only the name and id is fetched. Other details like first_name, gender, etc are not fetched. This issue has already been raised here: https://github.com/pennersr/django-allauth/issues/1061 I

django-allauth facebook doesn't collect more information other than "name" and "id"

2015-11-02 Thread Saleem Jaffer
I tried adding facebook login to my application using django-allauth. Unfortunately the only fields that get captured are "name" and "id". All the other information is not captured. This issue has already been addressed here: https://github.com/pennersr/django-allauth/issues/1061. Supposedly,

Re: How do I let forms.models.ModelChoiceField.queryset relate on request.user?

2015-11-02 Thread Vijay Khemlani
At least what I do in those cases is to add a constructor (__init__) to the form class which takes the user as a parameter, modify the choicefield queryset, and then call the original constructor of the form. On Sun, Nov 1, 2015 at 3:50 PM, Axel Rau wrote: > User should see only choices related

Re: Problem with date validator

2015-11-02 Thread felix
El 24/09/15 15:18, felix escribió: El 23/09/15 17:12, felix escribió: When today's date is entered in the form it shows a form error saying that this date (today) is in the future. What is wrong with the validator I'm using to allow dates until today? models.py ... import datetime ... cl

Re: django-allauth facebook doesn't collect more information other than "name" and "id"

2015-11-02 Thread Vadim Serdiuk
First you should add SCOPE and FIELDS keys to facebook settings (in file settings.py) to allow allauth your website capture other information SOCIALACCOUNT_PROVIDERS = { 'facebook': { 'METHOD': 'oauth2', 'SCOPE': ['email', 'public_profile', 'user_friends'], 'AUTH_PARAM

Django admin multipleselect filter

2015-11-02 Thread Andreas Kuhne
Hi all, I have a django site that displays the change list for a class called Order. The Order class has a property called status. I would like to be able to filter the change list by multiple statuses. So a user should be able to check several statuses and show all orders that have one of the che

Re: return values from static files to django admin

2015-11-02 Thread dc
Any lead will be extremely helpful. I am still stuck. :( On Thursday, October 29, 2015 at 11:40:32 PM UTC-4, dc wrote: > > I have declared a charfield 'choice_text' in one of my models. I want to > convert it to a dropdown box in django admin. The choices in the dropdown > list depend on user in

Re: return values from static files to django admin

2015-11-02 Thread Andreas Kuhne
Hi, What you are suggesting doesn't work. You can't communicate with the django backend via javascript if you don't use a lot of ajax requests. I would check django-smart-selects and see if you could use that? Regards, Andréas 2015-11-02 15:57 GMT+01:00 dc : > Any lead will be extremely helpfu

Re: return values from static files to django admin

2015-11-02 Thread dc
Thanks a lot. Let me look into it. Is there any other way I can populate my choice list with user input? On Monday, November 2, 2015 at 10:19:22 AM UTC-5, Andréas Kühne wrote: > > Hi, > > What you are suggesting doesn't work. You can't communicate with the > django backend via javascript if you

Password protect content

2015-11-02 Thread Andrew S
Hello, I have a folder full of HTML files that will reside on a subdomain. I would like to password protect these with user accounts etc. Can this be easily completed with Django? is there any packages that already do this? Andrew -- You received this message because you are subscribed to

Re: Password protect content

2015-11-02 Thread Aaron C. de Bruyn
You might want to check out Apache .htaccess files for securing the files. Django sounds like it might be overkill for password protecting files. -A On Mon, Nov 2, 2015 at 8:37 AM, Andrew S wrote: > Hello, > > I have a folder full of HTML files that will reside on a subdomain. > > I would like t

Re: Random auth_permission + content_type errors during test runs

2015-11-02 Thread Aaron Lelevier
Russell, Thank you for posting this great answer on why this error may be occurring. I was getting this error, and for the live of me (1-2 days), couldn't figure out the issue. Thank you!! On Wednesday, April 2, 2014 at 2:23:48 PM UTC-7, Russell Keith-Magee wrote: > > > On Wed, Apr 2, 2014 a

Re: Random auth_permission + content_type errors during test runs

2015-11-02 Thread Aaron Lelevier
Russel, Thank you for posting this great answer on why this error may be occurring. I was getting this error, and for the life of me (1-2 days), couldn't figure out the issue. Thank you!! -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: return values from static files to django admin

2015-11-02 Thread Andreas Kuhne
Hi, Yes you could just populate the dropdown list with javascript. Regards, Andréas 2015-11-02 17:27 GMT+01:00 dc : > Thanks a lot. Let me look into it. > > Is there any other way I can populate my choice list with user input? > > On Monday, November 2, 2015 at 10:19:22 AM UTC-5, Andréas Kühne

Re: return values from static files to django admin

2015-11-02 Thread ananya choudhury
I tried that. But in that case I need to declare choices in models.py for that field (so that the field is displayed as a dropdown in admin) and then django doesn't accept any string that's not part of the choices list. I am pretty sure I am missing something here. On Mon, Nov 2, 2015 at 2:55 PM,

Re: Password protect content

2015-11-02 Thread Russell Keith-Magee
Hi Andrew, On Tue, Nov 3, 2015 at 12:37 AM, Andrew S wrote: > Hello, > > I have a folder full of HTML files that will reside on a subdomain. > > I would like to password protect these with user accounts etc. > > > Can this be easily completed with Django? is there any packages that > already do

[1.8] Odd error on makemigrations when moving model to another application

2015-11-02 Thread Alex Heyden
Traceback first: ./manage.py makemigrations Traceback (most recent call last): File "./manage.py", line 10, in execute_from_command_line(sys.argv) File "/home/me/.virtualenvs/fluent/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 351, in execute_from_command

Define an order for ManyToManyField by through model field

2015-11-02 Thread Dmitry Voronin
Question on Stackoverflow: http://stackoverflow.com/questions/33486705/define-an-order-for-manytomanyfield-by-through-model-field-with-django class ProductRelation(models.Model): product_a = models.ForeignKey('Product', related_name='c+') product_a_rank = models.PositiveSmall

Re: [1.8] Odd error on makemigrations when moving model to another application

2015-11-02 Thread Alex Heyden
I tried putting the model back in its original module with some much smaller changes, but I'm getting the same error. The error is nonsense in the current context. Is there some intermediate state saved somewhere when you try to run makemigrations? On Mon, Nov 2, 2015 at 4:34 PM, Alex Heyden wro

Re: Password protect content

2015-11-02 Thread John
This is really cool, something I didn't know existed and something I will use immediately. Thanks. John On 02/11/15 21:59, Russell Keith-Magee wrote: > Hi Andrew, > > On Tue, Nov 3, 2015 at 12:37 AM, Andrew S > wrote: > > Hello, > > I have a folder full of HTML

Re: [1.8] Odd error on makemigrations when moving model to another application

2015-11-02 Thread Mike Dewhirst
On 3/11/2015 9:55 AM, Alex Heyden wrote: I tried putting the model back in its original module with some much smaller changes, but I'm getting the same error. The error is nonsense in the current context. Is there some intermediate state saved somewhere when you try to run makemigrations? N

Re: [1.8] Odd error on makemigrations when moving model to another application

2015-11-02 Thread Gergely Polonkai
On 3 Nov 2015 06:07, "Mike Dewhirst" wrote: > > On 3/11/2015 9:55 AM, Alex Heyden wrote: >> >> I tried putting the model back in its original module with some much smaller changes, but I'm getting the same error. The error is nonsense in the current context. >> >> Is there some intermediate state