Monday, December 31, 2012

Re: When I set DEBUG=False, my 404.html doesn't appear



On Sat, Dec 29, 2012 at 12:43 PM, nimesh ghelani <nimeshghelani@gmail.com> wrote:
Can you post the shell output when 404 occurs along with the TEMPLATE_DIRS part of settings.py?


On Saturday, December 29, 2012 9:29:11 PM UTC+5:30, Dae_James wrote:
I put my 404.html into root of the directory specified in TEMPLATE_DIRS. However, when I visit an inexisting page, the browser's 404.html appears rather than my own 404.html page.
What's wrong with me ?
PS: I've set the DEBUG variable in settings.py to False.
 

Dae James

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/gHqHfu2BGzoJ.

To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: alternate way for nested inline in django admin

it no posible nested inline in django !!


On Sat, Dec 29, 2012 at 10:36 AM, Nikhil Verma <varma.nikhil22@gmail.com> wrote:
Hi All

Can somebody explain me the workaround for this ticket 9025. I want to nested inlines in my django admin
explained below.

Thanks in advance

On Fri, Dec 28, 2012 at 10:54 PM, Nikhil Verma <varma.nikhil22@gmail.com> wrote:
Hi Guys

Here are my models :-

class Blog(models.Model):
    """
    This model represents information that is stored about a blog.
    """
   
    seo_tag = models.CharField(max_length=100)
    title = models.CharField(max_length=100, unique=True)
    description = models.TextField(verbose_name="content")
    meta_description = models.TextField(max_length=5000)
    image = models.ImageField(upload_to="blogs/images/", blank=True)
    video = models.FileField(upload_to="blogs/videos/", blank=True)
     -------- and so on ------------

class BlogSidebarTitle(models.Model):
    """
    Describes the related title and sublinks inside
    the custom sidebar
    """
   
    associated_blog = models.ForeignKey(Blog)
    title = models.CharField(max_length=255,null=True,blank=True)
    title_sequence = models.IntegerField(null=True,blank=True)
   
    def __unicode__(self):
        return self.title
   
#-------------------------------------------------------------------------------
class BlogSidebarSubtitle(models.Model):
    """
    Subtitle within the sidebar
    """
    associated_blog = models.ForeignKey(Blog)
    title = models.ForeignKey(BlogSidebarTitle)
    sublink_title = models.CharField(max_length=255,null=True,blank=True)
    sublink_title_sequence = models.IntegerField(null=True,blank=True)
    sublink_title_url = models.URLField(blank=True,null=True)
   
    def __unicode__(self):
        return self.sublink_title



Now i want that if i go to add blog page in admin i can add multiple subtitle  for a single title

Like this :-

Add blog Page :-
After blog fields in admin
# I want that it should be Tabularline
Fieldset Blog Sidebar title
            Title                                 Title sequence
            # after this is should be having
           Sublink_title                     sublink_title_sequence     sublink _title_url    
           # then is hould be able to add more subtitle to single title
           + Add another Sublink title

So i wrote the admin like this :-

#-------------------------------------------------------------------------------
class BlogSidebarSubtitleInline(admin.TabularInline):
    """
    """
   
    models = BlogSidebarSubtitle
    extra = 1
#-------------------------------------------------------------------------------
class BlogSidebarTitleInline(admin.TabularInline):
    """
    Making it appear on blog screen
    """
   
    model = BlogSidebarTitle
    extra = 1
#-------------------------------------------------------------------------------
class BlogSidebarTitleAdmin(admin.ModelAdmin):
    inlines = [BlogSidebarSubtitleInline,]
    extra = 1

class BlogAdmin(admin.ModelAdmin):
    """
    Finally the layout of it.
    """
   
    # For tags
    filter_horizontal = ('tags',)
   
    # Calling the Editor
    class Media:
        js = (
              '/static/tinymce/jscripts/tiny_mce/tiny_mce.js',
              '/static/js/textarea.js',
              )
    # Finally diving the page into fieldsets
    fieldsets = [
        ('Blog',{'fields': ['seo_tag', 'title','meta_description', 'description',
                            'category', 'image','video', 'save_as_draft',
                            'featured', 'tags']})]
    #readonly_fields = ['seo_tag',]
   
    inlines = [BlogSidebarButtonsInline, BlogSidebarTitleInline]


But still the BlogSidebarSubtitle class fields are not appearing in admin and i am not able to have nested inlines.

Can anybody tell the appropriate way to do this and if not where i am doing wrong in the above code.

