Question regarding formset initial number of forms

2010-04-28 Thread Sonal Breed
Hi all, I have a model formset as RowFormSet = modelformset_factory(Row, extra=7) I want to initially display 7 rows. And give user a link to add another row one at a time. Hence I used extra = 7 and omitted max_num parameter. So while saving what happens is that, it adds another 7 rows to the

Re: Increase number of rows of a formset dynamically

2010-04-27 Thread Sonal Breed
Following link helped me solve the problem: http://stackoverflow.com/questions/2448970/django-adding-inline-formset-rows-without-javascript On Apr 27, 10:31 am, Sonal Breed wrote: > Hello all, > > I have a ModelFormSet defined as > > RowFormSet = modelformset_factory(Row, e

Increase number of rows of a formset dynamically

2010-04-27 Thread Sonal Breed
Hello all, I have a ModelFormSet defined as RowFormSet = modelformset_factory(Row, extra=7) The requirement is to give user capability to add more rows to the displayed form so that now total number of rows in the formset increases by 1. Can we dynamically add more rows to the formset? If so, ho

Re: Page not found for password_reset_confirm

2010-02-08 Thread Sonal Breed
Thanks Shawn. I put the name of the production site instead of the local test site, hence the page not found error. :( Thanks again for your help, Thanks, Sincerely, Sonal. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Page not found for password_reset_confirm

2010-02-08 Thread Sonal Breed
Thanks Shawn! After changing the domain name in admin, I could get the subject right. however, the page not found problem still persists. I have provided my urls.py earlier. And I have the following files in the directory mentioned in TEMPLATE_DIRS setting. registration/password_reset_complete.ht

Page not found for password_reset_confirm

2010-02-08 Thread Sonal Breed
Hi all, I am implementing "Forgot your password" feature using following tutorial. http://www.rkblog.rk.edu.pl/w/p/password-reset-django-10/ My email for password gets sent. but once I click the URL in the mail get page not found error. My urls.py is urlpatterns += patterns('django.contrib.aut

Re: Access apache environment variable in template

2010-02-04 Thread Sonal Breed
Ya, It did work luke, What was I thinking, accessing it like {{ request.meta["TIER"] }} Sorry for that and thanks again for your help. Sonal On Feb 4, 9:30 am, Sonal Breed wrote: > I mean to say {{ request.meta["TIER"] }} > > On Feb 4, 9:25 am, Sonal Breed w

Re: Access apache environment variable in template

2010-02-04 Thread Sonal Breed
I mean to say {{ request.meta["TIER"] }} On Feb 4, 9:25 am, Sonal Breed wrote: > Hi all, > In my default-server.conf, I set an env variable as > setenv TIER hi > > Can anybody let me know how can I access this variable in the > template. > I tried to

Access apache environment variable in template

2010-02-04 Thread Sonal Breed
Hi all, In my default-server.conf, I set an env variable as setenv TIER hi Can anybody let me know how can I access this variable in the template. I tried to use a bunch of expressions like {% request.meta["TIER"] %} or {% request.environ[TIER] %} but they do not return anything. Any help will b

SSL Redirect on apache.

2009-10-21 Thread Sonal Breed
Hi all, In my application, I need to have https on sign-in, sign-up pages and any page that user visits after log in. I am running my django app on apache 2.2.14 server. I made use of following snippet http://www.djangosnippets.org/snippets/880/ along with many others like 80, 240, 1760 But

Re: How to confirm a successfull/failed database insert call to the user

2009-10-13 Thread Sonal Breed
add and display confirmations: > in view:http://docs.djangoproject.com/en/dev/topics/auth/#messages > > Put messages in base template and you can see them even after redirect. > > > > On Wed, Oct 14, 2009 at 12:39 AM, Sonal Breed wrote: > > > Hi all, > > >

How to confirm a successfull/failed database insert call to the user

2009-10-13 Thread Sonal Breed
Hi all, I need to show a confirm message when the data is saves successfully in the database. My view function snippet is as following: def itemSave(request, id=None, d={}): if request.method == "POST": if request.method == "POST" and form.is_valid(): if action == 'Save

Re: Call javascript function in formset

2009-10-06 Thread Sonal Breed
Solved this problem using JQuery. On Oct 6, 2:26 pm, Sonal Breed wrote: > Hi all, > > I am using a formset in my template. I want to invoke a javascript > function as you click a key in any of the text-fields in this formset. > How do I accomplish this? I did not find any docume

Call javascript function in formset

2009-10-06 Thread Sonal Breed
Hi all, I am using a formset in my template. I want to invoke a javascript function as you click a key in any of the text-fields in this formset. How do I accomplish this? I did not find any documentation in this scenario. {% for data in formset.forms %} {{

Re: Mutually exclusive fields in model validation

2009-09-15 Thread Sonal Breed
signature on your save method, but > that should get you pointed in the right direction. > > Cheers, > Cliff > > On Tue, 2009-09-15 at 14:33 -0700, Sonal Breed wrote: > > Hi all, > > > I have a model wherein I want to put a validation as > > You must ente

Mutually exclusive fields in model validation

2009-09-15 Thread Sonal Breed
Hi all, I have a model wherein I want to put a validation as You must enter Field1 or Field2, but not both. This model is at the back end and not visible through forms. How do I accomplish it? Thanks, Sincerely, Sonal --~--~-~--~~~---~--~~ You received this mess

Re: django-tinymce problem on server

2009-09-02 Thread Sonal Breed
Hi Joost, I installed aspell and en library on web server and now spellcheker is running fine. Thanks a ton for your help and it is a great application. Thanks, Sincerely, Sonal. On Sep 1, 3:37 pm, Sonal Breed wrote: > Hello Joost, > > I came acrosshttp://code.google.com/p/djang

Re: django-tinymce problem on server

2009-09-01 Thread Sonal Breed
direct me. Do I need to install ispell, myspell first and their dictionaries and how do I link it to enchant? It will be really appreciated if you can provide some way. Thanks, Sincerely, Sonal. On Sep 1, 2:04 pm, Sonal Breed wrote: > Hello Joost, > > I had previously comm

Re: django-tinymce problem on server

2009-09-01 Thread Sonal Breed
Hello Joost, I had previously commented out t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText)); line in tiny_mce/plugins/ spellchecker/edotor_plugin.js as I was getting some error when I click spellchecker with empty text area. Hence, the error messages were misleadin

Remove leading and trailing whitespaces in TinyMCE text area.

2009-08-28 Thread Sonal Breed
Hi all, I have a textfield which I am rendering as a TinyMCE widget. So the value entered in this text field is passed in html format to the server. I want to trim leading and trailing whitespaces from the value. Since the value sent back is always in following format: some value , even though I

django-tinymce problem on server

2009-08-27 Thread Sonal Breed
Hi all, I have django-tinymce spellchecker working perfectly on my local machine which is Ububtu. But as soon as, I deploy it on a web host (CentOS), it gives me problems. Specifically, when I click the specllchecker button, following errors are logged: Traceback (most recent call last): File

Building enchant-1.5.0

2009-08-25 Thread Sonal Breed
Hello all, I am trying to have enchant package on server machine. Just using easy- install PyEnchant did not work as I get following errors when I try to import enchant package in python interactive window: >>> import enchant Traceback (most recent call last): File "", line 1, in File "/home/my

Multiple pagination on a sinle page.

2009-08-18 Thread Sonal Breed
Hi all, In my application, I want to have pagination for multiple objects (Friends, Stories) on a single page. Problem is if I click next on one of the paginated objects, all the paginated objects on the page move to next page. How do I accomplish individual pagination on a single page for multip

Spellchecker gives error when clicked with empty textarea.

2009-08-13 Thread Sonal Breed
Hello all, I installed Pyenchant package and have spellchecker in the tinymce toolbar. The spellchecker button works fine when there is some text in associated text area. However, when I click the button with empty text area, following error is displayed in a dialog box: Error response: Error ru

Re: Error: ce is not defined

2009-08-13 Thread Sonal Breed
Hello all, All I needed to was add spellchecker in editor_template.js's theme_advanced_buttons1 and that gave me the button in toolbar. Thanks in advance, Sonal. On Aug 13, 9:05 am, Sonal Breed wrote: > Hello Joost, everyone, > > I am trying to add specllchecker in tinymc

Re: Error: ce is not defined

2009-08-13 Thread Sonal Breed
, 'spellchecker_rpc_url' : "{{ spellchecker_rpc_url }}" } I still am not able to see the spellchecker in the toolbar, I am definitely missing something, can anybody tell me wht additional steps I need to take?? Thanks in advance, Sincerely, Sonal. On Jul 15, 11:24 am,

