Re: Is there anything similar to phpmyadmin

2014-09-23 Thread alTus
Well, you know it's more about personal comfort and specific needs. I didn't actually work with workbench but it seems that it's nice software. Also you can consider these ones: HeidiSQL (free and I've heard some good responses about it but needs wine) EMS SQL Studio (lite version is free) воскрес

Re: Accessing request object

2014-09-22 Thread alTus
Collin said you can attach your `request` object to the form object somewhere in your view. After that you will be able to use in anywhere in methods. Also you can consider adding request parameter explicitly to your __init__ method and then passing it to `restrictQuery`. PS. restrictQuery shou

Re: Is there anything similar to phpmyadmin

2014-09-22 Thread alTus
I've come to the fact that standalone apps on your client computer are much more handy for db management. All you need is to set up ssh tunnel to your server. Native apps generally work faster and also allow you not to waste time setting up _stuff_ on the server. SQLYog is a very good program fo

Re: select_related reverse?(!)

2014-05-01 Thread alTus
Hi. select_related is used for folloing foreign keys. So if u have, say, product and its producer field in it u can do smth like: Product.objects.select_related('producer') and in ur templates accessing product.producer won't hit the database. Notice that here we have a relationship where only o

Re: Error to customize a user

2014-04-30 Thread alTus
You don't have `has_perm` and `has_module_perms` methods defined in your user model while they are required: https://docs.djangoproject.com/en/1.5/topics/auth/customizing/#custom-users-and-django-contrib-admin Not sure if it would help coz traceback is not about them but you can at least try and

Re: Django explicit `order_by` by ForeignKey field

2014-04-26 Thread alTus
discussion forward to django-developers in order to > get feedback from the community. > > Simon > > Le vendredi 25 avril 2014 18:50:55 UTC-4, alTus a écrit : >> >> Hi. So I have some small models: >> >> class Group(models.Model): >> name = models.Cha

Django explicit `order_by` by ForeignKey field

2014-04-25 Thread alTus
Hi. So I have some small models: class Group(models.Model): name = models.CharField() class Meta: ordering = ('name',) class Entity(models.Model): name = models.CharField() group = models.ForeignKey(Group, null=True) Now I want to perform a really simple query like t