Thanks  .
--
Regards
Nikhil Verma
+91-958-273-3156



--
Regards
Nikhil Verma
+91-958-273-3156

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Happy new year

Thanks all :) Here's India wishing a very happy, healthy and prosperous new year to all Djangonauts around the world :)


On Tue, Jan 1, 2013 at 10:43 AM, JOSE LUIS FABREGA <jfabrega23@gmail.com> wrote:
Feliz año nuevo, desde venezuela

¡Le deseamos lo mejor !

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Yati Sagade

Software Engineer at mquotient

Twitter: @yati_itay | Github: yati-sagade

Organizing member of TEDx EasternMetropolitanBypass
http://www.ted.com/tedx/events/4933
https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

RE: Happy new year

Happy new year from TEXAS!

On Dec 31, 2012 11:49 PM, "JOSE LUIS FABREGA" <jfabrega23@gmail.com> wrote:
Feliz año nuevo, desde venezuela

¡Le deseamos lo mejor !

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Creating a project error

On 1/01/2013 4:06pm, shaggy0n wrote:
> Hi
>
> i'm totally newby django user.
> When i trydjango-admin.py startproject mysite command i've got this
> error: .....
> ...lib/python3.1/site-packages/django/utils/functional.py", line 349, in
> <module>

If you want to use Python 3.x you want Django 1.5.x and then you need to
check which version of Python 3.x it needs.

If you are using Django 1.4.3 (which I think is the latest stable
release) you should be using Python 2.x

hth

Mike

> from functools import total_ordering
> ImportError: cannot import name total_ordering
>
> what should i do? i use virtualenv.
>
> regards...
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/7_y_TS3GcfcJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

RE: Happy new year

Feliz año nuevo, desde venezuela

¡Le deseamos lo mejor !

Creating a project error

Hi

i'm totally newby django user.
When i try django-admin.py startproject mysite command i've got this error: .....
...lib/python3.1/site-packages/django/utils/functional.py", line 349, in <module>
    from functools import total_ordering
ImportError: cannot import name total_ordering

what should i do? i use virtualenv.

regards...


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/7_y_TS3GcfcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Happy new year

A happy 2013 and lot's of django development in this new year from Zambia.

On Tue, Jan 1, 2013 at 5:44 AM, Rodrigo Morgado <rodrigo@ewok.cl> wrote:

Happy New Year to all of you from Santiago, Chile!

El 31/12/2012 21:28, "Victor Manuel Quiñones Victor" <quinonesvictor@gmail.com> escribió:

Happy New Year!! Have a good year to all you.

Cheers

On Mon, Dec 31, 2012 at 9:10 PM, Raphael <development@develissimo.com> wrote:
Happy New Year from Austria to all of you! You are awesome guys and girls!


--
Raphael  http://develissimo.com  



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Quiñones Victor Manuel
Tel: +54 0362 15 4 880839
Resistencia - 3500
Argentina

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Ernest Mundia
"Keep looking....Don't settle"

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Happy new year

Happy New Year to all of you from Santiago, Chile!

El 31/12/2012 21:28, "Victor Manuel Quiñones Victor" <quinonesvictor@gmail.com> escribió:
Happy New Year!! Have a good year to all you.

Cheers

On Mon, Dec 31, 2012 at 9:10 PM, Raphael <development@develissimo.com> wrote:
Happy New Year from Austria to all of you! You are awesome guys and girls!


--
Raphael  http://develissimo.com  



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Quiñones Victor Manuel
Tel: +54 0362 15 4 880839
Resistencia - 3500
Argentina

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Happy new year

Happy New Year!! Have a good year to all you.

Cheers

On Mon, Dec 31, 2012 at 9:10 PM, Raphael <development@develissimo.com> wrote:
Happy New Year from Austria to all of you! You are awesome guys and girls!


--
Raphael  http://develissimo.com  



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Quiñones Victor Manuel
Tel: +54 0362 15 4 880839
Resistencia - 3500
Argentina

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Happy new year

Happy New Year from Austria to all of you! You are awesome guys and girls!


--
  Raphael  http://develissimo.com  



Re: Happy new year

Happy new year to all of Django users worldwide.


--
Atenciosamente
___________________________
Rodrigo Martins
www.rrmartins.com

tel: (28) 9882-6202
      (27) 9601-9573
      (21) 9942-2016

 

My profiles: Facebook Twitter
Contact me: Google Talk/ rodrigo@rrmartins.com Skype/ rr_martinsj MSN/ rodrigo@rrmartins.com