Re: mysql setting eror

2009-07-23 Thread Sonal Breed
n Jul 23, 10:03 am, Sonal Breed wrote: > Hello saketh, > The name of the db is mygodb, i just happened to give the example of > Django_db in mysql console. > I am still getting the error. Does anybody know the solution to this?? > > Any help will be really appreciated, > Sonal.

Re: mysql setting eror

2009-07-23 Thread Sonal Breed
Hello saketh, The name of the db is mygodb, i just happened to give the example of Django_db in mysql console. I am still getting the error. Does anybody know the solution to this?? Any help will be really appreciated, Sonal. On Jul 23, 9:47 am, Sonal Breed wrote: > Yes , the name of

Re: mysql setting eror

2009-07-23 Thread Sonal Breed
Yes , the name of the database is mygodb.. On Jul 23, 9:45 am, Saketh wrote: > You seem to be accessing 'mygodb' from your django config, for which > so...@localhost might not have permissions. Is this the case? > > Sincerely, > Saketh > > On Thu, Jul 23, 2009

mysql setting eror

2009-07-23 Thread Sonal Breed
Hi all, I am migrating my project from sqlite3 to mysql. Installed mysql and mysqldb on my machine and executed following: mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.0.51a-3ubuntu5.1 (Ubuntu) Type

