Time out when requesting element from Admin

2015-11-13 Thread Joakim Hove
[ I realize what I am trying to do might be a prime example of abusing the admin. The real answer to my question might very well be: 'sorry - the admin is just not made for that', and that is fine. The main reason I am asking this is to learn more myself - and most importantly to rule out

Re: Issue with post_save signal only when using https

2015-11-13 Thread Shawn H
OMG. I tracked it down. It has nothing to do with signals nor with https. I had a setting wrong on my production box that sent a request to the wrong location. Stupid! Thanks regardless for responding and trying to help. On Friday, November 13, 2015 at 1:18:14 PM UTC-6, James Schneider wrote: >

Re: Issue with post_save signal only when using https

2015-11-13 Thread James Schneider
On Fri, Nov 13, 2015 at 11:04 AM, Shawn H wrote: > The return is a JsonResponse instead of a redirect. The production server > does listen on port 80, but has a permanent redirect to port 443 on the web > server. The thing that's confusing is I'm using this pattern with

Re: Issue with post_save signal only when using https

2015-11-13 Thread Shawn H
The return is a JsonResponse instead of a redirect. The production server does listen on port 80, but has a permanent redirect to port 443 on the web server. The thing that's confusing is I'm using this pattern with other models, with the exception of the post_save signal, and I have no

Model Meta option default_related_name not setting related_query_name

2015-11-13 Thread Alejandro Do Nascimiento
django-users@googlegroups.com Hello, I have a doubt, In a model I'm using the Meta option * default_related_name*, this sets the related manager but it doesn't set the *related_query_name* as using related_name in a field would do, is this a bug or the intended functionality? Neither the new

Bug: Manually changing "_meta.db_table" for model causes "missing FROM-clause entry for table" error

2015-11-13 Thread evilejik
Hello. I've got the same model in two projects and want to copy data from one to another using model meta 'db_table' option: my_model_original_table_name = MyModel._meta.db_table MyModel._meta.db_table = 'old_project_table_name' old_objects =

Adding Image Field to already existing model.

2015-11-13 Thread Atul kumar Gupta
Hi everyone please see the question on http://stackoverflow.com/questions/33684713/adding-an-imagefield-to-already-existing-model-in-django . Any help will be appreciated. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Issue with post_save signal only when using https

2015-11-13 Thread James Schneider
On Fri, Nov 13, 2015 at 9:45 AM, Shawn H wrote: > I have a post_save signal on a model. There are many different places > where this model gets updated and saved, which is why I'm using the signal, > to ensure each time the model is changed, the same code gets called. I

Re: following 302s in WebTest form.submit() (was Best practices for writing functional tests to exercise forms?

2015-11-13 Thread Tim Chase
On 2015-11-13 10:22, Carl Meyer wrote: > As far as I know, you have to call `.follow()` on the response, > which follows the redirect and returns the next response. Is that > what you mean by "manually follow every redirect"? It's manual in a > sense, but there is a convenience method to make it

Issue with post_save signal only when using https

2015-11-13 Thread Shawn H
I have a post_save signal on a model. There are many different places where this model gets updated and saved, which is why I'm using the signal, to ensure each time the model is changed, the same code gets called. I make the calls to save the model instances via a jQuery post. When I run this

Re: following 302s in WebTest form.submit() (was Best practices for writing functional tests to exercise forms?

2015-11-13 Thread Carl Meyer
Hi Tim, On 11/13/2015 10:06 AM, Tim Chase wrote: > On 2015-11-09 12:41, Tim Chase wrote: >> On 2015-11-06 01:09, Carl Meyer wrote: >>> [1] https://pypi.python.org/pypi/WebTest >>> [2] https://pypi.python.org/pypi/django-webtest >> >> Just to follow up, django-webtest has been pretty much exactly

Re: following 302s in WebTest form.submit() (was Best practices for writing functional tests to exercise forms?

2015-11-13 Thread Tim Chase
On 2015-11-09 12:41, Tim Chase wrote: > On 2015-11-06 01:09, Carl Meyer wrote: > > [1] https://pypi.python.org/pypi/WebTest > > [2] https://pypi.python.org/pypi/django-webtest > > Just to follow up, django-webtest has been pretty much exactly what > I was looking for. Thanks! Monkeying around

[no subject]

2015-11-13 Thread Benjamin Smith
I need to update the object with its model form and passed the instance as described in the django doc . However I am having two problems when saving the form: 1. When I change the title and submit the form, the

Re: Custom user model password is not hashed

2015-11-13 Thread Benjamin Smith
The problem was, when creating a custom user, one has to define a custom model form and model admin that handles the password properly. After that it was solved. Thank you. On Thu, Nov 12, 2015 at 9:25 PM, Andreas Kuhne wrote: > Try to debug and check what your

Re: TemplateSyntaxError: 'subpackage.echo' is not a valid tag library

2015-11-13 Thread 'Tom Evans' via Django users
On Fri, Nov 13, 2015 at 12:14 AM, James Schneider wrote: > On Thu, Nov 12, 2015 at 5:10 AM, Jose Paul wrote: >> >> I am just running DJango 1.8 test cases ,here is start of the error trace > > I suspect one of your tests is rendering a template.

Re: Problem with seassion

2015-11-13 Thread Dariusz Mysior
Ok I have it! :) views.py def index(request): return render_to_response('index.html', {'username': request.user.username, 'user':request.user}) index.html {% load staticfiles %} {% block content %} {% if user.is_authenticated %} JesteÅ›

Re: Disable autocomplete in admin field

2015-11-13 Thread Erik Cederstrand
> Den 12. nov. 2015 kl. 14.41 skrev Erik Cederstrand > : > > Hi Ezequeil, > > Thanks for the explanation! This worked, but defining a new widget from > scratch meant that I lost the other helpful attributes (length, class etc.) > that the admin adds for me.

Problem with seassion

2015-11-13 Thread Dariusz Mysior
In the application accounts have everything that regards registration and login and beyond this application in the project folder I have index.html to the home page where I have links to login and registration forms, I would like to index.html in some way to provide request.user.username that