Hello,
I am using Forms by Django. And that form has a select box with two options.
After a user selected an option. I would like the user to do the function
in the django view.
Will I be able to do this without using AJAX or Javascript?
Thank you.
--
You received this message because you are
ON response to
> the effect of {success: [true|false], reason: 'failure reason, if any'}.
> Don't forget to update your urls.py to reflect the new view.
>
> On the Javascript side, in the registered function, you write code that
> both posts to your Django view in an
I am trying to make a button on the index page that changes the boolean
field of my object, and then displays that object in a different place on
the page. I am not sure what to put as the action for this button, and
where to put and call the function that will actually change the value in
the
.
On Friday, July 17, 2015 at 5:12:51 AM UTC-7, larry@gmail.com wrote:
>
> On Thu, Jul 16, 2015 at 7:44 PM, Jake Rudolph > wrote:
> > If I have a separate Python script that I want to interact with my
> Django
> > project, how do I set them up to communicate?
>
&g
If I have a separate Python script that I want to interact with my Django
project, how do I set them up to communicate?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an em
Ticket 5361 provides a way to accomplish this by writing a custom
backend:
http://code.djangoproject.com/ticket/5361
The ticket is on the "maybe" list for 1.0!
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
Thanks. You are right, my actual code ordered by a specific field but
I kept the example simple because it shows the same problem. Thanks
for the link to the ticket because I could not find a ticket for it
myself.
Rudolph
--~--~-~--~~~---~--~~
You received this
A small clearification to the previous post: by disappear I mean they
are not in the queryset. They stay in the database ofcourse.
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
dmin interface a can see these items in the list view (because it
only orders on the first field?), but when I click them for editing I
get a 404. Also in my view, using the default ordering all the items
that do not have "bar" disappear.
Is this expect
Sorry, that was a stupid question, context['request'].session contains
the session.
--~--~-~--~~~---~--~~
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@googlegrou
But how do you access the session dictionary from a templatetag?
--~--~-~--~~~---~--~~
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 unsubscri
Thanks!
Rudolph
--~--~-~--~~~---~--~~
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
time values if I wanted to use
them).
Anyone any idea?
Rudolph
--~--~-~--~~~---~--~~
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 un
I've got Django running on Sarge and de default mod_python package. No
problem at all.
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
Hi,
I've got a model with a FileField and blank=True. When I create an
object by using the admin interface and fill in a file, everything is
ok. When I edit the object again, there's no way to remove the file
(without uploading a new file). Is this something yet to be done
Hi,
I found the real problem and filed a ticket:
http://code.djangoproject.com/ticket/2136
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
Hi,
I tried to repeat the problem in a small model to publish here. Somehow
the problem doesn't show up. I'll try to isolate the problem and if
necessary post a message here.
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are sub
experience this problem? If so, I'll file a ticket.
Rudolph
--~--~-~--~~~---~--~~
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 un
Thanks Luke, very nicely explained!
Rudolph
--~--~-~--~~~---~--~~
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
imeField to be
"now". And how about inside model methods, manager methods and view
functions? I guess one should/can use datetime.now() in those places,
but I'm not sure. Can anyone provide some info on this subject? It
might also be interesting t
Hi,
Ok: http://code.djangoproject.com/ticket/2103
Cheers, Rudolph
--~--~-~--~~~---~--~~
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@googlegro
at least a missing feature one expects to
find in the validation thing.
Rudolph
--~--~-~--~~~---~--~~
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
Just like James Bennett, I would use templatetags for suchs "blocks"
with little bits of information. I even generate a menu by using a
templatetag.
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
e
the django.utils.html.strip_tags function inside the save function of
my models, but it seems foolish to me to add this kind of sanitizing
for allmost all of my fields (not DRY).
Cheers, Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscrib
you can use to calculate the search results
(I did this with Python sets, but you could do it anyway you like). If
you like it, you can use it ofcourse (BSD license).
Cheers, Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
random value (substring of SHA of e-mailadress for example).
Rudolph
--~--~-~--~~~---~--~~
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@googlegro
the bigger _order values don't get updated. Or maybe
someone has plans to add this kind of behaviour? A bit more
documentation on this subject would be nice.
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Hi,
+1 for a per-app page which by default lists all models of the app.
Then the bread crumbs should also have another level: home > app-name >
model-name which makes sense since you could have models with the same
name but in different apps.
R
you could also use popen.
Rudolph
--~--~-~--~~~---~--~~
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,
Really nice work. I would love to use it!
Rudolph
--~--~-~--~~~---~--~~
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
I think your problem is not with the comments app. Have look at the
problem + solution over here:
http://groups.google.com/group/django-users/browse_thread/thread/7d062b3cac57e4b4
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed
This revision also causes another minor bug. When running syncdb it
tells you
Adding permission ''
for every permission. This is caused by the __repr__ and __str__
changes. Shall I file a bug report?
--~--~-~--~~~---~--~~
You received this message because you are
The above fixes the issue, but to completely remove all uppercased
names also do:
BEGIN;
UPDATE django_content_type set name='group' where model='group';
UPDATE django_content_type set name='user' where model='user';
COMMIT;
--~--~-~--~~~---~--~~
You received thi
Fix this in PostgreSQL like this:
BEGIN;
UPDATE auth_permission set name='Can add group' where
codename='add_group';
UPDATE auth_permission set name='Can change group' where
codename='change_group';
UPDATE auth_permission set name='Can delete group' where
codename='delete_group';
UPDATE auth_perm
This should be on the Magic Removal wiki page, including SQL commands
to update the records. I'll create the PostgreSQL commands within a few
hours and post them here.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
That's certainly good news! I use M-R for a few weeks on a development
server and it feels really solid. I think it's a good decision not to
wait for subclassing, validation-aware models and ajax.
Thanks *very* much for all the hard work
Also have a look at:
http://code.djangoproject.com/wiki/UsingVimWithDjango
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
Thanks!
Maybe you can contact Guido van Rossum about this, he mentioned Google
in his blog and works for Google...
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
I solved it myself, no help needed.
Rudolph
--~--~-~--~~~---~--~~
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
n the FormWrapper in
forms/__init__.py
I read this post:
http://groups.google.com/group/django-developers/browse_thread/thread/6851a96df13d0b61
and
http://code.djangoproject.com/ticket/535
But I'm still not abled to get this to work...
Rudolph
--~--~-~--~~~---~--~~
Yo
Hi,
I just read Google started a new Summer of Code. It would be nice for
Django to get some extra work done this summer (release 1.0?) and get
some attention. It's just a suggestion...
Rudolph
--~--~-~--~~~---~--~~
You received this message because yo
The 's' in Users was a typo.
The problem seems to have solved itself... I tried the exact same
procedure again on an updated version of M-R (while typing the message
a new revision became available).
Thanks!
Rudolph
--~--~-~--~~~---~--~~
You rec
27;; gives no error at all.
The same error occures when creating a user in Python shell, without
the create_user method. When I add a user by using the admin interface,
there's no problem at all.
Does anyone else experience this? Solutions?
Rudolph
--~--~-~--~~~---
All seems okay (the app name appears in the .po file), but it doesn't
get translated (the model names get translated!). I guess one should
make a small change to contrib/admin/templatetags/adminapplist.py to
make it happen... Or does someone get this working with current M-R
branch?
Ru
Optional middleware seems okay, or perhaps we can just set up a
wiki-page on the Django site about this so everybody can implement this
their own way.
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Thanks for the nice explanations, now I understand the concept.
Rudolph
--~--~-~--~~~---~--~~
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@googlegro
Is that an inconsistancy to be removed (ie a bug)?
Rudolph
--~--~-~--~~~---~--~~
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 u
Dutch
www.example.com/nl-nl/ -> site in Dutch
etc.
I would highly appreciate such middleware.
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send em
roject.com/documentation/modpython/
I symlink my production directory into my Python site-packages
directory, so mod_python will be abled to find it.
Cheers,
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Djan
For me, edit_inline in M-R just works, but I didn't try any complex
edit_inline models yet.
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
Ticket filed:
http://code.djangoproject.com/ticket/1579
I'm afraid I can't patch this myself (yet), so I'll just be patient.
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django u
Is this worth a bug report? Seems like a bug ...
Rudolph
--~--~-~--~~~---~--~~
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 unsubs
Hi,
How do I translate the modulename in the admin interface in the Magic
Removal branch? With model names it's easy by using the verbose_name
and verbose_name_plural.
Thanks,
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subsc
(settings.MEDIA_ROOT, new_image)
old_location = path.join(settings.MEDIA_ROOT, self.image)
if new_location != old_location:
shutil.move(old_location, new_location)
self.image = new_image
super(Image, s
I finally found my problem:
I tried to get the children of an object by myobject.child_set.all()
(because I set related_name to 'child'), but it should be
myobject.item_set.all() (in your case myobject.person_set.all()).
Thanks for your help
Thanks! It solved my problem.
Rudolph
--~--~-~--~~~---~--~~
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 g
Hi,
For me that didn't solved the problem. Did you try it on Magic Removal?
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
Hi,
I noticed the cleaner syntax (really nice!), but I wonder how this
applies to "limit_choices_to".
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
.child_set.all(), it raises an exception:
'Item' object has no attribute 'child_set'.
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group
ation in the save()
method doesn't achive this, and the validate() method:
http://groups.google.com/group/django-developers/browse_frm/thread/171a18122fd44c5a
is not called when saving in the admin interface).
Rudolph
--~--~-~--~~~---~--~~
You received th
Hi,
I'm migrating my project to Magic Removal. I couldn't find how to do
the equivalent of the limit_choices_to = {'name__ne' : 'John'} in Magic
Removal.
Rudolph
--~--~-~--~~~---~--~~
You received this message because you are s
I'm writing a _manipulator_validate_.() method. These methods
become methods for the manipulator of a model and will be validated
before save() is called. Any exception of validators.ValidationError
will very nicely be displayed in the admin interface (if your raise
such an exception in _pre_
Thanks! Thats just what I needed!
--~--~-~--~~~---~--~~
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 t
selecting itself, but how do I prevent bigger loops?
TIA!
Rudolph
--~--~-~--~~~---~--~~
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
he
trunk but keep an eye on the changes in Magic Removal.
Kind regards, Rudolph
Thanks!
That must be ticket 1305: http://code.djangoproject.com/ticket/1305
I'll just work around it for a while (until 'before too long') because
the rest of Django fits all my needs!
Rudolph
solve it.
TIA,
Rudolph
Or does
someone know a different solution to my problem?
I really need to get this working for a project.
Thanks in advance!
Rudolph
Thanks for your help.
I changed my code to the version below but it didn't solve the problem.
I'll try the magic-removal-branch and post my result here.
Rudolph
from django.core import meta
class Language(meta.Model):
abbreviation = meta.CharField('Two-letter abbreviatio
To be complete, this is the Error page I get:
TypeError at /admin/reg/languages/2/
'bool' object is not callable
Request Method: GET
Request URL:http://localhost:8000/admin/reg/languages/2/
Exception Type: TypeError
Exception Value:'bool' object is not callable
Exceptio
core=True)
namelang = meta.ForeignKey(Language, verbose_name='Language of the
translation')
def __repr__(self):
return self.name
When trying to add an object with the admin-interfaces I get an
exception (if anyone is interested, I can post the full exception).
Kind regards, Rudolph
e')
I didn't test this but is seems very usable.
Will this or something like this be integrated into Django?
Rudolph
hat's why I switched to Django):
$slug = strtolower(htmlentities($title, ENT_NOQUOTES, 'UTF-8'));
$slug_no_accents =
preg_replace("/&(.)(acute|cedil|circ|ring|tilde|uml);/", "$1", $slug);
One should be abled to port this to Django in no-time.
Rudolph
Wouldn't it be a cleaner approach to seperate language dependent
content completely from the actual models. It's more "DRY" because you
only define the text fields on one place. You could even introduce a
site-wide model for all language dependent content like this:
class Content(meta.Model):
hould also affect this sorting value.
Thanks in advance,
Rudolph
75 matches
Mail list logo