On Sun, Dec 7, 2008 at 12:12 AM, Karen Tracey <[EMAIL PROTECTED]> wrote:
> On Sat, Dec 6, 2008 at 9:17 PM, Patricio Palma <[EMAIL PROTECTED]>
> wrote:
>>
>> Is possible to get the html code from an administration page?
>>
>>
>> I mean, my browser is interpreting a html generated by templates and
>
Sorry Karen my mistake for leaving that out, that reTagnormalizer just
filtered everything that wasn't alphanumeric, the full code is below.
Also here's the error from manage.py test
File "/restaurant/models.py", line 33, in
mealadvisor.restaurant.models.normalize
Failed example:
normalize(u
Say I have model with many fields but I want to present a form to edit
just a subset of these. The ModelForm class makes preparing a form for
a whole model v. easy - somehow it seems there will be a neat way for
doing this but I have not been able to find one. Is there such?
Thanks,
--~--~-
Hello,
Please take a closer look at ModelForm documentation:
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#using-a-subset-of-fields-on-the-form
Best regards,
--
Valts
On Sun, Dec 7, 2008 at 15:46, Peter <[EMAIL PROTECTED]> wrote:
>
> Say I have model with many fields but I want
I wrote about this a bit in a blog post here -
http://www.satchmoproject.com/blog/2008/nov/28/using-django-permissions/
It's really easy to create any permissions using meta then access them in
your views. While the permission is created in the models Meta section, you
can certainly use it anywher
On Dec 7, 1:53 pm, "Valts Mazurs" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Please take a closer look at ModelForm
> documentation:http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#using-a...
>
> Best regards,
> --
> Valts
Thanks a lot - that works. I tried it before but it didn't, b
Hi all,
I'm afraid I googled and googled with no success. Django official docs
or my django book weren't of any help either.
I've got a "legacy" django project which was developed using 0.97svn a
year ago and a brand new SVN one, sharing the same server.
Django 097 lives at /srv/whatever/django0
Hi,
I've written my own view to create / edit model instances my project,
and part of what I wanted to do was to accept dates only in the format
dd-mm- (%d-%m-%Y).
I searched around a bit and came accross this post:
http://groups.google.com/group/django-users/browse_thread/thread/9f84d1b920e
On Sun, Dec 7, 2008 at 4:58 AM, Dave Dash <[EMAIL PROTECTED]> wrote:
>
> Sorry Karen my mistake for leaving that out, that reTagnormalizer just
> filtered everything that wasn't alphanumeric, the full code is below.
>
Actually I think it worked for me last night because I tested it using an
iso88
I am working on a search form that has a SelectMultiple widget. What
would be the best way to make a complex lookup with the SelectMultiple
widget?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
On Sun, Dec 7, 2008 at 2:12 AM, Karen Tracey <[EMAIL PROTECTED]> wrote:
>
>
> Something like View->Page Source from the browser menu? (That's what
> Firefox calls it -- I'd guess most browsers have some such way to see the
> raw html for a page.) Or am I misunderstanding your question?
>
> Karen
Hi,
On 07.12.2008, at 16:56, Pablo Ruiz Múzquiz wrote:
> Hi all,
>
> I'm afraid I googled and googled with no success. Django official docs
> or my django book weren't of any help either.
>
> I've got a "legacy" django project which was developed using 0.97svn a
> year ago and a brand new SVN on
In one of my models, I have defined a field as follows:
business = models.ManyToManyField('Business',
choices=Business.objects.all())
How do i get the choices to be read from the Business model? I get the
following errors in the admin console...
Request Method: GET
Request URL:ht
There are some posts on this list from a year or two ago suggesting
that there is a contrib module allowing a SOAP server to be built in
Django easily. It certainly isn't part of Django 1.0.2...
Has anyone built a SOAP server using Django recently?
I've been able to get something going using soa
my_choices = [(bo.id, bo.name) for bo in Business.objects.all()]
business = models.ManyToManyField('Business', choices=my_choices)
But can I ask why you are trying to set the choices value on a
ManyToMany relationship? The admin will already automaticly only let
you select from the Business model
hello,
I search a lot about the use of object.values() but don't get what I
want.
I want to put dynamically (with a string ?) the fields that I want to
get from a model. i.e.:
#model
Class Test(model.Model)
Id = models.AutoField(primary_key=True, verbose_name="a/a")
Name = models.CharFiel
Manager's `values` method excepts list of field names but you give the
string. Try this:
tbData = tableName.objects.values(*strFld.split(","))
On Sun, Dec 7, 2008 at 23:48, sotiris.kazakis <[EMAIL PROTECTED]>wrote:
>
> hello,
>
> I search a lot about the use of object.values() but don't get what
Hi Rajesh. Sorry for the extended period of time between posts -- this
is a weekend project for me.
The code I pasted (poorly) *is* the model code that causes the
problem, minus the last couple of field entries. So instead of this at
the end of my fields list:
'paypal_number', 'pending_ref
Is there a template tag to turn an int into a sequence (like 'range')?
What I want to do is populate a select widget with the numbers up to
the int, like:
==
{% for i in someInt.range %}
{{i}}
{% endfor %}
==
Passing the sequence
On Sun, 2008-12-07 at 11:12 -0500, Karen Tracey wrote:
> On Sun, Dec 7, 2008 at 4:58 AM, Dave Dash <[EMAIL PROTECTED]> wrote:
>
> Sorry Karen my mistake for leaving that out, that
> reTagnormalizer just
> filtered everything that wasn't alphanumeric, the full code
On Sun, 2008-12-07 at 14:24 -0300, Patricio Palma wrote:
>
>
> On Sun, Dec 7, 2008 at 2:12 AM, Karen Tracey <[EMAIL PROTECTED]>
> wrote:
>
>
>
>
> Something like View->Page Source from the browser menu?
> (That's what Firefox calls it -- I'd g
On Sun, Dec 7, 2008 at 8:45 PM, Malcolm Tredinnick <[EMAIL PROTECTED]
> wrote:
>
>
> On Sun, 2008-12-07 at 14:24 -0300, Patricio Palma wrote:
> >
> >
> > On Sun, Dec 7, 2008 at 2:12 AM, Karen Tracey <[EMAIL PROTECTED]>
> > wrote:
> >
> >
> >
> >
> > Something like View->Page Source from th
Thanks Karen and Malcolm,
I kind of got the sense that I wasn't alone with the doctest issue. I
suppose there's always the unittests that I could write as well that
wouldn't likely suffer the same issues, right?
-d
On Dec 7, 3:43 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 200
On Sun, 2008-12-07 at 17:48 -0800, Dave Dash wrote:
> Thanks Karen and Malcolm,
>
> I kind of got the sense that I wasn't alone with the doctest issue. I
> suppose there's always the unittests that I could write as well that
> wouldn't likely suffer the same issues, right?
Correct. Doctests ar
Without knowing too much about your code, the only thing I can say,
having had a similar issue, was that select_related witha specified
depth generally made for more efficient queries.
For fun, I started on some code to output database queries on all my
pages while I'm debugging:
Queries
On Sun, 2008-12-07 at 18:09 -0800, Dave Dash wrote:
> Without knowing too much about your code, the only thing I can say,
> having had a similar issue, was that select_related witha specified
> depth generally made for more efficient queries.
This is quite true. Also remember that if you know w
following another tutorial to build a blog (webmonkey.com's) at it was
rather frustrating to see nothing show up after creating a new blog...
the admin section seems to see these right away, as they are there as
soon as you hit save. But it seems to take the one section 10-20(or
more?) minutes to
Hi,
I'm trying to use generic_inlineformset_factory. There are no docs for
it except a Generic Relations Model example @
http://www.djangoproject.com/documentation/models/generic_relations/
on the bottom (GenericInlineFormSet tests)
My question here is how to pass the POST vars to it?
In a mode
On Sun, 2008-12-07 at 19:46 -0800, Marco Louro wrote:
> Hi,
>
> I'm trying to use generic_inlineformset_factory. There are no docs for
> it except a Generic Relations Model example @
> http://www.djangoproject.com/documentation/models/generic_relations/
> on the bottom (GenericInlineFormSet test
Currently, when I login, it doesn't show me as having logged in, or
logged out. Doesn't show up until I restart the server. I think it may
be an issue with the session framework.
Here's the dpaste link of my login view, and my middleware/installed
apps settings. _login is the provided authenticat
You could write a very simple filter to do this. Something like
(untested):
def range(top):
return xrange(0, top)
then use {% for i in someInt|range %}
I think it would still be better to pass it in the context--why can't
you do that?
-Jeff
On Dec 7, 5:12 pm, Berco Beute <[EMAIL PROTECTE
Thanks for quick reply Malcom.
This is the code for my view.
I know I'm missing something, the formsets do show up correctly on the
form page, but I'm just not seeing how to load the request.POST data
into the formset for validation and save
The error I get is:
Exception Value: 'Manager' object
Thanks Dj Glicrease:
I see that the the admin interface works just as you said. Thats
pretty smart. However, I don't see the name of the related object, it
show something like...
Here's the model...
class TestModel2(models.Model):
m2mfield1 = models.ManyToManyField('TestModel1')
active
ok... i've been able to figure out how long it takes based on the time
stamp... an hour and a half for a new object to have come in. It
appears that the item is not readable by the two templates, one of
which using {%for object in latest $} and then another template that
doesn't use it at all.
th
On Sat, 2008-12-06 at 20:56 -0800, erikcw wrote:
> Hi all,
>
> I'm trying to write a model query that will return a queryset along
> with the latest (and earliest) data from 2 related models.
>
> Right now I'm doing something like this:
>
> objects = Model1.objects.filter(user=3).select_relate
Is there a way to use variables like:
{{ content.{{ items}} }}
??
I need do send the object and field names to template and access
content of that field from template. This thing works:
{{ content.name }}
But i need the thing after '.' also to be a variab
On Sun, 2008-12-07 at 21:41 -0800, Vicky wrote:
> Is there a way to use variables like:
>
> {{ content.{{ items}} }}
>
> ??
http://groups.google.com/group/django-users/browse_thread/thread/c7e3496fae2e1a31
That thread includes both the reason this isn't in the core templates
Do you use caching?
On Mon, Dec 8, 2008 at 07:34, garagefan <[EMAIL PROTECTED]> wrote:
>
> ok... i've been able to figure out how long it takes based on the time
> stamp... an hour and a half for a new object to have come in. It
> appears that the item is not readable by the two templates, one of
> I am working on a search form that has a SelectMultiple widget. What
> would be the best way to make a complex lookup with the SelectMultiple
> widget?
try this:
try:
district_ids = [int(x) for x in request.GET.getlist('district')]
if len(district_ids) == 0:
district_ids = [
Well, i've spent countless hours on this, and it was so easy.. I guess
it could be added to the docs since It's a really nice feature.
I've posted my very bad view code at dpaste, but it might be enough if
anyone who has a similar problem
http://dpaste.com/hold/96937/
On Dec 8, 4:28 am, Marco
40 matches
Mail list logo