Hi Diego,
Thanks for your suggestion - I had looked in the logs but not hard
enough it would seem!
I think I've tracked the problem down... for some reason my models.py
files sometimes can't complete an import (this was in the logs, I have
no idea why it fails however) and because of this, the
Hello Greg,
What does Apache writes in his log when you try to access the admin
when it is unreachable?
[]s,
Diego Ucha
http://www.scientificcircle.com/
On 1 nov, 20:52, Greg wrote:
> Hi all,
>
> I have a very strange problem with one of my django sites - when I
>
I've been working on the same project and figured I would chip in.
A compromise to avoid needing synchronous replication would be to
determine which functions in our code need to use "live" or recently
modified data, and ensure that queries pertaining to those function
calls get sent to the
Hi. Still learning, slowly. This is Django 1.0.2
The relevant models are Unit, Connector and Cable
class Cable(models.Model):
cable = models.CharField(max_length=8, blank=False)
desc = models.CharField(max_length=128, blank=True)
cabletype = models.ForeignKey(Cabletype, blank=True,
Hi all,
I'm trying to import a JSON fixture using loaddata. It gives me a
ProgrammingError because it seems that it's trying to put to much data
in a varchar. Without access to the variables in that scope, I'm quite
lost which record is causing this. Using "python -i manage.py loaddata
On Tue, 03 Nov 2009, ty...@monkeypox.org wrote:
> Howdy folks, I'm working on some backend services using eventlet[0] and I
> would
> like to re-use my Django models code, doing so "out of the box" is proving
> more
> difficult than I had hoped.
>
> In order to prevent blocking coroutines, I
Hi all,
Here is my django models:
class Author (models.Model):
name = models.CharField(max_length=255)
removed = models.BooleanField(default=False)
class Image (models.Model):
author = models.ForeignKey(Author)
name = models.CharField(max_length=255)
height =
Hi Ramiro
I'm using Django 1.1.1
--~--~-~--~~~---~--~~
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
The common convention seen on Django code and 3rd party apps is to
have a forms.py inside the app dir.
But It doesn't matter because Django doesn't enforce a particular file
name for this, you're free to organize your code tree as you like.
Keep in mind that Django is just Python, so if you're
On Wed, Nov 4, 2009 at 2:52 PM, David wrote:
>
> Hello
>
> I was wondering if unique_for_date is not working or if I am not
> understanding how it is meant to be used.
What version of Django are you using?
--
Ramiro Morales | http://rmorales.net
Thanks for the suggestion Daniel, but that doesn't help either :\
This will raise a field error (bff_id is not a valid field, only bff
is)
Person.objects.exclude(bff_id=None)
And these both result in JOINs:
Person.objects.exclude(bff=None)
Person.objects.exclude(bff__id=None)
Perhaps there is
On Nov 4, 7:22 pm, John Boxall wrote:
> Both of these will raise a FieldError:
>
> people_with_bffs = Person.objects.filter(bbf_id__isnull=False)
> people_with_bffs = Person.objects.filter(bbf_pk__isnull=False)
>
> Cannot resolve keyword 'bbf_pk' into field. Choices are
Thanks Bill. Your reply is quite helpful.
On Nov 4, 12:01 pm, Bill Freeman wrote:
> On Wed, Nov 4, 2009 at 1:32 PM, David wrote:
>
> > Hello,
>
> > I just wonder if anybody has handled this before. Here is a 2-D
> > dictionary.
>
> > dict[key_1] =
On Nov 4, 2009, at 4:01 AM, joker wrote:
>
> i update python 2.5.2 to 2.6 and setup changed directory
> /usr/lib/python2.5 to /usr/local/lib/python2.5/
That doesn't look right. If you installed 2.6, the new directories
should have 2.6 in them, not 2.5 and so should your tracebacks.
S
>
On Nov 3, 2009, at 11:19 PM, JohnL wrote:
> Hi All,
>
> I just joined linode and followed there instructions in setting up
> Django at http://library.linode.com/lamp-guides/ubuntu-9.10-karmic/.
>
>
>
> ServerAdmin squ...@bucknell.net
> ServerName bucknell.net
> ServerAlias
Both of these will raise a FieldError:
people_with_bffs = Person.objects.filter(bbf_id__isnull=False)
people_with_bffs = Person.objects.filter(bbf_pk__isnull=False)
Cannot resolve keyword 'bbf_pk' into field. Choices are 'bbf'.
Thanks for the suggestion though!
jb
On Nov 4, 11:13 am, Javier
what about
people_with_bffs = Person.objects.filter(bbf_id__isnull=False)
?
(disclaimer, i haven't tried it)
--
Javier
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
Hey Marc,
You can store queryset by pickling them - you might find this
documentation helpful:
http://docs.djangoproject.com/en/dev/ref/models/querysets/#id2
I could imagine an interface that combined Alex's django-filter with a
Model for storing the pickled query objects to implement your
Hey Djangonauts,
I'd like to optimize the performance of a query I've got running on a
page - I've got a model which has a self referencing nullable foreign
key and I'd like to select all instances of that model that which have
a value for that column.
Imagine a class Person with a nullable FK
On Wed, Nov 4, 2009 at 1:32 PM, David wrote:
>
> Hello,
>
> I just wonder if anybody has handled this before. Here is a 2-D
> dictionary.
>
> dict[key_1] = {'a':'aa', 'b':'bb', 'c':'cc'}
> dict[key_2] = {'a':'dd', 'b':'ee', 'c':'ff'}
> dict[key_3] = {'a':'eef', 'b': 'ff',
Hello,
I just wonder if anybody has handled this before. Here is a 2-D
dictionary.
dict[key_1] = {'a':'aa', 'b':'bb', 'c':'cc'}
dict[key_2] = {'a':'dd', 'b':'ee', 'c':'ff'}
dict[key_3] = {'a':'eef', 'b': 'ff', 'c':'ghh'}
Assume that this dict is so long that I need to paginate. Do
Hi Alessandro
I just tried converting pubDate to a DateField and it didn't solve the
problem.
Does unique_for_date apply to only the admin interface ? Or, just
everything else ?
I am testing this purely with the admin interface.
Thanks
--~--~-~--~~~---~--~~
You
Hello
I was wondering if unique_for_date is not working or if I am not
understanding how it is meant to be used.
My model:
class Entry(models.Model):
title = models.CharField(max_length=255)
content = models.TextField()
pubDate =
Thank you Daniel, that worked perfectly.
--~--~-~--~~~---~--~~
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
I save the response content in pdf file and then page will be
redirected and pdf file will be called on page onload
Thanks
Jai
On Nov 3, 11:10 am, Jani Tiainen wrote:
> jai_python kirjoitti:
>
>
>
> > Hello every one,
>
> > I have a form which contains group of data and I
Yes, here is the view code
form = group_forms.GroupForm(request.POST, instance=group)
options_form = group_forms.GroupOptionForm(request.POST,
instance=group.groupoption_set.all()[0])
if form.is_valid() and options_form.is_valid():
On Nov 4, 3:34 pm, David wrote:
> Hello
>
> I have just started to learn Django.
>
> I have setup a Blog model, and an Entry model. I would like to use a
> generic view to list all of the entries in a given blog. The url to
> this should be /blog-slug/.
>
> I am unclear
I've still not managed to get this to do the documented behaviour.
Anyone? Please.
On Oct 27, 1:38 am, Nev wrote:
> Hello,
>
> I have done the tinymce thing for my flatpages, but it only works if I
> put mychange_form.htmlunder templates/admin. If I put it under
>
Hello Russ,
thank you for your detailed reply!
I wasn't aware of the complete decoupling of m2m fields from the
model. This made me realise that the admin must handle m2m field
differently which in turn led to ModelAdmin.save_formset and
formset.save_m2m(). I haven't tried this yet, but I'm
On Nov 4, 3:58 pm, chewynougat wrote:
> Hi
>
> When I want a user to edit a form, I would like previously checked
> checkboxes to show as checked. However, they are not showing (just
> unchecked checkboxes). Can anyone explain to me why this is?
>
> Model:
>
>
Hi,
I wonder if I can use the Q object to build queries interactively and
store them for repeated use. I imagine building up the tree of the Q
object in a simple web interface that introspects the models, shows
the fields and some operators and let the user build, name and store
queries for
Hi
When I want a user to edit a form, I would like previously checked
checkboxes to show as checked. However, they are not showing (just
unchecked checkboxes). Can anyone explain to me why this is?
Model:
class GroupOption(models.Model):
group = models.ForeignKey(Group)
media =
Hello
I have just started to learn Django.
I have setup a Blog model, and an Entry model. I would like to use a
generic view to list all of the entries in a given blog. The url to
this should be /blog-slug/.
I am unclear how I can bring up all of the entries for my blog, or
rather how I can
Peter Harley wrote:
> Hi all,
>
> I was wondering if anyone had any suggestions on how to approach what I
> imagine is a fairly common issue.
>
> Say for example I'm developing a blog app (just to reinvent the wheel
> again). In my blog posts I want to link to something else on my site.
>
On Wed, Nov 4, 2009 at 10:50 PM, DavodM wrote:
>
> Hello,
>
> I have a many to many relationship between 'Projects' and 'Tags' in my
> app.
>
> In the admin screen I would like to be able to use the
> filter_horizontal interface for adding/editing from both sides of the
>
On Nov 4, 2:50 pm, DavodM wrote:
> Hello,
>
> I have a many to many relationship between 'Projects' and 'Tags' in my
> app.
>
> In the admin screen I would like to be able to use the
> filter_horizontal interface for adding/editing from both sides of the
> relationship
Hi all,
I was wondering if anyone had any suggestions on how to approach what I
imagine is a fairly common issue.
Say for example I'm developing a blog app (just to reinvent the wheel
again). In my blog posts I want to link to something else on my site.
Normally I would use reverse (or {%
Hello,
I have a many to many relationship between 'Projects' and 'Tags' in my
app.
In the admin screen I would like to be able to use the
filter_horizontal interface for adding/editing from both sides of the
relationship but I can only seem to get it for one or the other.
I have tried the
4 nov 2009 kl. 14.21 skrev Mark L.:
> When you are in the SQL tab, to the left of the actual query, isn't
> there a "Toggle Stacktrace" link? Clicking it reveals the stacktrace,
> which has precisely the information you need.
This is a bit embarassing.. I downloaded django-debug-toolbar from
Hello Django Users!
I wish customize standart Group model to add some fields (is_region,
is_managers).
how i can do this? true way:)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
On Nov 4, 3:44 pm, Knut Nesheim wrote:
> 4 nov 2009 kl. 13.34 skrev Mark L.:
>
> > I guess by "debug toolbar" you mean the django-debug-toolbar (http://
> > pypi.python.org/pypi/django-debug-toolbar/0.8.0). If that is the case,
> > django-debug-toolbar has a number of
OK, that was emberssing :). Thanks!
On Nov 4, 1:43 pm, Maksymus007 wrote:
> widgets = (forms.Select(), forms.TextInput())
>
> you make empty widget, just specify available choices there
>
> On Wed, Nov 4, 2009 at 11:19 AM, psvent wrote:
>
> > Hi!
>
4 nov 2009 kl. 13.34 skrev Mark L.:
> I guess by "debug toolbar" you mean the django-debug-toolbar (http://
> pypi.python.org/pypi/django-debug-toolbar/0.8.0). If that is the case,
> django-debug-toolbar has a number of options and among them
> HIDE_DJANGO_SQL (set to True by default), which
widgets = (forms.Select(), forms.TextInput())
you make empty widget, just specify available choices there
On Wed, Nov 4, 2009 at 11:19 AM, psvent wrote:
>
> Hi!
>
> I am struggling to get MultiValueField and MultiWidget to work.
>
> I have a CharField and ChoiceField in
On Nov 4, 2:02 pm, Knut Nesheim wrote:
> Hello all,
>
> I'm trying to do some profiling on an application so I know where to
> optimize and how I can expect it to perform with large datasets. I use
> the debug toolbar to inspect sql queries.
>
> From time to time
unique_for_date checks only the date in a datetime field or also for the time?
--
Alessandro Ronchi
SOASI
Sviluppo Software e Sistemi Open Source
http://www.soasi.com
http://www.linkedin.com/in/ronchialessandro
--~--~-~--~~~---~--~~
You received this message
LS.
I'm building a nut mix recept database:
class Ingredient(models.Model):
naam = models.CharField(max_length=30)
class MaatEenheid(models.Model):
naam = models.CharField(max_length=30)
class Recept(models.Model):
naam = models.CharField(max_length=30)
hoeveelheid =
2009/11/4 Nicu Marcu
> I'm getting in that specific url, means test_ajax1 view. I test this. It do
> the render_to response. I put a print and a raw_input() in that specific
> view, and it fire up, on that click event. I think the problem is when that
> #test_div is
I'm getting in that specific url, means test_ajax1 view. I test this. It do
the render_to response. I put a print and a raw_input() in that specific
view, and it fire up, on that click event. I think the problem is when that
#test_div is updated.
2009/11/4 Tom Evans
>
ds99 wrote:
> Hi,
> I am using django with postgres as backend. Some of the fields in the
> table are of type "bytea"(bytearray). Which django fields should I use
> while defining a model for such tables?
>
> for eg: To access "boolean" we use BooleanField while modelling. I
> want to know how
On Wed, Nov 4, 2009 at 9:50 AM, NMarcu wrote:
>
> Hello all,
>
> I got an error, and I don't know how to pass on it. I got this
> error when I try to use ajax from django templates.
> I use this, from jquery:
> $('#create-user').click(function() {
>$(
Hello all,
I'm trying to do some profiling on an application so I know where to
optimize and how I can expect it to perform with large datasets. I use
the debug toolbar to inspect sql queries.
From time to time certain pages will generate ~100 duplicated extra
queries. These pages lists
Hi!
I am struggling to get MultiValueField and MultiWidget to work.
I have a CharField and ChoiceField in the MultiValueField class,
but I can't get the choices to show in the select tag.
Am I doing something wrong?
This is what I have so far:
class AutocompleteWidget(forms.MultiWidget):
I see it with firebug.
2009/11/4 Daniel Roseman
>
> On Nov 4, 9:50 am, NMarcu wrote:
> > Hello all,
> >
> >I got an error, and I don't know how to pass on it. I got this
> > error when I try to use ajax from django templates.
> > I use this,
On Nov 4, 9:50 am, NMarcu wrote:
> Hello all,
>
> I got an error, and I don't know how to pass on it. I got this
> error when I try to use ajax from django templates.
> I use this, from jquery:
> $('#create-user').click(function() {
> $( '#test_div'
i worked easy_install mysql-python command but still doesnt work
On 4 Kasım, 11:17, Roland van Laar wrote:
> joker wrote:
> > i update python 2.5.2 to 2.6 and setup changed directory
> > /usr/lib/python2.5 to /usr/local/lib/python2.5/
> > and django doesnt working now
>
> >
On Wed, Nov 4, 2009 at 11:13 AM, Mark L. wrote:
>
>
>
> On Nov 4, 11:20 am, Maksymus007 wrote:
>> I'm trying to use modelformset for my model using specified form.
>> Everything works well unless i try to save forms - ale changes are
>> saved, but for
On Nov 4, 11:20 am, Maksymus007 wrote:
> I'm trying to use modelformset for my model using specified form.
> Everything works well unless i try to save forms - ale changes are
> saved, but for 22 forms django generates 91 queries (some of them are
> for auth, other parts
Hello all,
I got an error, and I don't know how to pass on it. I got this
error when I try to use ajax from django templates.
I use this, from jquery:
$('#create-user').click(function() {
$( '#test_div' ).load( "{% url test_ajax %}");
});
I have this button:
Add a new
On Wed, Nov 4, 2009 at 10:31 AM, Daniel Roseman wrote:
>
> On Nov 4, 4:26 am, Denis Bahati wrote:
> > Am real need to reinvent the wheel because i have a project which needs
> to
> > define some user roles, and enable users to update the status of their
On Nov 4, 4:26 am, Denis Bahati wrote:
> Am real need to reinvent the wheel because i have a project which needs to
> define some user roles, and enable users to update the status of their own
> properties and not the other property. Thanks in advance for any help you
> give
On Nov 4, 4:19 am, JohnL wrote:
> Hi All,
>
> I just joined linode and followed there instructions in setting up
> Django athttp://library.linode.com/lamp-guides/ubuntu-9.10-karmic/.
>
>
> ServerAdmin squ...@bucknell.net
> ServerName bucknell.net
>
joker wrote:
> i update python 2.5.2 to 2.6 and setup changed directory
> /usr/lib/python2.5 to /usr/local/lib/python2.5/
> and django doesnt working now
>
> ImproperlyConfigured: Error importing middleware
> django.contrib.flatpages.middleware: "No module named mysql.base"
>
You might want
Looks like your python 2.5 had the python mysql packages installed, but
your new python 2.6 doesn't, which it wouldn't being a fresh install.
Now you need to install the python mysql bindings into python 2.6.
Also, you should probably have your libs in for python 2.6
in
Hi John,
It doesn't really matter where you place your application code- just
don't put it in a place accessible by your web server, so nobody can
access your source code.
I have apache configured to serve php websites from /var/sharedwww/
site1/www, but my django site resides in
Hello,
I'm not sure if I should post this message in django-developers or
here, but before I bother django developers, I wanted to discuss this
issue with django users.
I stumbled across this one when I was creating a custom User class, by
inheriting from django's built in User class. I extended
i update python 2.5.2 to 2.6 and setup changed directory
/usr/lib/python2.5 to /usr/local/lib/python2.5/
and django doesnt working now
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
1537, in HandlerDispatch
File
I'm trying to use modelformset for my model using specified form.
Everything works well unless i try to save forms - ale changes are
saved, but for 22 forms django generates 91 queries (some of them are
for auth, other parts etc - but this number should not exceed 30
counting one query for each
68 matches
Mail list logo