Hey,
First you need to add some id to that field and then use a jQuery selector
to get the value from it on blur or input:
$('#some_id).on("blur", function(){
//make your ajax call here
});
To make the Ajax call you can use jQuery's .post() or .get(). I guess post
method would make a bit
On Monday, December 10, 2012 8:15:41 PM UTC+2, Subhodip Biswas wrote:
>
> Hi all,
>
> I am trying to implement a tree structure using django. There are two
> packages I am looking at mptt and treebeard. Treebeard seems easy.
>
> I have however two questions:
>
> 1. With mptt I found that if
Hi Russ! Wow, thanks so much for the quick reply and additional details! :)
On Wed, Dec 12, 2012 at 7:12 PM, Russell Keith-Magee
wrote:
> Can you use a try-catch to flag encoding problems? Sure - that's a
> completely reasonable solution.
> Is a blanket try-catch a bad
On Thu, Dec 13, 2012 at 11:03 AM, Micky Hulse wrote:
> Hello Russ! Thank you so much for your pro help and informative reply.
> I really appreciate it. :)
>
> No worries at all. Glad I could be of assistance.
> I've been wondering if I could just add a simple try/catch, like
Hello All,
I have developed an internal tool with Django and Python in the backend,
now it seems like I have hit a road block.
I am very new to Javascript. And the site has to be very dynamic and it
needs to be able to do something like the following:
In the input box,
1. The user has
Same for me as well with a FreeBSD system and normal username,
LANGUAGE_CODE = 'en_us', database is postgresql with UTF-8 encoding. I went
through the steps in tutorial_02 to set up the admin site, and got the same
error as pasztilla. The django_site table in my database is empty.
We are
Hello Russ! Thank you so much for your pro help and informative reply.
I really appreciate it. :)
Sorry for my late reply... A few non-Django projects jumped in the way
of me tending to my list e-mails.
See my replies, inline, below:
On Tue, Dec 11, 2012 at 3:51 PM, Russell Keith-Magee
I'm working on an application that uses two databases -- one is the main
database that Django ORM talks to, where sessions are stored, etc. and the
other is an external database where we need to run some storedprocs to
retrieve some data.
This is all working fine for the most part but I ran into
I'm getting an unexpected validation error in Admin which baffles me.
Any hints appreciated ... here is the traceback
http://dpaste.com/844972/
At the bottom of the traceback where the error is raised, the local vars
are ...
self
value u'33'
key 'pk'
When I save the item, it
Hi,
is there any django-registration fork that works on Django 1.5?
thanks,
mg
--
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/-/kia2ThjwpSwJ.
To post to
The question is going to be very database specific. "select for update"
works by putting in row-level locks in the database. If the row does not
exist, then it won't get a lock on it, and I know of no databases that will
maintain the query so that any newly created rows automatically get a lock
NOTE: I tried adding null=True, blank=True to forms.ImageField however I
> get errors __init__() got an unexpected keyword argument so I guess I can't
> use them options. If I comment out the def formfield_for_dbfield(self,
> db_field, **kwargs): then the ImageField is not required as
Not sure if you're willing to consider an alternate, here, but this is a
issue Iv'e gone through a lot, and came up with my own solution. The major
issue is that I not only want to change the top level paths, but also need
to change database targets and a few other settings, between all the
I've no answers for you, but you might want to have a look at other
applications that use those products and see how they work.
I know that "zinnia", a Django-based blog framework, uses "mptt", so you
might want to have a look there. I've used zinnia, and I've never had to do
any "reload" so
On Sunday, December 9, 2012 9:08:18 PM UTC-8, Mike Dewhirst wrote:
>
> On 10/12/2012 10:59am, Victor Hooi wrote:
> > Also - in terms of using them with QuerySets - there aren't any
> > workarounds to use model methods with QuerySets are there? It seems like
> > that would be a definite argument
Hi,
I've recently started learning GeoDjango and I'm a bit confused.
There's a GeoQuerySet method "distance" which annotates each object with
the distance to the given point, like that:
pnt = 'POINT(coords... coords ...)'
MyModel.objects.all().distance(pnt)
but what field of the object does it
Hi,
I am using django-registration
(http://pypi.python.org/pypi/django-registration) app for my project and i
have added an extra page which shows both login and registration forms
together.
But on this new page, the validation for registration form does not work.
It works if i display the
Dear Django group,
we try to understand and solve a concurrency problem, and would kindly
like to ask for your help.
We use Django 1.4, and a model like this:
class MonatsSalden(models.Model):
id= models.AutoField(primary_key=True)
key =
When you used the shell, you imported 'tracks.views' but in your urls.py,
you have musicsite.views.home. The two don't match.
On Wednesday, December 12, 2012 6:11:54 AM UTC-8, Lloyd Dube wrote:
>
> urls.py:
>
> urlpatterns = patterns('',
> # Examples:
> url(r'^$', 'musicsite.views.home',
could you please repeat your not view error ?
Look like urls,oy has no access to views.py
Many thanks,
Serge
+380 636150445
skype: skhohlov
2012/12/12 Sithembewena Lloyd Dube :
> urls.py:
>
> urlpatterns = patterns('',
> # Examples:
> url(r'^$',
https://docs.djangoproject.com/en/dev/ref/class-based-views/generic-display/#detailview
Many thanks,
Serge
+380 636150445
skype: skhohlov
2012/12/12 Jonas Geiregat :
> Thanks for the response Serge,
>
> So basically I was on the right path.
>
> But I don't see what the
12.12.2012 8:55, ephan kirjoitti:
Hi all,
Am in a bit of a fix which I put myself in,I have the following models:
class Town(...):
name = models.CharField(unique=true)
province = models.foreignKey(Province)
class Area():
name = models.CharField(unique=true,max_length=120)
I've been considering a very similar Django to help simplify some of my
daily server system admin tasks (e.g. monitor and trend CPU uase, memory
usage, disk space, etc.). I'd like to try CouchDB to store the data with a
Django UI to make the app usable to non-technical users.
On Monday,
Thanks for the response Serge,
So basically I was on the right path.
But I don't see what the DetailView has to do with this ? Don't you mean the
CreateView ?
Jonas.
> 1) you should create a form for building
> 2) you should create a form for inhabitant and set key to the correct
> value
On Mon, Dec 10, 2012 at 7:41 PM, Marc Aymerich wrote:
> Hi,
> I'm considering to implement a simple monitorization system that
> basically gathers some data from a set of nodes (<1000 nodes). The
> gathered data should be stored in order to let users perform some
> queries
1) you should create a form for building
2) you should create a form for inhabitant and set key to the correct
value before saving
IMHO simple way is create a edit form for buiding which has buttons
add/remove inhabitant . check DetailView in docs please
thanks, Serge
skype: skhohlov
Update:
Looks like it was an issue with the admin.py file custom code, I was
following a code sample to display images inline which is causing the field
to become required. Any suggestions on how to fix this? (See code below)
class AdminImageFieldWithThumbWidget(forms.widgets.FileInput):
Hello,
Suppose I have a model with a foreign key.
class Building(models.Model):
pass
class Inhabitant(models.Model):
building = models.ForeignKey(Building)
I would like to display a form where all fields from the Building model and
Inhabitant model are visible (but only once)
Should
28 matches
Mail list logo