Search Results

Search found 11 results on 1 pages for 'ha22109'.

Page 1/1 | 1 

  • django models objects filter

    - by ha22109
    Hello All, I have a model 'Test' ,in which i have 2 foreignkey models.py class Test(models.Model): id =models.Autofield(primary_key=True) name=models.ForeignKey(model2) login=models.ForeignKey(model1) status=models.CharField(max_length=200) class model1(models.Model): id=models.CharField(primary_key=True) . . is_active=models.IntergerField() class model2(model.Model): id=models.ForeignKey(model1) . . status=model.CharField(max_length=200) When i add object in model 'Test' , if i select certain login then only the objects related to that objects(model2) should be shown in field 'name'.How can i achieve this.THis will be runtime as if i change the login field value the objects in name should also change.

    Read the article

  • django internationlisation

    - by ha22109
    Hello I need to have multiple language support of my django admin application.I can create the messege files.But how can i change the text of my models.The heading ,fields etc .I m only able to change the static elements which are there in my template. here is example of my class class Mymodel(model.Models): id=models.IntegerField(primary_key=true) name=models.CharField(max_length=200) group=models.CharField(max_length=200) class Meta: managed=False verbose_name_plural='My admin' db_table='my_admin' one more question.In my home page it is showing my verbose name 'My admin' which i mentioned.But when i go to list page it shows me the class name 'mymodel'.Why so.Can i changed that to

    Read the article

  • django 1.1 beta issue

    - by ha22109
    Hello all, I m using django 1.1 beta.I m facing porblem in case of list_editable.First it was throughing exception saying need ordering in case of list_editable" then i added ordering in model but know it is giving me error.The code is working fine with django1.1 final. here is my code model.py class User(models.Model): advertiser = models.ForeignKey(WapUser,primary_key=True) status = models.CharField(max_length=20,choices=ADVERTISER_INVITE_STATUS,default='invited') tos_version = models.CharField(max_length=5) contact_email = models.EmailField(max_length=80) contact_phone = models.CharField(max_length=15) contact_mobile = models.CharField(max_length=15) contact_person = models.CharField(max_length=80) feedback=models.BooleanField(choices=boolean_choices,default=0) def __unicode__(self): return self.user.login class Meta: db_table = u'roi_advertiser_info' managed=False ordering=['feedback',] admin.py class UserAdmin(ReadOnlyAdminFields, admin.ModelAdmin): list_per_page = 15 fields = ['advertiser','contact_email','contact_phone','contact_mobile','contact_person'] list_display = ['advertiser','contact_email','contact_phone','contact_mobile','contact_person','status','feedback'] list_editable=['feedback'] readonly = ('advertiser',) search_fields = ['advertiser__login_id'] radio_fields={'approve_auto': admin.HORIZONTAL} list_filter=['status','feedback'] admin.site.register(User,UserADmin)

    Read the article

  • internationalisation in django

    - by ha22109
    Hello , I am doing internationalisation in django admin.I am able to convert all my text to the specific langauge.But i m not able to change the 'app' name suppose django-admin.py startapp test this will create a app called test inside my project.Inside this app 'test' i can create many classes in my model.py file.But when i register my app 'test' in settings.py file.I am convert all the text in the locale of my browser but my app heading 'test' is not getting changed.How to change that any idea?

    Read the article

  • list editabale error

    - by ha22109
    Hello all, I m using django 1.1 beta.I m facing porblem in case of list_editable.First it was throughing exception saying need ordering in case of list_editable" then i added ordering in model but know it is giving me error.The code is working fine with django1.1 final. here is my code model.py class User(models.Model): advertiser = models.ForeignKey(WapUser,primary_key=True) status = models.CharField(max_length=20,choices=ADVERTISER_INVITE_STATUS,default='invited') tos_version = models.CharField(max_length=5) contact_email = models.EmailField(max_length=80) contact_phone = models.CharField(max_length=15) contact_mobile = models.CharField(max_length=15) contact_person = models.CharField(max_length=80) feedback=models.BooleanField(choices=boolean_choices,default=0) def __unicode__(self): return self.user.login class Meta: db_table = u'roi_advertiser_info' managed=False ordering=['feedback',] admin.py class UserAdmin(ReadOnlyAdminFields, admin.ModelAdmin): list_per_page = 15 fields = ['advertiser','contact_email','contact_phone','contact_mobile','contact_person'] list_display = ['advertiser','contact_email','contact_phone','contact_mobile','contact_person','status','feedback'] list_editable=['feedback'] readonly = ('advertiser',) search_fields = ['advertiser__login_id'] radio_fields={'approve_auto': admin.HORIZONTAL} list_filter=['status','feedback'] admin.site.register(User,UserADmin)

    Read the article

  • Japanese in python function

    - by ha22109
    Hello All, I wrote a function in python which is used to tell me whether the two words are similar or not. but now i want to pass japanese text in my same function.It is giving error not a ascii character.I tried using utf -8 ecoding, but then it giving the same error Non-ASCII character '\xe3' in file Is there any way to do that.I cant generate the msg file for that since the 2 keyword will be not be constant.

    Read the article

  • django internationalisation

    - by ha22109
    Hello , I am doing django admin internationalization .I am able to do it perfectly.But my concern is that in the address bar it is showing the app label in tranlated form which is not in us acii .Is this the problem with django or i m doing something wrong.

    Read the article

  • django internationalisation loading error

    - by ha22109
    Hello All, I m not able to change the locale of django -admin when i switch to different locale from browser.But if i mention in my settings.py the language code then it is working but browser locale doesnot have any impact on it #setting.py LANGUAGES = ( ('ar', gettext_noop('Arabic')), ('ja', gettext_noop('japanese')), ('bg', gettext_noop('Bulgarian')), LANGUAGE_CODE = ''# LANGUAGE_COOKIE_NAME = 'django_language' LOCALE_PATHS = ()

    Read the article

  • caching the form values

    - by ha22109
    Hello , I have a search form.When user post the search form i take the user to the result page which has search form and results of the search.Now if the user click on the back button of the browser ,i want that he should be the search page form filled with his values.I am using java

    Read the article

  • Very Urgent :How to start a new session if a user click on the new tab in IE or mozilla on websphere

    - by ha22109
    Hi, I have one "user search" portlet on the home page of one application running on websphere portal server.Which display the matching user records as per the search criteria filled in the search form.I have requirement to have a "back to search input" link on the results page which onclick should show the filled form on the input jsp. The issue which i am facing is if i open the application in two diff tab of same IE browser and start giving some search criteria and submit and same time search for some other input from other IE tab (in the same browser)and then go back to previous tab and click on "back to search input" link then instead of showing me the first input it will show me the imput which i entered in the next IE tab. I am setting and getting the bean(form bean) through portlet session.but in the two diff tab of same IE it will be the sae user session (and may be the same portlet session..) Please tell me solution for this. The one thing to be notice here is i can access this "user search" application even without doing login also.so it must be taking the default portlet session in this case. what wil happen once i login and then search,will it going to overwrite the portlet session and http session or howz is that?

    Read the article

1