Re: Need help modifying form on intermediate page of admin action

2017-07-29 Thread Jack Twilley
I looked over those apps and I don't think they'll help with my issue. Let's say that Crate 1 has a capacity of 12 and currently holds 10 jars. If I look at the jars in Crate 2, select 3 of them, and then trigger the admin action to move the selected jars, Crate 1 should *not* be in the drop

Re: Need help modifying form on intermediate page of admin action

2017-07-29 Thread Mark Phillips
You might find one of these helpful - https://github.com/digi604/django-smart-selects https://github.com/yourlabs/django-autocomplete-light Basically, you want a "chained select" that is populated after a value is entered by the user, if I understand the problem. If you want to roll your own,

Need help modifying form on intermediate page of admin action

2017-07-29 Thread Jack Twilley
I have a Django app which keeps inventory. There are two relevant classes here, one named Jar and another named Crate. The Jar class has an attribute crate which is a foreign key for the Crate class. The Crate class has an attribute capacity of type models.IntegerField which represents the

Re: ModelForm with field subset saving all fields

2017-07-29 Thread Tim Graham
It might be worth considering. Here's a quick patch: diff --git a/django/forms/models.py b/django/forms/models.py index ffa8982..bd5d108 100644 --- a/django/forms/models.py +++ b/django/forms/models.py @@ -454,7 +454,8 @@ class BaseModelForm(BaseForm): ) if commit:

Re: Run Django tasks with another programming language

2017-07-29 Thread M Mihai
Well, I didn't do any profile analysis, but I'm using workers for other types of tasks and they do work great, the problem is when I try to send HTTP requests to few website per worker. Also if I use the workers without sending the HTTP requests, using some fake data instead they work fine, so

Re: Unable to extend User model and see it in Django Admin

2017-07-29 Thread Vijay Khemlani
AUTH_USER_MODEL should point to your model class, not the model admin use AUTH_USER_MODEL = 'user_text.User' Assuming that the app where the User model lives is called "user_text" On Sat, Jul 29, 2017 at 12:56 PM, Binny Zupnick wrote: > I've tried many things, but I'll

Unable to extend User model and see it in Django Admin

2017-07-29 Thread Binny Zupnick
I've tried many things, but I'll write what I currently have implemented. admin.py admin.site.register(User, UserAdmin) models.py class User(AbstractUser): phone = models.CharField(max_length=40, unique=True) settings.py AUTH_USER_MODEL = 'user_text.UserAdmin' I do `makemigrations` and I'm

Re: Run Django tasks with another programming language

2017-07-29 Thread Jani Tiainen
Furthermore, your findings would be helpful for others as well. You’ve found something that is slow (or just hogs resources) would allow others to resolve similar issue(s) much more easy. > On 29 Jul 2017, at 20.10, Jani Tiainen wrote: > > Hi. > > You should run

Re: Run Django tasks with another programming language

2017-07-29 Thread Jani Tiainen
Hi. You should run performance profile analysis for python code to figure out what is eating cpu so much. It's easy to do and doesn't take long. That would also give you good understanding about the part that really consumes so much resources and can it be actually fixed or is it something really

Re: Run Django tasks with another programming language

2017-07-29 Thread M Mihai
I've done the same requests on golang using gorutins and they didn't use so much of my processor, I didn't test c# on the same vps, but I think c# will perform better in this case also. Python is a wonderful programing language, but after I've tested the same requests I think I will be better