2012/12/31 Nevio Vesic <nevio.vesic@gmail.com>
Happy New Year to all Django group users from Croatia!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Happy new year

Happy New Year to all Django group users from Croatia!

May 2013 be for you the year of happiness, joy and personal as professional success!


On Mon, Dec 31, 2012 at 11:02 PM, Mário Neto <macndesign@gmail.com> wrote:
Happy new year from Brasil to all djangonautics of the world.
Many django projects for all!

Best regards.


2012/12/31 Ariel Calzada <ariel.calzada@gmail.com>

Happy new year from Colombia

El 31/12/2012 16:42, <cingusoft@gmail.com> escribió:

Happy new year from spain to all django lovers.
I wish you a new year with tons of django projects.

Cheers
Cingusoft
BlackBerry de movistar, allí donde estés está tu oficin@

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Att. Mário Araújo Chaves Neto
Programmer, Designer and U.I. Engineer

MBA in Design Digital - 2008 - FIC
Analysis and Systems Development - 2011 - Estácio
Design and Implementation of Internet Environments - 2003 - FIC

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Nevio Vesić
Web Application Developer @ TelTech Systems, Inc.



Skype: 
nevio.vesic

Mobile: 
(Croatia) 00385 91-525-6970 
(US)        001 (732) 908-7445

----------------------------------
WARNING !!! This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review; use, disclosure or distribution is prohibited, and could result in criminal prosecution. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. This message is private and is considered a confidential exchange - public disclosure of this electronic message or its contents are prohibited.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Happy new year

Happy new year from Brasil to all djangonautics of the world.
Many django projects for all!

Best regards.


2012/12/31 Ariel Calzada <ariel.calzada@gmail.com>

Happy new year from Colombia

El 31/12/2012 16:42, <cingusoft@gmail.com> escribió:

Happy new year from spain to all django lovers.
I wish you a new year with tons of django projects.

Cheers
Cingusoft
BlackBerry de movistar, allí donde estés está tu oficin@

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Att. Mário Araújo Chaves Neto
Programmer, Designer and U.I. Engineer

MBA in Design Digital - 2008 - FIC
Analysis and Systems Development - 2011 - Estácio
Design and Implementation of Internet Environments - 2003 - FIC

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Happy new year

Happy new year from Colombia

El 31/12/2012 16:42, <cingusoft@gmail.com> escribió:
Happy new year from spain to all django lovers.
I wish you a new year with tons of django projects.

Cheers
Cingusoft
BlackBerry de movistar, allí donde estés está tu oficin@

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Happy new year

Happy new year from spain to all django lovers.
I wish you a new year with tons of django projects.

Cheers
Cingusoft
BlackBerry de movistar, allí donde estés está tu oficin@

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: l10n not loaded from base.html template

each template needs to {% load %} every templatetag library it uses, this is normal behavior


On Mon, Dec 31, 2012 at 8:31 AM, bikeridercz <rmkk@atlas.cz> wrote:
Dears,

strange thing happens to me, {% load l10n %} is not loaded in my base.html template, all other things like css works well.

Thus I'm forced to {% load l10n %} in every template. I'm using formating numbers  usings{% localize on %} and {% endlocalize %} tags.

Can You help to solve this small but annoying issue ?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/N4uIBo_UnjkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
"The whole of Japan is pure invention. There is no such country, there are no such people" --Oscar Wilde

|_|0|_|
|_|_|0|
|0|0|0|

(\__/)
(='.'=)This is Bunny. Copy and paste bunny 
(")_(") to help him gain world domination.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: populate combobox inline

Hi, exists any way apply one formset in the admin.py for example

forms.py

number_fresh = Models.objects.all().count()

ProducFormset = formset_factory(ProductFresh, extra=number_fresh)
    MyFormSet = ProducFormset(initial=[{'name': u'product1','pub_date': datetime.date.today(),}])

admin.py

class FreschInline(admin.TabularInline):
    model = ProductFresch

    formset = MyFormSet     #apply here my formset but i have a error :( 

    extra = number_fresh


any idea ???

Cheers,


On Thu, Dec 27, 2012 at 9:52 PM, carlos <crocha09.09@gmail.com> wrote:
bad inglish version XD

hi i have a question
is there any way to populate a combobox inline with everyone from a list of products I use an extra parameter automatically to the amount of products but do not know how to fill them with the products look the picture please

