Hi,
I had the same problem with the SITE_ID mismatched. I also found you
can just recognize the SITE_ID from the admin page by editing the site
form and checking the URL like (http://localhost:8000/admin/sites/site/
1/). The last number on URL is exactly the SITE_ID of your site name.
Just a tip!
Does anyone know how to add a new line to anlineformset dynamically? I
have a page that contains an inlineformset and I need to be able to
click a button and add a new line which will then be saved when the
form is submitted, is that possible?
Thanks
Andrew
--~--~-~--~~~--
On Aug 19, 9:27 pm, Kenneth Gonsalves wrote:
> > Yes, I'd read about RequestContext but from what I understand you have
> > to pass it explicitly to render_to_response(). Is that the case?
>
> yes
Thanks for the confirmation. In that case I'll have to write my own
render_to_response() wrapper.
On Thursday 20 Aug 2009 9:52:37 am John Barham wrote:
> > If you use RequestContext(), you automatically get visibility to the
> > current user and their permissions
>
> (Sorry, I meant to say RequestContext instead of RequestInstance.)
>
> Yes, I'd read about RequestContext but from what I un
On Thursday 20 Aug 2009 9:42:33 am zignorp wrote:
> Can you post the example of Setting the Media nested class with the
> TinyMCE media?
> I'm in exactly the same place,
class ReportAdmin(admin.ModelAdmin):
list_display = ['title','approved']
class Media:
js = ('/sitemedia/js
On Aug 19, 5:06 pm, grahamu wrote:
> If you use RequestContext(), you automatically get visibility to the
> current user and their permissions
(Sorry, I meant to say RequestContext instead of RequestInstance.)
Yes, I'd read about RequestContext but from what I understand you have
to pass i
Hi all,
I have a class in which I want to override the get_or_create method.
Basically if my class doesn't store the answer I want it do some
process to get the answer and it's not provided. The method is really
a get_or_retrieve method. I have heavily borrowed this from db/models/
query.py and
Hello,
Can you post the example of Setting the Media nested class with the
TinyMCE media?
I'm in exactly the same place,
Thanks,
Wendy
On Aug 14, 3:15 pm, diogobaeder wrote:
> Kenneth,
>
> Setting the Media nested class with the TinyMCE media worked! :-)
>
> Thanks for the help, and sorry for th
On Thursday 20 Aug 2009 7:14:40 am Nicolas Aggelidis wrote:
> once again i need your help. I want to implement a simple friendship
> invitation/rejection mechanism. In more words, a user sends an
> invitation to another user, the latter has the option to accept it ,
> or reject it...
>
>
> What pa
hi friends,
once again i need your help. I want to implement a simple friendship
invitation/rejection mechanism. In more words, a user sends an
invitation to another user, the latter has the option to accept it ,
or reject it...
What parts of django should i look into? (i am new to django!) .
2009/8/19 Nikola Smiljanić
>
> Django-1.1.tar.gz
> MD5: b2d75b4457a39c405fa2b36bf826bf6b
>
> Same thing. File __init__ in django/utils starts exactly like
> traceback says:
>
> Django-1.1/Django was originally created in late 2003 at World Online,
> the Web division
> of the Lawrence Journal-Worl
On Aug 20, 1:01 am, erikcw wrote:
> Hi,
>
> I'm running Django through mod_wsgi and Apache (2.2.8) on Ubuntu 8.04.
>
> I've been running Django on this setup for about 6 months without any
> problems. Yesterday, I moved my database (postgres 8.3) to its own
> server, and my Django site started
Hellos,
I was wondering if there is a filter that can remove these '\' that
python added when strings are appended to a list or dictionary. I
cannot use cut because I still need one of the '\'
ex. C:\\moo
Code:
arrPlaces = []
intPoint =0
while (len(testline)):
testline = fileName.re
On Wed, Aug 19, 2009 at 1:06 AM, Jonathan wrote:
>
> I am trying to write a view that will take a file uploaded via form,
> pass it to an ftp method and save it on an ftp server. However I am
> running into problems when with the file object that gets passed to
> the ftp method.
>
> This is my v
Due to an issue with a misapplied patch in the recent Django 0.96.4
security release, tonight the Django project has issued Django 0.96.5.
Full information is available here:
http://www.djangoproject.com/weblog/2009/aug/19/bugfix/
Please note that this will be the *final* release in the Django
If you use RequestContext(), you automatically get visibility to the
current user and their permissions. See
http://docs.djangoproject.com/en/dev/topics/auth/#authentication-data-in-templates.
My base templates use a block like this:
{% block user %}
{% if user.is_authenti
On Wed, Aug 19, 2009 at 6:47 PM, A Melé wrote:
>
> Is there any way to perform an accent insensitive match when you are
> filtering a queryset? I'm looking for something like iexact (http://
> docs.djangoproject.com/en/dev/ref/models/querysets/#iexact) but accent-
> insensitive. Is there any simp
On Thursday 20 Aug 2009 3:57:13 am John Barham wrote:
> I could of course pass in the username as a dictionary value for each
> page, but this quickly becomes tedious. I also use render_to_response
> a lot and if I understand correctly it doesn't pass through the user
> info automatically, but wi
Apologies in advance if this is a FAQ but I've searched the list and
can't find a precise answer.
I want to display the login status of the user at the top of every
page. If they were logged in, it should say something like "Logged is
as (Log Out)" and if they're not logged in it should show a
Is there any way to perform an accent insensitive match when you are
filtering a queryset? I'm looking for something like iexact (http://
docs.djangoproject.com/en/dev/ref/models/querysets/#iexact) but accent-
insensitive. Is there any simple way to do it?
Thank you!
--~--~-~--~~-
On Aug 18, 10:54 am, Brandon Taylor wrote:
> Hi everyone,
>
> I'm getting this exception with the latest Django-Jython and
> Jython2.5:
What version of Django are you using? What where you doing at the
time that you get this error?
-Frank
--~--~-~--~~~---~--~~
In general, I'm wondering how to retrieve a Queryset provided to a
Form (choices for a ManyToMany field) from within a view that only
accepts POST data from that form. This isn't really a question about
extending django.contrib.comments, but that framework provides a good
point of reference for th
Hi,
thanks for the fast response! I'm trying to use the remove function
right now just like this sample code:
# And from the other end
>>> p2.article_set.remove(a5)
>>> p2.article_set.all()
[]
>>> a5.publications.all()
[]
from http://www.djangoproject.com/documentation/models/many_to_many/
I'm
On Aug 19, 10:09 pm, Ray wrote:
> Hi,
> thanks for the fast response! I'm trying to use the remove function
> right now just like this sample code:
>
> # And from the other end>>> p2.article_set.remove(a5)
> >>> p2.article_set.all()
> []
> >>> a5.publications.all()
>
> []
>
> fromhttp://www.djang
OK. Apparently this is not PIL problem.
I replaced validation errormessage with custom messages for debugging
and i found out that imagefield validation fails here :
try:
# load() is the only method that can spot a truncated
JPEG,
# but it cannot be called sanely
I followed the instructions on that website.
I used kfind to find all files/folders containing PIL. I removed
PIL.pth files and PIL folders from several places. Then i tried
importing PIL in python prompt and got the error. - no pil in the
system.
Then i reinstalled PIL. tested it and got the va
Hello,
Can you add fields whose values are generated by functions to the
admin change view like you can to the list view? They would have to
be read only, of course, since there's no db column for them. I'd
like them to be presented in the fieldset along with everything else.
thanks!
--~--~--
On 08/19/2009 02:04 PM, Jay wrote:
> Sorry, nevermind. I finally figured this out right after I posted
> this.
>
>
What was the solution? Both for posterity, and because I'm personally
curious.
Thanks,
---Peter
--~--~-~--~~~---~--~~
You received this messa
It seems google app engine patch doesnt support _set.all. I have
tried my original django only version and it works but with google app
engine patch does not.
my template code:
{% for model in object.product_model_set.all %}
{{ model.full_title }}
{% endfor %}
I dont how / what to replac
Sorry, nevermind. I finally figured this out right after I posted
this.
On Aug 19, 12:48 pm, Jay wrote:
> First off, I'm using Django 1.1.
>
> I've been having problems getting my custom authentication backend to
> work, specifically in the "admin" site.
>
> I've been using this page as guide t
First off, I'm using Django 1.1.
I've been having problems getting my custom authentication backend to
work, specifically in the "admin" site.
I've been using this page as guide to put together an auth backend
that uses my subclass of the User model to authenticate.
http://scottbarnham.com/blog
On Wed, Aug 19, 2009 at 11:22 AM, luca72 wrote:
>
> how i can get the value of the fields?
>
> On 19 Ago, 17:45, Daniel Roseman wrote:
>> On Aug 19, 3:40 pm, luca72 wrote:
>>
>> > Iis but form.save don't work
>>
>> That's true.
>> --
>> DR.
> >
>
On a validated form the values will be in the di
Ah, thank you very much! That makes more sense now.
Margie
On Aug 18, 4:30 pm, Ramiro Morales wrote:
> On Tue, Aug 18, 2009 at 7:08 PM, Margie
>
> Roginski wrote:
>
> > I was trying to figure out how to run the date filter, using
> > SETTINGS.DATETIME_FORMAT as an argument.
>
> > When I greppe
Hi Thomas,
Thanks for the reply.
I have postgres max_connections=100, but when I run "select count(*)
from pg_stat_activity;" I only get 2. So I would think that I'm not
maxing out the connections. (is that right -- I'm fairly new to
Postgres)
Here are the results from an strace:
# pgrep apac
how i can get the value of the fields?
On 19 Ago, 17:45, Daniel Roseman wrote:
> On Aug 19, 3:40 pm, luca72 wrote:
>
> > Iis but form.save don't work
>
> That's true.
> --
> DR.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
Hi Thomas,
Tried your method and modified /mysite3/apache/myapp.wsgi as followed:
import os, sys
sys.path.append('/Users/myname')
sys.path.append('/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/django')
sys.path.append('/Library/Frameworks/Python.framework/Version
Validation turns out to be well-nigh impossible using parent / child
aliases, but pretty easy with parent / child accounts. Here's what
I've ended up with:
class Account(models.Model):
user = models.ForeignKey(User, unique=True, null=True, blank=True)
alias = models.CharField(ma
Thanks Thomas for your reply. I just tested it with Firefox. "Cancel"
button works perfect.
With IE "Cancel" button has such a problem.
Let me do more test and see.
On Aug 19, 7:50 am, Thomas Guettler wrote:
> Hi David,
>
> David schrieb:
>
> > Hello,
>
> > I have a "Cancel" button on one of m
On Aug 19, 3:40 pm, luca72 wrote:
> Iis but form.save don't work
>
That's true.
--
DR.
--~--~-~--~~~---~--~~
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@googlegr
On Aug 19, 4:14 pm, Mirat Bayrak wrote:
> http://dpaste.com/82737/< here is models.py , as you see i wrote
> doctests for every model and they are working well. But when i try to
> create GeneralProperties or AccomodationProperties from admin page,
> when i press save button it gives that error :
UPDATE
Looks like the Django multi-DB support didn't quite make it in yet:
http://groups.google.com/group/django-developers/browse_thread/thread/267a2fd7104f0209?hl=en
On another note, I came across the web2py project, which has multi-db
support built in - "table attributes are attributes of a
I'm not asking as a Django / foreign key thing. I'm having a lot of
trouble referencing each model from the other's save method for
validation purposes, because there's always going to be one that's
declared after the other.
On Aug 19, 10:35 am, Joshua Russo wrote:
> You can, it just creates
Figured it out. Apparently when I did my intial test I did not have a
profile create for the user which was causing a different error.
the correct string was 'engine.UserProfile'
Justin
On Aug 19, 10:11 am, Justin wrote:
> I am sure this is a newbie mistake but I can't seem to find exactly
>
http://dpaste.com/82737/ < here is models.py , as you see i wrote
doctests for every model and they are working well. But when i try to
create GeneralProperties or AccomodationProperties from admin page,
when i press save button it gives that error :
http://dpaste.com/82736/
Do you see what i am
I am sure this is a newbie mistake but I can't seem to find exactly
the right setting. I have create a user profile class. I am trying
to attach into my django project via the AUTH_PROFILE_MODULE setting
in the settings.py file.
The error I get is as follows when I try to retrieve the profile
>
Just a first guess:
How many wsgi-clients access the db server at the same time?
Maybe the db does accept only N, while apache/wsgi tries it
with N+1. Then the connection could hang.
What do the wsgi processes do? You can use "strace -p WSGI-PID" to find
this out.
You can sent SIGINT (like ctrl
Hi,
I'm running Django through mod_wsgi and Apache (2.2.8) on Ubuntu 8.04.
I've been running Django on this setup for about 6 months without any
problems. Yesterday, I moved my database (postgres 8.3) to its own
server, and my Django site started refusing to load (the browser
spinner would just
Hi Brandon,
I don't use Jython and not OSX, but if you look at the stacktrace
and at the source, you should see the error.
Brandon Taylor schrieb:
> File "/Users/btaylor/jython2.5.0/Lib/site-packages/doj/backends/
> zxjdbc/postgresql/base.py", line 54, in __init__
> self.client = Database
Hi,
AFAIK there is no such variable in settings.py. It would be nice to have it.
In your company we use the variable STAGE.
ringemup schrieb:
> Is there any way to check at runtime whether Django is running on the
> development server?
>
> Thanks!
--
Thomas Guettler, http://www.thomas-guettl
When running a test suite, django starts by creating a test database. I
am trying to run it on a webfaction account, and I can create an extra
database through the site's control panel, but I can't give django
permission to create one. Is there a way to get django to use a
pre-existing database
Hi David,
David schrieb:
> Hello,
>
> I have a "Cancel" button on one of my Webpages. The button sometimes
> works as expected, sometimes it does not. After the button has been
> clicked, it is supposed that the webpage is re-directed to another
> page. However, this re-direction seems not work
Hi,
you need to know what sys.path looks like. This is a list of
searched directories.
try:
import # Import lines that failes
except ImportError, exc:
import sys
raise ImportError('%s %s' % (exc, sys.path))
Then check if the stuff you want to import is on sys.path.
Simon Lee s
Iis but form.save don't work
On 19 Ago, 16:23, Daniel Roseman wrote:
> On Aug 19, 3:21 pm, luca72 wrote:
>
> > Hello i have a POST form (not modelform) how i can save the data in
> > the db, and if i need to change the data before the save how i can do?
>
> > Thanks
>
> If it's not a modelform,
You can, it just creates headaches. At least one of the ForeignKeys needs to
not be required (I believe that's the default anyway).
On Wed, Aug 19, 2009 at 1:27 PM, ringemup wrote:
>
>
> Is having two classes that reference one another just simply something
> that can't be done in Python?
>
>
>
In that case you can create an abstract model class and use that instead of
models.Model:
class MyModel(models.Model):
class Meta:
abstract = True
class DoesNotExist(Exception):
pass
On Wed, Aug 19, 2009 at 1:22 PM, Idan Gazit wrote:
>
> Yes, and then I also need to imp
Is having two classes that reference one another just simply something
that can't be done in Python?
On Aug 19, 4:36 am, Joshua Russo wrote:
> On Tue, Aug 18, 2009 at 11:04 PM, ringemup wrote:
>
> > Well, I'm trying to implement parent / child aliases, but I'm running
> > into problems with
On Aug 19, 3:21 pm, luca72 wrote:
> Hello i have a POST form (not modelform) how i can save the data in
> the db, and if i need to change the data before the save how i can do?
>
> Thanks
If it's not a modelform, what does it mean to save it in the database?
It's not associated with any model, b
Yes, and then I also need to import that class into every place that I
want to use it, no?
The benefit of making it part of the model is that any place I'm using
it, I already have the exception handy:
try:
# ... do some things
m = MyModel(foo=bar, baz=bling)
m.save()
except MyModel.
Hello i have a POST form (not modelform) how i can save the data in
the db, and if i need to change the data before the save how i can do?
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
A couple of times I've wanted to be able to pass in a sub query as a
table in query_set.extra to be able join in some extra information but
have been thwarted as the query code always insists on quoting what
you pass in as tables to .extra (i.e. it assumes it's always table
names).
Back in 2005 w
On Wed, Aug 19, 2009 at 12:56 PM, Idan Gazit wrote:
>
> Hey all,
>
> I'd like to add some custom exception to a model of mine,
> Foo.FrobNotAllowed, along the lines of ModelName.DoesNotExist.
>
> From looking at models/base.py, it looks like the pattern is to
> override __new__() and use add_to_c
Hey all,
I'd like to add some custom exception to a model of mine,
Foo.FrobNotAllowed, along the lines of ModelName.DoesNotExist.
>From looking at models/base.py, it looks like the pattern is to
override __new__() and use add_to_class. Something like:
def __new__(cls, name, bases, attrs):
n
Setting SESSION_ENGINE to 'django.contrib.sessions.backends.cached_db'
in Django 1.1 solved my problem.
Sorry for my "spam".
On Aug 19, 2:03 pm, Kelvan wrote:
> Tested without apache on the server, seems to work.
> I think my problem has another reason.
>
> On Aug 19, 1:05 pm, Kelvan wrote:
>
>
On Thu, Aug 13, 2009 at 4:21 AM, humble wrote:
>
> Hi,
>
> I am writing a web application that involves session management with
> the corporate backend module. I wrote my own authentication backend
> plugin to satisfy the corporate requirement, not the default
> authentication backend. I use file
Tested without apache on the server, seems to work.
I think my problem has another reason.
On Aug 19, 1:05 pm, Kelvan wrote:
> I have a similar problem with FF and Etch (with Django 1.0 and 1.1
> tested).
> Works when running on my notebook (Ubuntu 9.10a4 with Django 1.1).
> I'm using Apache/mod
I have a similar problem with FF and Etch (with Django 1.0 and 1.1
tested).
Works when running on my notebook (Ubuntu 9.10a4 with Django 1.1).
I'm using Apache/mod_python.
On 13 Aug., 23:07, humble wrote:
> Hi Malcolm
>
> Thanks for your suggestion. I did to try using a FQDN to configure IE
> fo
Chris McCormick schrieb:
> On Tue, Aug 18, 2009 at 07:40:00AM -0700, Ian McDowall wrote:
>> On Aug 18, 8:53 am, Thomas Guettler wrote:
>>> Hi,
>>>
>>> this is offtopic: How can you draw lines in a (django) web application?
>>>
>>> I think you need to use flash or java to do it. I googled for it
On Tue, Aug 18, 2009 at 11:04 PM, ringemup wrote:
>
> Well, I'm trying to implement parent / child aliases, but I'm running
> into problems with class declaration order because I need to reference
> the Alias class from within the Account class as well as referencing
> Account from Alias for valid
On Wed, Aug 19, 2009 at 10:04 AM, Daniel Roseman wrote:
> photo_set = models.ForeignKey(PhotoSet, blank=True, null=True)
Are you sure you have set up data in database correctly? Your model
allow null value in photo_set, so maybe everything is working well and
you forgot to fill database... ;)
Ma
On Aug 18, 10:48 pm, onoxo wrote:
> this is my model.py:
>
> class Event(models.Model):
> title = models.CharField('Event Name', max_length=300)
> photo_set = models.ForeignKey(PhotoSet, blank=True, null=True)
>
> class PhotoSet(models.Model):
> title = models.CharField(max_length=300
On Aug 19, 8:55 am, elminio wrote:
> You don't understand me.
> WQhat I want to achieve is to use student.id as a key in dictionary
> (Im talking abous template)
> If I use:
>
> {% for student in students %}
>
> ... do sth ...
>
> {{dictionary.student.id }}
>
> {% endfor %}
>
> using dictionary
You don't understand me.
WQhat I want to achieve is to use student.id as a key in dictionary
(Im talking abous template)
If I use:
{% for student in students %}
... do sth ...
{{dictionary.student.id }}
{% endfor %}
using dictionary.1 works using dictionary.student.id doesnt work
because th
Well, it doesn't seem to make much sense to me. I use the default
order so that I can place files in a site-level templates directory in
order to override the default templates in the app directory without
having to directly open it up and modify its template files.
-David Christiansen
On Aug 1
Thank you! That has resolved my problem.
The admin shell does not show the site id number by default, so I
supposed that removing the default 'example.com' and adding 'mysite'
would enable Django to reuse id 1. I should have assumed otherwise -
the new site was id == 2, of course. I should have e
someone?
i need this today...
tnx!
On Aug 18, 11:48 pm, onoxo wrote:
> this is my model.py:
>
> class Event(models.Model):
> title = models.CharField('Event Name', max_length=300)
> photo_set = models.ForeignKey(PhotoSet, blank=True, null=True)
>
> class PhotoSet(models.Model):
> tit
How about writting adapter to the django user class? It can have
descriptor for login (getting login would return users email). While
creating such user login would be set (only once, during creation) for
example the following value: user id converted to string preceded by
one character. For other
76 matches
Mail list logo