Re: When uploaded on server, tinymce is not recognized

2009-07-20 Thread Sonal Breed
Sorry guys, it was just some settings in settings.py and urls.py.. Works for now.. Smiles, Sonal. On Jul 20, 1:40 pm, Sonal Breed wrote: > Hi all, > > I successfully installed Django-tinymce on my local machine using > instructions given athttp://code.google.com/p/django-tinymce/

When uploaded on server, tinymce is not recognized

2009-07-20 Thread Sonal Breed
Hi all, I successfully installed Django-tinymce on my local machine using instructions given at http://code.google.com/p/django-tinymce/ But when I uploaded the project dir to server, I am getting the error as "no module named tinymce" I had installed tinymce using python setup.py install optio

Re: Dynamic var passing in queryset for date_based.archive_index

2009-07-15 Thread Sonal Breed
gt; > python/django hacker & sys > adminhttp://almirkaric.com&http://twitter.com/redduck666 > > On Wed, Jul 15, 2009 at 1:42 PM, Sonal Breed wrote: > > > Hello Almir, > > Thanks for your comment. I added following in my wrapper view: > > > @l

Re: Dynamic var passing in queryset for date_based.archive_index

2009-07-15 Thread Sonal Breed
imply like text. Any inputs on this? Thanks a lot, Sonal. On Jul 15, 12:11 pm, Almir Karic wrote: > I would make an wrapper view that sets up the queryset and calls the > generic view. > > python/django hacker & sys > adminhttp://almirk

Dynamic var passing in queryset for date_based.archive_index