spanish version
hola, yo necesito hacer el llenado del combobox automaticamente cuando se habra el form para introducir datos tiene alguna idea de como hacerlo, si ven la foto yo hago el conteo del numero de productos y se lo paso al parametro extra=unaCantidad pero no se como automaticamente
los combo esten cargado ese formulario es un inline

saludos


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

django git repository management app

Hi Guys,

a while ago i was looking for a django app that allows me to manage git
repositories like gitosis, gitweb or at least github. But simple and well
integrated with django. Finally i found nothing.

Then the idea for gitana was born. A git repository management applicaiton for
django integrated with admin app.

Now i'm happy to announce version 1.0.0 it is opensource and you can find it
on github https://github.com/lubico-business/django-gitana

I very appreciate all comments, suggestions and all kind of feedback.

happy new year!

BR Sven

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

django_nose failing to discover tests

I am trying to get django_nose to discover tests in my project.  I watched this video which seems to indicate that my project/app/tests/__init__.py should be able to be empty (not contain a bunch of import * statements):

http://pyvideo.org/video/1406/djangos-nasal-passage

The goal is to have django_nose find my tests by name so I do not have to have import * from ... statements within my tests/__init__.py for every app.  My project is set up like this:

/myproject
    /accounts
        __init__.py
        /tests
            __init__.py
            test_account.py

The __init__.py file is empty.  The test_account.py file contains an AccountTest class derived from unittest.TestCase.

When I run ./manage.py test accounts (with an empty __init__.py), the result is "Ran 0 tests in 0.000s"

Now, if I make accounts/tests/__init__.py contain the line from test_account import *, it works correctly; therefore, I believe I do have django_nose (version 1.1 and nose 1.2.1) installed and working.

I Googled all morning to solve the problem but have failed.  If you have any insight, please reply.  Thank you.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/gs8Mcwfs_nUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Multiple model inheritance

Hi all,

I would like to define multiple abstract base models with small set of
fields each. The "real" models inherit from multiple mixins to add the
fields.

For example:
class Taggable(?):
tag = models.CharField()
class Visible(?):
visible = models.BooleanField()
class SomeFullModel(?, Taggable, Visible):
otherfield = models.CharField()

With this use case:
* should the abstract models inherit from models.Model, or be a plain
Python class inheriting from object?
* should all or any of the abstract models have a class Meta with
abstract=True?
* should the final real model inherit from models.Model (probably
required if all the mixins are plain classes), or inherit from the
first mixin that is an abstract model?
* does the order of the base classes in SomeFullModel matter?

Thanks,

Mattias

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: The method all() in overrided models.Manager doesn't works as expected

Interesting approach :)

Some pointers:
- The Page object has an automatic primary key. You should probably
change the path to be the primary key.
- .all() should not return a list of objects, instead it should
return a QuerySet which returns a list of objects when iterated.

You might be better of using just a regular FileField. Store the
objects in the DB, remove the path field and store the content in a
FileField. That is the way this is supposed to be done in Django. You
can likely make your approach work but it wont be easy.

- Anssi

On 31 joulu, 04:52, Shuge Lee <shuge....@gmail.com> wrote:
> I'm writing a simple CMS, it stores page file data on local file system
> instead of SQL server.
>
> I do overrides the model Page's Manager, but it not works as expected,
> problems
>
>    - PageManager.all(it calls PageQuerySet?) doesn't works
>    - I can create Page object in Admin, but can't view it or delete it
>
> Source code is herehttps://github.com/shuge/mcms/blob/master/pages/models.py
>
> I have read Django Manager docs<https://docs.djangoproject.com/en/1.4/topics/db/managers/> a
> couple of times, but it doesn't help.
>
> Thanks for reply.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

l10n not loaded from base.html template

Dears,

strange thing happens to me, {% load l10n %} is not loaded in my base.html template, all other things like css works well.

Thus I'm forced to {% load l10n %} in every template. I'm using formating numbers  usings{% localize on %} and {% endlocalize %} tags.

Can You help to solve this small but annoying issue ?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/N4uIBo_UnjkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Unable to get an object value using get method in Django

Hi coded,
You didn't say what the new error is. Anyway, in your view, `name` is not in the namespace. Its just like doing this:

Python 2.7.3 (default, Aug  1 2012, 05:16:07)
[GCC 4.6.3] on linux2
>>>a = 1
>>>a + a
2
>>>a + b
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'b' is not defined

....which is exactly what you are doing with this line:

mall=Fin.objects.get(name)

