Search Results

Search found 3 results on 1 pages for 'enis afgan'.

Page 1/1 | 1 

  • Select a subset of foreign key elements in inlineformset_factory in Django

    - by Enis Afgan
    Hello, I have a model with two foreign keys: class Model1(models.Model): model_a = models.ForeignKey(ModelA) model_b = models.ForeignKey(ModelB) value = models.IntegerField() Then, I create an inline formset class, like so: an_inline_formset = inlineformset_factory(ModelA, Model1, fk_name="model_a") and then instantiate it, like so: a_formset = an_inline_formset(request.POST, instance=model_A_object) Once this formset gets rendered in a template/page, there is ChoiceField associated with the model_b field. The problem I'm having is that the elements in the resulting drop down menu include all of the elements found in ModelB table. I need to select a subset of those based on some criteria from ModelB. At the same time, I need to keep the reference to the instance of model_A_object when instantiating inlineformset_factory and, therefore, I can't just use this example. Any suggestions?

    Read the article

  • Automatic acronym and jargon expansion tool

    - by Ivo Bosticky
    Are there any tools that would help with comprehension of technical documents that contain a mix of domain specific and company specific acronyms and jargon? A tool that is functionally similar to the automatic acronym expansion done by Wikileaks in their Afgan War Diary (as seen at http://213.251.145.96/id/310B4FC4-2F89-4653-A546-1AD5D55BD9F7/) but ideally supports PDF or Microsoft Word documents. The list of acronyms and jargon and their expanded text could be provided in a separate file.

    Read the article

  • Help with two mini-bugs

    - by oneuseaccount
    Let's see if someone can help me with two mini-bugs I have: Sometimes, when I close the laptop and later open it, the touchpad stops working properly. Most times it only acts fuzzy a few seconds and then starts working fine, but other times it stops working completely (I can't move the mouse arrow, althougt clicking buttons work fine) until I restart. Whenever I turn on the computer, some keys excange with others (" becomes @, ? becomes _, ¿ becomes +, etc), and I have to go to Keyboard input and add and delete some language (I use Afgan because it's the first) Thanks.

    Read the article

1