2009-07-15 Thread Sonal Breed
Hi all, I am using django.views.generic.date_based.archive_index in my url patterns as below: story_info_dict = { 'queryset': CareStory.objects.all(), 'date_field': 'date_created', } urlpatterns = patterns('', .. (r'^story/index/?$', 'django.views.generic.date_based.archive_

Re: Error: ce is not defined

2009-07-15 Thread Sonal Breed
I will keep you posted, Joost, on this issue... On Jul 15, 2:43 am, Joost Cassee wrote: > On Jul 14, 10:51 pm,SonalBreed wrote: > > > After I made TINYMCE_COMPRESSOR as False, I could get tinymce toolbar. > > However, the style dropdown is showing empty, and there are couple of > > other things

Re: Error: ce is not defined

2009-07-14 Thread Sonal Breed
Well Joost, After I made TINYMCE_COMPRESSOR as False, I could get tinymce toolbar. However, the style dropdown is showing empty, and there are couple of other things I would like to have, like spell checker and color. Have to go through tinymce docs, do u have any tips? Thanks in advance, Sonal.

Slug Field

2009-07-14 Thread Sonal Breed
Hi all, I am little confused about the working of slug fields. I have a model: class Story(models.Model): slug = models.SlugField(unique_for_date = 'date_created', help_text="suggested values automatically generated from title" title = models.CharField(max_length=50, blank

Error: ce is not defined

2009-07-13 Thread Sonal Breed
Hi all, I am trying to add django-tinymce-1.5 in my application. I downloaded tinymce_3_2_5 and installed it using sudo python setup.py install. In my settings I have following: PROJECT_DIR = os.path.dirname(__file__) MEDIA_ROOT = os.path.join(PROJECT_DIR, 'static') MEDIA_URL = 'http://localhost:

Re: deletion of multiple entries through CheckBox.

2009-07-09 Thread Sonal Breed
Hi all, and R, Was able to achieve this using request.POST.getlist("CheckBoxName") and assigning value of primary key to checkbox. So when selected, the particular DB entry is deleted. Thanks a lot for your help. Sonal On Jul 8, 10:23 pm, urukay wrote: > Sonal, > > i used Ajax, posted dict with

deletion of multiple entries through CheckBox.

2009-07-08 Thread Sonal Breed
Hi all, I am trying to achieve the deletion of multiple comment/data entries by selecting corresponding checkboxes like GMail or other mail apps. These entries are stored individually as rows in a DB table. How can my view function know which entry to delete based on the value of checkbox in temp

Re: Design a good scrapbook system

2009-07-08 Thread Sonal Breed
checkboxes like GMail or other mail apps. Since that is a different thread, I am going to post in a new Post. Please view it and let me know your feedback. Thanks, Sonal. On Jul 8, 1:07 pm, Aaron Maxwell wrote: > On Wednesday 08 July 2009 09:07:54 am Sonal Breed wrote: > > > Hi all, &g

Design a good scrapbook system

2009-07-08 Thread Sonal Breed
Hi all, Can anyone tell me how to design a good scrapbook system like Orkut or Facebook where user can scrap or comment on other user's profile. I am trying to develop this for a social networking site built in Django.. I have been looking for some directions and got hold of Pinax, but it did not

Re: Deletion of individual rows i formset

2009-07-06 Thread Sonal Breed
, Sonal Breed wrote: > Hi all, > I have been trying to achieve following scenario: > 1. I have a model named ContactRow > class ContactRow(models.Model): >   """Emergency contact row model """ >   card = models.ForeignKey(ContactCard, related_name=

Deletion of individual rows i formset

2009-07-06 Thread Sonal Breed
Hi all, I have been trying to achieve following scenario: 1. I have a model named ContactRow class ContactRow(models.Model): """Emergency contact row model """ card = models.ForeignKey(ContactCard, related_name='data') # ContactCard is another model. name = models.CharField(max_length=22)

Re: Limit the number of forms in a Formset.

2009-06-23 Thread Sonal Breed
Thanks a lot Karen, I cannot thank you enough.. The solution worked and solved many of my problems. Thanks a ton! Sonal. On Jun 19, 7:46 pm, Karen Tracey wrote: > On Fri, Jun 19, 2009 at 5:01 PM, Sonal Breed wrote: > > > Hi all, > > I am trying to display a formset in my app

Limit the number of forms in a Formset.

2009-06-19 Thread Sonal Breed
Hi all, I am trying to display a formset in my application such that it only contains number of forms equal to number of database instances. My models are as below: class Card(models.Model): name = models.CharField(max_length=20, blank=False, null=False, unique=True) def __str__(self): r

Django Class method and attribue summary on the lines of JavaDoc

2009-05-20 Thread Sonal Breed
Hi all, I am a newbie to Django and I come from Java background. I was looking for a comprehensive summary of Django classes like you have it in Java. This would enable one to know where to look for a possible class to use and find all the methods in it. Thanking you in advance, Sincerely, Sonal