In your situation, you are supposed to supply the name argument (and also the user argument. The primary key would be much better since it is unique for each record) so assuming in your form the client chose say 'Galleria' (and assuming you have a Fin object with a field name 'Galleria'), you should do something like:

mall = Fin.objects.get(name='Galleria', user=user)

Don't forget that .get() will throw an error if multiple objects fit the arguments supplied and if no object fits the arguments supplied. That said, it will be better if you supply a primary key as an argument since its very possible to have multiple Fin objects with exactly the same data contained in its fields.

Meanwhile, I can't find anywhere on your form definition that seems to be collecting 'name' for Fin.

On Mon, Dec 31, 2012 at 3:13 AM, coded kid <duffleboi911@gmail.com> wrote:
Yeah, its a name of a field in my form.  I want to the value
automatically since I don't know the name of the place the user will
choose. I tried adding your correction but i'm getting error.

On Dec 31, 2:33 am, Bill Freeman <ke1g...@gmail.com> wrote:
> On Sun, Dec 30, 2012 at 7:11 PM, coded kid <duffleboi...@gmail.com> wrote:
> > I want to get an object value from a model. After trying the get()
> > method, I've been unable to make it work.And I'm getting the below
> > error. I have a page that display the name of a place to users, so if
> > a user see a place he likes, he will go ahead and fill the form.And in
> > the form, I want to get the name of the place automatically from
> > another model, I don't want users to fill the name of the place. Below
> > are my codes
>
> > NameError at /welcome/
>
> >        global name 'name' is not defined
>
> > Models
>
> >  class Fin(models.Model):
> >       user=models.ForeignKey(User)
> >       name=models.CharField(max_length=100)
>
> >       def __unicode__(self):
> >           return self.user
>
> >  class Place(models.Model):
> >       user=models.ForeignKey(User)
> >       mall=models.ForeignKey(Fin)
> >       full_name=models.CharField(max_length=100)
> >       e_mail=models.EmailField(max_length=100)
> >       phone_no=models.CharField(max_length=100)
> >       pub_date=models.DateTimeField()
>
> >       def __unicode__(self):
> >           return self.full_name
> >       class Meta:
> >          ordering=['-pub_date']
>
> >   class PlaceForm(ModelForm):
> >        class Meta:
> >          model=Place
> >          fields=('full_name','e_mail','phone_no')
> >          exclude=('user','pub_date','mall')
>
> > Views:
>
> >    def place_me(request):
> >        if request.method=="POST":
> >           form=PlaceForm(request.POST)
> >           if form.is_valid():
> >              data=form.cleaned_data
> >              newbooks=Place(
> >                  user=request.user,
> >                  pub_date=datetime.datetime.now(),
> >                  mall=Fin.objects.get(name),
> >                  full_name=data['full_name'],
> >                  e_mail=data['e_mail'],
> >                  phone_no=data['phone_no'])
> >              newbooks.save()
> >              return HttpResponse('Thanks for choosing themall, we will
> > contact you as soon as possible.')
> >          else:
> >             return HttpResponse('Some fields are not filled
> > correctly')
> >      else:
> >         return render_to_response('buuk.html',
> > {'PlaceForm':PlaceForm},context_instance=RequestContext(request))
>
> > Perhaps you want:
>
>    mail=Fin.objects.get(name="something")
>
> Where I'm not sure what "something" is.  A field from your form, perhaps?
>
> Bill

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Sunday, December 30, 2012

Re: loaddata deserializationerror: maximum recursion depth exceeded while calling a Python object

At this point, I would just skip trying to load the data through Django and write a quick Python script to load the data using INSERT statements or create a bulk data file to load it directly into MySQL. I'm not as familiar with MySQL as I am with Postgres, but Postgres can swallow a whole data file and rollback the transaction should it find invalid data in a row. I'm guessing MySQL can do something similar.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/B4RwpUtco8wJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: loaddata deserializationerror: maximum recursion depth exceeded while calling a Python object

I've also tried changing the charset and collation options in my MySQL tables. Still no good. I'm so stumped. Can anyone help me, please?

On Sunday, December 30, 2012 8:54:44 PM UTC-5, Sam Raker wrote:
I tried changing my backend to django-mysql-pymysql (http://pypi.python.org/pypi/django-mysql-pymysql/0.1), and that didn't work either. I'm really at my wits' end. Can anyone help?

On Sunday, December 30, 2012 4:21:57 PM UTC-5, Sam Raker wrote:
I just tried both of those things, and the YAML data loaded fine, and validate said I had 0 errors.

Any other suggestions? I'm really stumped here.

On Sun, Dec 30, 2012 at 3:35 PM, donarb <donarb@nwlink.com> wrote:


On Sunday, December 30, 2012 11:58:46 AM UTC-8, Sam Raker wrote:
So I upped the verbosity like you said, and basically all it got me was a bunch of text telling me all the places Django didn't find my fixture before it finally did, and then the same error. Here's the full text of the error:

Traceback (most recent call last):
  File "/home/menusadmin/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 190, in handle
    for obj in objects:
  File "/home/menusadmin/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/django/core/serializers/pyyaml.py", line 62, in Deserializer
    raise DeserializationError(e)
DeserializationError: maximum recursion depth exceeded while calling a Python object

I tried changing commit to False in loaddata.py, I tried adding a manager class to the one model I have that another model refers to with a natural key (e.g., 'name,' a CharField, as opposed to the primary key). I read something about loaddata having some unicode-related problems, so I added custom Manager classes for all my models that coerce appropriate fields to strings, e.g.:

class MenuManager(models.Manager):
def create_Menu(self,restaurant,year,location,status,pk,period,language):
menu = self.create(restaurant=str(restaurant),year=int(year),location=str(location),status=str(status),pk=int(pk),period=str(period),language=str(language))
return menu

I'm still getting the exact same error. Help?
 
Then the next thing I'd do is to test the yml data itself, separate from Django to make sure that the data is not corrupted in any way. Run a script like this, if it passes, then you probably have some sort of error in your models that is recursive.

#!/usr/bin/env python

import yaml

stream = open("test.yml", "r")
print yaml.load(stream)

Finally, I'd run

./manage.py validate

to make sure that all of your models are valid.

 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/WoMoRX8i3DsJ.

To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/hTw0AXF02WEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

The method all() in overrided models.Manager doesn't works as expected

I'm writing a simple CMS, it stores page file data on local file system instead of SQL server.

I do overrides the model Page's Manager, but it not works as expected, problems

  • PageManager.all(it calls PageQuerySet?) doesn't works
  • I can create Page object in Admin, but can't view it or delete it

Source code is here https://github.com/shuge/mcms/blob/master/pages/models.py

I have read Django Manager docs a couple of times, but it doesn't help.

Thanks for reply.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Rm6OnBOI22cJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Unable to get an object value using get method in Django

Yeah, its a name of a field in my form. I want to the value
automatically since I don't know the name of the place the user will
choose. I tried adding your correction but i'm getting error.

On Dec 31, 2:33 am, Bill Freeman <ke1g...@gmail.com> wrote:
> On Sun, Dec 30, 2012 at 7:11 PM, coded kid <duffleboi...@gmail.com> wrote:
> > I want to get an object value from a model. After trying the get()
> > method, I've been unable to make it work.And I'm getting the below
> > error. I have a page that display the name of a place to users, so if
> > a user see a place he likes, he will go ahead and fill the form.And in
> > the form, I want to get the name of the place automatically from
> > another model, I don't want users to fill the name of the place. Below
> > are my codes
>
> > NameError at /welcome/
>
> >        global name 'name' is not defined
>
> > Models
>
> >  class Fin(models.Model):
> >       user=models.ForeignKey(User)
> >       name=models.CharField(max_length=100)
>
> >       def __unicode__(self):
> >           return self.user
>
> >  class Place(models.Model):
> >       user=models.ForeignKey(User)
> >       mall=models.ForeignKey(Fin)
> >       full_name=models.CharField(max_length=100)
> >       e_mail=models.EmailField(max_length=100)
> >       phone_no=models.CharField(max_length=100)
> >       pub_date=models.DateTimeField()
>
> >       def __unicode__(self):
> >           return self.full_name
> >       class Meta:
> >          ordering=['-pub_date']
>
> >   class PlaceForm(ModelForm):
> >        class Meta:
> >          model=Place
> >          fields=('full_name','e_mail','phone_no')
> >          exclude=('user','pub_date','mall')
>
> > Views:
>
> >    def place_me(request):
> >        if request.method=="POST":
> >           form=PlaceForm(request.POST)
> >           if form.is_valid():
> >              data=form.cleaned_data
> >              newbooks=Place(
> >                  user=request.user,
> >                  pub_date=datetime.datetime.now(),
> >                  mall=Fin.objects.get(name),
> >                  full_name=data['full_name'],
> >                  e_mail=data['e_mail'],
> >                  phone_no=data['phone_no'])
> >              newbooks.save()
> >              return HttpResponse('Thanks for choosing themall, we will
> > contact you as soon as possible.')
> >          else:
> >             return HttpResponse('Some fields are not filled
> > correctly')
> >      else:
> >         return render_to_response('buuk.html',
> > {'PlaceForm':PlaceForm},context_instance=RequestContext(request))
>
> > Perhaps you want:
>
>    mail=Fin.objects.get(name="something")
>
> Where I'm not sure what "something" is.  A field from your form, perhaps?
>
> Bill

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: loaddata deserializationerror: maximum recursion depth exceeded while calling a Python object

I tried changing my backend to django-mysql-pymysql (http://pypi.python.org/pypi/django-mysql-pymysql/0.1), and that didn't work either. I'm really at my wits' end. Can anyone help?

On Sunday, December 30, 2012 4:21:57 PM UTC-5, Sam Raker wrote:
I just tried both of those things, and the YAML data loaded fine, and validate said I had 0 errors.

Any other suggestions? I'm really stumped here.

On Sun, Dec 30, 2012 at 3:35 PM, donarb <donarb@nwlink.com> wrote:


On Sunday, December 30, 2012 11:58:46 AM UTC-8, Sam Raker wrote:
So I upped the verbosity like you said, and basically all it got me was a bunch of text telling me all the places Django didn't find my fixture before it finally did, and then the same error. Here's the full text of the error:

Traceback (most recent call last):
  File "/home/menusadmin/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 190, in handle
    for obj in objects:
  File "/home/menusadmin/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/django/core/serializers/pyyaml.py", line 62, in Deserializer
    raise DeserializationError(e)
DeserializationError: maximum recursion depth exceeded while calling a Python object

I tried changing commit to False in loaddata.py, I tried adding a manager class to the one model I have that another model refers to with a natural key (e.g., 'name,' a CharField, as opposed to the primary key). I read something about loaddata having some unicode-related problems, so I added custom Manager classes for all my models that coerce appropriate fields to strings, e.g.:

class MenuManager(models.Manager):
def create_Menu(self,restaurant,year,location,status,pk,period,language):
menu = self.create(restaurant=str(restaurant),year=int(year),location=str(location),status=str(status),pk=int(pk),period=str(period),language=str(language))
return menu

I'm still getting the exact same error. Help?
 
Then the next thing I'd do is to test the yml data itself, separate from Django to make sure that the data is not corrupted in any way. Run a script like this, if it passes, then you probably have some sort of error in your models that is recursive.

#!/usr/bin/env python

import yaml

stream = open("test.yml", "r")
print yaml.load(stream)

Finally, I'd run

./manage.py validate

to make sure that all of your models are valid.

 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/WoMoRX8i3DsJ.

To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/f9YJ8yh-F0IJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Django jQuery AJAX Self Replacing Script

EDITs made to orginal but same issue.

On Sunday, December 30, 2012 5:16:17 PM UTC-8, That guy wrote:
Hello,


I've been having trouble implementing a self-replacing script. I admit that I am terribly confused.

I am trying to implement two buttons such that if you click on one, a POST request is sent to the server; the server validates that you indeed went to this webpage and sends back a HttpResponseRedirect to a page containing an incomplete web-page/a page that has only the portions I want updated after the button is clicked. Once my orginal jQuery request receives that new page, it will replace the elements on current the page with the new one it just received.

My jQuery looks like:

<script id="self_replacing">  $(document).ready(function() {      $('#button1').click(function(){      $.post("/", {         unique_id : "{{ unique_id }}",        csrfmiddlewaretoken: '{{ csrf_token }}'      },      function(data){         var js_portion = $('<div/>').html(data).find('self_replacing')         var html_portion = $('<div/>').html(data).find('pic_content')         $('#pic_content').replaceWith(html_portion)         $('#self_replacing').replaceWith(js_portion)      });    });  });  </script>

Incomplete Page:

<script id="self_replacing">  $(document).ready(function() {      $('#button1').click(function(){      $.post("/", {         unique_id : "{{ unique_id }}",        csrfmiddlewaretoken: '{{ csrf_token }}'      },      function(data){         var js_portion = $('<div/>').html(data).find('self_replacing')         var html_portion = $('<div/>').html(data).find('pic_content')         $('#pic_content').replaceWith(html_portion)         $('#self_replacing').replaceWith(js_portion)      });    });  });  </script>  <div id="pic_content">        .        .    </div>

Do I have the right idea? When I watch my requests through the FireBug console, the traffic begins scaling upward everytime the button is clicked.

For instance at the start, it beings with 1 click = 1 POST then 1 click = 2POST, and then 1 click = 3 POST. I'm not too sure why this is happening. Is there something wrong with my jQuery script?

Note: The jQuery script needs to be updated after each POST too.


Thank You for any help you can provide :)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/wVV36UrowMIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Unable to get an object value using get method in Django



On Sun, Dec 30, 2012 at 7:11 PM, coded kid <duffleboi911@gmail.com> wrote:
I want to get an object value from a model. After trying the get()
method, I've been unable to make it work.And I'm getting the below
error. I have a page that display the name of a place to users, so if
a user see a place he likes, he will go ahead and fill the form.And in
the form, I want to get the name of the place automatically from
another model, I don't want users to fill the name of the place. Below
are my codes

NameError at /welcome/

       global name 'name' is not defined

Models

 class Fin(models.Model):
      user=models.ForeignKey(User)
      name=models.CharField(max_length=100)

      def __unicode__(self):
          return self.user


 class Place(models.Model):
      user=models.ForeignKey(User)
      mall=models.ForeignKey(Fin)
      full_name=models.CharField(max_length=100)
      e_mail=models.EmailField(max_length=100)
      phone_no=models.CharField(max_length=100)
      pub_date=models.DateTimeField()

      def __unicode__(self):
          return self.full_name
      class Meta:
         ordering=['-pub_date']

  class PlaceForm(ModelForm):
       class Meta:
         model=Place
         fields=('full_name','e_mail','phone_no')
         exclude=('user','pub_date','mall')

Views:

   def place_me(request):
       if request.method=="POST":
          form=PlaceForm(request.POST)
          if form.is_valid():
             data=form.cleaned_data
             newbooks=Place(
                 user=request.user,
                 pub_date=datetime.datetime.now(),
                 mall=Fin.objects.get(name),
                 full_name=data['full_name'],
                 e_mail=data['e_mail'],
                 phone_no=data['phone_no'])
             newbooks.save()
             return HttpResponse('Thanks for choosing themall, we will
contact you as soon as possible.')
         else:
            return HttpResponse('Some fields are not filled
correctly')
     else:
        return render_to_response('buuk.html',
{'PlaceForm':PlaceForm},context_instance=RequestContext(request))



Perhaps you want:

   mail=Fin.objects.get(name="something")

Where I'm not sure what "something" is.  A field from your form, perhaps?

Bill

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Django jQuery AJAX Self Replacing Script

Hello,


I've been having trouble implementing a self-replacing script. I admit that I am terribly confused.

I am trying to implement two buttons such that if you click on one, a POST request is sent to the server; the server validates that you indeed went to this webpage and sends back a HttpResponseRedirect to a page containing an incomplete web-page/a page that has only the portions I want updated after the button is clicked. Once my orginal jQuery request receives that new page, it will replace the elements on current the page with the new one it just received.

My jQuery looks like:

<script id="self_replacing">  $(document).ready(function() {      $('#button1').click(function(){      $.post("/", {         unique_id : "{{ unique_id }}",        csrfmiddlewaretoken: '{{ csrf_token }}'      },      function(data){         var js_portion = $('<div/>').html(data).find('self_replacing')         var html_portion = $('<div/>').html(data).find('pic_content')         $('pic_content').replaceWith(html_portion)         $('self_replacing').replaceWith(js_portion)      });    });  });  </script>

Incomplete Page:

<script id="self_replacing">  $(document).ready(function() {      $('#button1').click(function(){      $.post("/", {         unique_id : "{{ unique_id }}",        csrfmiddlewaretoken: '{{ csrf_token }}'      },      function(data){         var js_portion = $('<div/>').html(data).find('self_replacing')         var html_portion = $('<div/>').html(data).find('pic_content')         $('pic_content').replaceWith(html_portion)         $('self_replacing').replaceWith(js_portion)      });    });  });  </script>  <div id="pic_content">        .        .    </div>

Do I have the right idea? When I watch my requests through the FireBug console, the traffic begins scaling upward everytime the button is clicked.

For instance at the start, it beings with 1 click = 1 POST then 1 click = 2POST, and then 1 click = 3 POST. I'm not too sure why this is happening. Is there something wrong with my jQuery script?

Note: The jQuery script needs to be updated after each POST too.


Thank You for any help you can provide :)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/CtKkoK1_vtAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.