I can build up the list manually
ids=[]
for v in new_volunteers:
ids.add(v.id)
I'm just wondering if there's a more elegant way to do it.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@
On Mar 28, 2010, at 1:16 AM, Wilberoni wrote:
>
> ModelMultipleChoiceField in a form takes a queryset to load the
> selectable items.
>
> volunteers =
> forms.ModelMultipleChoiceField( queryset=VolunteerProfile.objects.all )
>
> In save(), I call cleaned_data to get the items that were sel
ModelMultipleChoiceField in a form takes a queryset to load the
selectable items.
volunteers =
forms.ModelMultipleChoiceField( queryset=VolunteerProfile.objects.all )
In save(), I call cleaned_data to get the items that were selected:
new_volunteers = self.cleaned_data.get( 'volunteer
On Sat, Mar 27, 2010 at 2:45 AM, Thierry Chich wrote:
> Are you sure that the postgres driver of your jython is installed ?
>
Yes. But I don't believe Jython is seeing it.
I might have to switch to python. I was hoping to use jython so the
application would be easier to port to laptops using a C
On Sat, Mar 27, 2010 at 9:30 PM, Mohamed Ainab wrote:
> I have this test case
>
> def test_loginin_student_control_panel(self):
> c = Client()
> c.login(username="tauri", password="gaul")
> response = c.get('/student/')
> self.assertEqual(response.status_code, 200)
Up the top of my head -
Create a separate ajax_content.html template for use with AJAX
requests (use an if statement in the view to determine which template
to load), then include ajax_content.html in the non-AJAX request
template to keep things DRY.
On 28 March 2010 12:29, David Hollander wrote
I have this test case
def test_loginin_student_control_panel(self):
c = Client()
c.login(username="tauri", password="gaul")
response = c.get('/student/')
self.assertEqual(response.status_code, 200)
the view associated with the test case is this
@login_required
Hello. I am making a restaurant site with some visually candy that
will load all new subpages via AJAX. And also load pages normally
without AJAX if javascript is disabled.
Ideally, I want to do:
{% if not ajax %}
{% extends 'base.html' %}
{% endif %}
{% block content %}Content Here.{% endblo
Hi all,
I'd appreciate it if you could help me out with something.
I am trying to build a way to use faceted browsing through a database
of biological samples.
what I want to model is this:
Sample 1
race = white
age = adult
gene = XCFR2
disease = cancer
Sample 2
race =
Hi Jonas!
First of all, thanks for your hard work to make this module available
on Django 1.2. I'm trying to use it, but i've got a problem:
I can use the admin interface to create my flat page in the languages
that I need (brazilian portuguese and english). When I go to the site,
I can see it in
That's it! thanks!
On Mar 27, 1:56 am, Dennis Kaarsemaker wrote:
> On vr, 2010-03-26 at 17:21 -0700, david.schruth wrote:
>
> > I'm wondering if there is an easy way to set up a default filter on
> > the rows of my table:
>
> > 1) at all
>
> Yes.
>
> > 2) using a foreign class' field
>
> Yes.
>
>
Le samedi 27 mars 2010 19:23:04, Daniel Roseman a écrit :
> On Mar 27, 4:34 pm, Thierry Chich wrote:
> > I think I get the point.
> >
> > If I write
> > obj=MyModel()
> > obj.domaine=request.session.get("domaine")
> > form=MyModelForm(instance=obj)
> > if form.is_va
On Mar 27, 4:34 pm, Thierry Chich wrote:
> I think I get the point.
>
> If I write
> obj=MyModel()
> obj.domaine=request.session.get("domaine")
> form=MyModelForm(instance=obj)
> if form.is_valid():
> form.save()
>
> It works (but I didn't populate m
On Fri, Mar 26, 2010 at 7:39 PM, Bjunix wrote:
> django-extensions[1] brings the shell_plus command which auto-imports
> all models in installed apps. You can use this or have a look at it's
> source.
Yes. shell_plus is quite handy.
$ bin/manage.py shell_plus
[...]
>From 'api' autoload: RequestL
I think I get the point.
If I write
obj=MyModel()
obj.domaine=request.session.get("domaine")
form=MyModelForm(instance=obj)
if form.is_valid():
form.save()
It works (but I didn't populate my form)
So it seems that the data provided in data=request.P
On 21 mar, 22:38, Bjunix wrote:
> You probably want to change the attributes of the model object
> directly.
>
> "If you call save() with commit=False, then it will return an object
> that hasn't yet been saved to the database."
> Source:http://docs.djangoproject.com/en/dev/topics/forms/modelfor
Le samedi 27 mars 2010 14:39:40, Thierry Chich a écrit :
> Hello all
>
> I have a problem to understand something. I could find some workaround
> easily, but I don't want it. I want to understand.
>
> So this if the situation. I have a modelForm (MyModelForm) that is build on
> a model (MyModel
On Mar 27, 1:34 pm, PanFei wrote:
> hi all, i want to know if there is a way to get all the context
> variable (name) in a template.
>
> for example :
>
> I use render_to_response(template, {}
> context_instance=RequestContext(request)) to return a response .but I
> really do not know the context_
On Sat, Mar 27, 2010 at 6:19 AM, Sven Richter wrote:
> Thank you very much. Do you know if there is something planned for
> future releases?
>
There's not much concrete in the way of plans beyond 1.2, which is in late
bugfix mode at the moment.
When I saw your question I had a vague sense there
On Sat, Mar 27, 2010 at 2:54 AM, Kenneth Gonsalves wrote:
> thanks for the detailed reply - I now understand the issue. And yes, I did
> read the documentation, but did not absorb it properly.
A number of people have tripped over this sort of use of get_or_create;
there is an open ticket (#12579
Hello all
I have a problem to understand something. I could find some workaround easily,
but I don't want it. I want to understand.
So this if the situation. I have a modelForm (MyModelForm) that is build on a
model (MyModel) with one field mandatory (domaine - and it is a Foreignkey). I
don't
hi all, i want to know if there is a way to get all the context
variable (name) in a template.
for example :
I use render_to_response(template, {}
context_instance=RequestContext(request)) to return a response .but I
really do not know the context_instance=RequestContext(request) put a
user objec
Hi
I have two models, Model1 and Model2.
Model2 appears as inline in Model2.
Instances of Model2 has a 'parent' field so I have a parent-child
relationship.
Instances with the parent field set should appear as part of the
parent instance and removed from the formset.
I'll add a ModelMultipleChoic
IBM_DB_DJANGO-0.2.0
---
IBM_DB_DJANGO adaptor enables access to IBM databases from Django
applications http://www.djangoproject.com/. The adaptor is developed
and maintained by IBM.
What's New?
- Added support for Django-1.2
- Backward compati
I am using gae with django.
I have an project named MusicSite with following url mapping-
urls.py
from django.conf.urls.defaults import *
from MusicSite.views import MainHandler
from MusicSite.views import UploadHandler
from MusicSite.views import ServeHandler
urlpatterns = patterns('',(r'^start
absolutely
2010/3/27 Dennis Kaarsemaker
> On za, 2010-03-27 at 04:13 -0700, serek wrote:
> > Hi
> >
> > When I run manage.py shell and use this code:
> >
> > >>> from .page.models import *
> > >>> p = Page()
> > >>> dir(p)
> >
> > it is work well, but when in views.py I use the same then is
On za, 2010-03-27 at 04:13 -0700, serek wrote:
> Hi
>
> When I run manage.py shell and use this code:
>
> >>> from .page.models import *
> >>> p = Page()
> >>> dir(p)
>
> it is work well, but when in views.py I use the same then is no
> output? Why? I need something similat to php var_dump o
Hi
When I run manage.py shell and use this code:
>>> from .page.models import *
>>> p = Page()
>>> dir(p)
it is work well, but when in views.py I use the same then is no
output? Why? I need something similat to php var_dump or pront_r (to
source page or console). What I do wrong?
--
You re
Thank you very much. Do you know if there is something planned for
future releases?
Greetings
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-us...@googlegroups.com.
To unsubscribe from this gro
On vr, 2010-03-26 at 17:21 -0700, david.schruth wrote:
> I'm wondering if there is an easy way to set up a default filter on
> the rows of my table:
>
> 1) at all
Yes.
> 2) using a foreign class' field
Yes.
> for example.
>
> lets say I have a table called
>'student' with fields name, gpa
Are you sure that the postgres driver of your jython is installed ?
Le 27 mars 2010 à 01:52, Paul Harouff a écrit :
On Fri, Mar 26, 2010 at 6:26 PM, Karen Tracey
wrote:
On Fri, Mar 26, 2010 at 5:58 PM, Paul Harouff
wrote:
I uninstalled Django development trunk and installed Django-1.1
31 matches
Mail list logo