Re: Bi-directional ManyToMany with through gets broken when creating test database

2015-12-04 Thread filias
Hi Simon, thanks for your reply, I suspected exactly what you said. I am not sure, this is not my code so I am not aware of the reason for this but I will try to refactor it the way you suggest. Cheers, filipa On Friday, December 4, 2015 at 4:38:41 PM UTC+1, Simon Charette wrote: > > Hi

Re: Bi-directional ManyToMany with through gets broken when creating test database

2015-12-04 Thread filias
dels than I don't think they are related to your error. > > Remco > > On Fri, Dec 4, 2015 at 9:54 AM, filias > > wrote: > >> Hi, >> >> I have recently upgraded to sjango 1.8 and I have 2 models with a >> bi-directional ManyToMany field. It looks li

Bi-directional ManyToMany with through gets broken when creating test database

2015-12-04 Thread filias
Hi, I have recently upgraded to sjango 1.8 and I have 2 models with a bi-directional ManyToMany field. It looks like this class Pizza(Model): available_toppings = ManyToManyField('Topping') class Topping(Model): all_pizzas = ManyToManyField(Pizza, through=Pizza.available_stoppings.throu

Re: Django admin forms - using a different/unconventional widget for a field

2012-09-03 Thread filias
Perfect! Thanks a lot alan :) On Monday, September 3, 2012 3:28:29 PM UTC+2, zayatzz wrote: > > In form, that displays the checkbox do something like this: > def __init__(self, *args, **kwargs): > super(FormName, self).(*args, **kwargs) > if self.instance and self.instance.checkboxfieldna

Django admin forms - using a different/unconventional widget for a field

2012-09-03 Thread filias
Hi, I have a DateTimeField in my model but I want to show with a CheckboxInput. We have a DateTime field in the model because we want to save the datetime when the instance was cancelled but we dont want the user to see that and just check or uncheck the cancellation checkbox. I already overro

Template filters and translations to russian language

2012-03-07 Thread filias
Hi, I am developing a website in russian and the original is in english. We are using the po file to translate the strings. My problem now is that when I use template filters, for example date or localnaturalday the translations do not appear. Everything appears in english. However, if I chang

Problem translating form fields

2010-06-15 Thread filias
Hi, we have several django applications in the same project and in one of them, for some reason, we can't get the translated name for the model form fields. We have no idea why this application doesn't behave like the other ones. In order to see the translated label for the modelform field we ha

Change language when user logs into admin

2010-05-27 Thread filias
Hi, I want to change the language code to english everytime the user logs into the admin site. What is the best way to do it? Can I extend the initial admin view? Thanks in advance, -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: djangojs translations not available

2010-05-20 Thread filias
locale with the djangojs domain files to one of the installed apps and it will work :) I hope this helps people with similar problems. On May 20, 12:17 pm, filias wrote: > Hi, > > I have a djangojs.po file and am compiling the messages with > compilemessages command. > I don't

djangojs translations not available

2010-05-20 Thread filias
Hi, I have a djangojs.po file and am compiling the messages with compilemessages command. I don't get any error but I can't see my translations in the js catalog. I can only see the admin js translations. How can I debug this problem? Thanks in advance. -- You received this message because you

Not translating the admin

2010-04-27 Thread filias
Hi, I have a project with several applications and I am using i18n. I would like to have everything translated except the admin. Is it somehow possible to select which apps are subject to the i18n middleware? Thanks for your help. -- You received this message because you are subscribed to the G

Adding unique_together attribute after database is created

2010-04-26 Thread filias
Hi, I would like to add the unique_together attribute of the Meta class for a model in my app. My question is: my database already exists with several records, it is possible to just add the attribute and not do anything in the database level? does it work? I have tried in a app using sqlite and

Re: Using properties as filters in the admin

2010-04-13 Thread filias
Humm, but are not FilterSpecs used to customized a filter on a specific attribute of the model? In my case I would like that the value of a property is used as a filter in the admin. This property is not related directly with any of the fields from the model. Is there a way of doing this? On Apr

Using properties as filters in the admin

2010-04-12 Thread filias
Hi, I would like to know if it is possible to use properties as filters in the admin site. I have a model with a property and would like to use this property as a filter. As far as I read in the documentation one can only use attributes as filters but I would like to know if there is any workarou

Get the value of a bound field in admin

2010-04-06 Thread filias
Hi, how can I get the value of a bound field in django admin? I am extending some functionalities in the admin and I would like to be able to show something according to the field value. I want to do this in the change_form.html or fieldset.html files, so in the template. How can I get access to

Not translating the admin

2010-03-30 Thread filias
Hi, I have an application in several languages but I would like to keep the admin site always in english. What is the best way to do this? Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Extending the admin - add 'save and go to next' button

2010-03-26 Thread filias
Hi, I want to extend the admin by adding a 'Save/Next' button next to the default 'Save' button. This action would save the instance and show the next instance (if it exists) or go back to the list. What is the best way to do it? Is there any post on best practices on these topic or other admin

Re: Internationalization problem - translations not appearing

2010-03-24 Thread filias
Ok, I managed to fix it with LOCALE_PATHS. Example: LOCALE_PATHS = ('', '/locale') I hope it helps someone :) On Mar 24, 4:22 pm, filias wrote: > Hi, > > I have a project with several applications. The translations to > another language are located in /lo

Internationalization problem - translations not appearing

2010-03-24 Thread filias
Hi, I have a project with several applications. The translations to another language are located in /locale I used the makemessages command (run from the project directory) to generate the .po file and all the marked strings from code and templates appear in the file. I used the compilemessages

Overriding a form from another application

2010-03-23 Thread filias
Hi, I have an application with a model and a modelform. I have another application and in a a specific case I would like to override one attribute from the modelform in the original application. Example: class Article(models.Model): identifier: = models.CharField(max_length=10) headline =

Re: django-test-coverage gcc error

2010-03-11 Thread filias
ok. I installed python2.6-dev and it works now :) thanks again. On Mar 11, 11:50 am, filias wrote: > Thanks Karen, I am using ubuntu karmic. I will search for the package > that I need. > > On Mar 10, 4:34 pm, Karen Tracey wrote: > > > On Wed, Mar 10, 2010 at 11:13 AM, f

Re: django-test-coverage gcc error

2010-03-11 Thread filias
Thanks Karen, I am using ubuntu karmic. I will search for the package that I need. On Mar 10, 4:34 pm, Karen Tracey wrote: > On Wed, Mar 10, 2010 at 11:13 AM, filias wrote: > > I am trying to use a test coverage tool for django. > > > I triedhttp://pypi.python.org/pypi/django

django-test-coverage gcc error

2010-03-10 Thread filias
I am trying to use a test coverage tool for django. I tried http://pypi.python.org/pypi/django-test-coverage/0.1. First with easy_install and after with setup.py install and I get the following error stack: Searching for django-test-coverage Best match: django-test-coverage 0.1 Processing django_

Organizing a model's properties and methods - best practices

2010-03-04 Thread filias
Hi, I have a model which starts to have "too many" properties and methods. I dont know if this is normal or if there are better ways to deal with increasing complexity of a model. In the beginning there were just 4 or 5 properties and methods but with the news demands of the app they started to g

Do fixtures in tests overwrite default model field values?

2010-02-25 Thread filias
Hi, I am running several tests and created a fixture with the test data. I have one model with a custom field which has a default value. I thought my test fixture should overwrite this field for some of the objects but when run the test the value for the field is always the default value. Is thi