Hi,
I have a problem - when creating an object, Django performs full table
SELECT from multiple tables and multiple times. Why?
I've set up MySQL to log all queries to the database. In Django I'm
using generic views. I have the following models/tables:
1. Firm
2. Person ( ForeignKey( Firm ))
3.
Andres Luga wrote:
> I've set up MySQL to log all queries to the database. In Django I'm
> using generic views. I have the following models/tables:
> 1. Firm
> 2. Person ( ForeignKey( Firm ))
I suppose you are using a generic view from 'create_update' package that
deals with forms for object? Th
I cannot find any drawbacks in it right now ...
--~--~-~--~~~---~--~~
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 grou
Hello gys,
I'm probably falling again and again in some pitfall...
I want to add a new user with permission in the web admin interface.
I have fired this script on my command line to have the right hashed pw.
-> http://code.djangoproject.com/wiki/AdminApplication
Then I went to the admin interfa
It seems to me that you might have created the user but you did not
give him the privileges to enter the admin interface.
Enter the admin with your... admin user :-)
Go to Users, select the user and check the 'Is staff' option to allow
him to enter the admin site. Then, logout and try to enter wi
On 11/3/06, yary <[EMAIL PROTECTED]> wrote:
>
> The idea here is that adding a 'realation_model' option to ManyToMany
This idea has been suggested previously, and has been rejected
previously - it has some problems when you hit queries.
> All queries seem pretty straightforward.
In your example
Thanks. Thats what I thought. I think that we are going to put up a
site that is all from a WYSIWYG and in the background I am going to
work on a Django powered site. Would you recommend Postgres over MySQL
or the other way around?
On Nov 2, 11:21 pm, iain duncan <[EMAIL PROTECTED]> wrote:
> > I
What would it take to integrate jquery to Django?
Just like now is happening with Dojo... I think however jquery is a
better lib ...
Just look at the following example
http://jquery.com/blog/2006/10/18/zebra-table-showdown/
--~--~-~--~~~---~--~~
You received thi
It depends on what you mean by integrate ...
I'm currently developping a Django/JQuery app and it is desperately
easy.
All you have to use on a django side is something like this:
from django.utils.simplejson import dumps
def myView(request):
myQuerySet = myFunctionToBuildMyQuerySet(reques
Thanks a Lot Gullermo!
solved.
P.
2006/11/3, Guillermo Fernandez Castellanos
<[EMAIL PROTECTED]>:
>
> It seems to me that you might have created the user but you did not
> give him the privileges to enter the admin interface.
>
> Enter the admin with your... admin user :-)
> Go to Users, select t
>
> urlpatterns = patterns('myproject.myapp.views',
> (r'^$', 'index'),
> (r'^(?P\d+)/$', 'detail'),
> (r'^(?P\d+)/edit/$', 'edit'),
> (r'^(?P\d+)/update/$', 'update'),
> )
What does the update method in your views look like?
--~--~-~--~~-
I didn't even do that much. I just called the JS in my template head
and went about my business. On the sortable tables example, that's all
you'd do... add your script tag and it'll take care of it.
Of course, Django will output zebra-striped tables for you pretty
easily, too.
About the only tim
It's more of a Lighttpd issue, (I've Googled, posted to the Lighttpd
wiki and e-mailed and heard nothing back ... ) but I'm serving Django
with the Lighttpd/flup/FastCGI combo which works fine. The problem is I
can't get the proper time zone to show up in the access logs. The
timestamps are GMT an
Defined a simple Image model:
class Image(models.Model):
image = models.ImageField(upload_to='mockups/%Y/%m/%d')
settings.py:
MEDIA_ROOT = '/home/panos/web-projects/media/panosart/'
MEDIA_URL = 'http://10.0.0.5:8000/site_media/'
urls.py:
(r^site_media/(?P.*)$', django.views.static.serve'
I think that a context processor is better suited for this.
--~--~-~--~~~---~--~~
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 fr
Thanks for replying. The update method looks like this:
def update(request, myobject_id):
o = get_object_or_404(MyObject, pk=myobject_id)
o.title = request.POST['name']
...
o.save()
return HttpResponseRedirect('/myapp/%s/' % myobject.id)
The redirect
On 11/3/06, jefurii <[EMAIL PROTECTED]> wrote:
>
> Thanks for replying. The update method looks like this:
>
> def update(request, myobject_id):
> o = get_object_or_404(MyObject, pk=myobject_id)
> o.title = request.POST['name']
> ...
> o.save()
> return
Besides, what Waylan asked you to test, can you also post here your
project's main urls.py?
--~--~-~--~~~---~--~~
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@go
>
> while the admin section links me
> to:http://10.0.0.5:8000/mockups/2006/10/08/image.png
>
> ie, it skips 'site_media' in the URL.
>
Where exactly in the Admin do you see this incorrect link? And what
does your entire Image class look like (i.e. does it have a
get_absolute_url method, what's
Hi All,
I have serious problem with my django websites.
I've experienced random user switching.
User A logs in and user B logs in they both surf the site for a bit
then all of a sudden the user B is now user A.
So far I tracked it down to the fact that the sessionid cookie would
be the same on
Russell Keith-Magee wrote:
> The serializer modeltests is probably your best bet if you are looking
> for examples. However, it's a pretty straightforward interface -
>
> for obj in serializers.deserialize("python", data):
> obj.save()
I'm just curious... when the multi-db branch comes in,
> I want to
> style the first post in a completely different manner than the rest. Is
> there a simple way to do this?
Try this inside the for loop in your template:
{% ifequal forloop.counter "1" %}
-- Insert code here to render the first blog entry ---
{% else %}
-- code for the rest of
On 11/3/06, Enquest <[EMAIL PROTECTED]> wrote:
> What would it take to integrate jquery to Django?
> Just like now is happening with Dojo... I think however jquery is a
> better lib ...
Dojo integration was a fleeting, now-discarded idea. Django will not
be "integrating" any JS toolkit. One good
Rachel Willmer wrote:
> How about using SQL?
>
> On a *nix machine, you'd use mysqldump to output the db in sql format,
> then use the ".read" command in sqlite to read it in.
>
> For the reverse journey from sqlite to mysql, it would be the
> ".output"/".dump" commands to create the sql file, a
How about using SQL?
On a *nix machine, you'd use mysqldump to output the db in sql format,
then use the ".read" command in sqlite to read it in.
For the reverse journey from sqlite to mysql, it would be the
".output"/".dump" commands to create the sql file, and the "source"
command in mysql to
To be able to control a template output based on a current remote
address, I created this model.
class Poll(models.Model):
question = models.CharField('vraag', maxlength=200)
pub_date = models.DateTimeField('publicatie datum')
voted_by_remote_addr = False
def set_voted_by_remote_addr
Hi, I'm trying to submit a new ticket for a bug but I always get an "
Akismet rejected spam" response. Can you please whitelist me???Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django users" group. To
Russell Keith-Magee wrote:
> On 11/3/06, yary <[EMAIL PROTECTED]> wrote:
> >
> > The idea here is that adding a 'realation_model' option to ManyToMany
>
> This idea has been suggested previously, and has been rejected
> previously - it has some problems when you hit queries.
>
> > All queries seem
Here: http://huzzah.cc/
I'm thinking about cleaning up the code and open-sourcing it. Is anyone
interested? I ask this because 3 weeks ago when I started working on
it, I didn't really see much forum software written with Django that
was in much actual usage. There were things like Zyons and Mygh
On Nov 3, 12:26 pm, "argh44z" <[EMAIL PROTECTED]> wrote:
> On Nov 3, 10:23 am, "Jakub Labath" <[EMAIL PROTECTED]> wrote:
>
> > Hi All
BTW, I'm using a completely different envionment than you. lighttpd
with preforked
fastcgi processes.
--~--~-~--~~~---~--~~
You
On Nov 3, 10:23 am, "Jakub Labath" <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have serious problem with my django websites.
> I've experienced random user switching.
I experienced this on my site. I figured it was some sort of weird race
condition since it only happened every once in a while.
I
Thank you very much, Bryan. I tried chmod -R 777 on everything and I
still get the same error message.
On Oct 28, 9:44 am, "Bryan Murdock" <[EMAIL PROTECTED]> wrote:
> One thing I noticed when I set up sqlite was that the apache user had
> to have full permissions on both the database file and th
On 11/3/06, Iker Jimenez <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to submit a new ticket for a bug but I always get an "
> Akismet rejected spam" response. Can you please whitelist me???
>
> Thanks.
>
see this message:
http://groups.google.com/group/django-developers/browse_thread/thread/73adc
On Fri, 2006-03-11 at 13:17 +, elake wrote:
> Thanks. Thats what I thought. I think that we are going to put up a
> site that is all from a WYSIWYG and in the background I am going to
> work on a Django powered site. Would you recommend Postgres over MySQL
> or the other way around?
I think t
I do this kind of thing a lot, and find it's much much easier to have
MySQL on both machines and use mysqldump. A big advantage of two mysql
specific installs is that you can use mysqldump with the field name
option and it will still work fine even if you are changing models. I
write little bash s
So, I've got a contact form so people can email me, or, if a username
is passed in the URL, site members can email each other. It works fine,
at least so far as I can tell. People get the emails, in other words.
The weirdness is in the "TO:" fields the recipient sees: They look
something like thi
"to" has to be a list: ['[EMAIL PROTECTED]']
patrick
Am 03.11.2006 um 20:08 schrieb [EMAIL PROTECTED]:
>
> So, I've got a contact form so people can email me, or, if a username
> is passed in the URL, site members can email each other. It works
> fine,
> at least so far as I can tell. People
On Nov 3, 1:15 pm, "argh44z" <[EMAIL PROTECTED]> wrote:
> Here:http://huzzah.cc/
>
> I'm thinking about cleaning up the code and open-sourcing it. Is anyone
> interested?
Sure we are. Can't have too many Django apps.
I ask this because 3 weeks ago when I started working on
> it, I didn't reall
Not following you Patrick. Why does 'to' have to be a list? I've got a
single-recipient thing here.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
see http://www.djangoproject.com/documentation/email/
look at the "quick example" ...
patrick
Am 03.11.2006 um 21:04 schrieb [EMAIL PROTECTED]:
>
> Not following you Patrick. Why does 'to' have to be a list? I've got a
> single-recipient thing here.
>
>
> >
--~--~-~--~~---
As I'm relatively new to Django (I'm still reading through tutorials
and documentation), I was wondering how you managed user
authentication. I know that it can be managed throught the auth
package, but I was curious how you specifically handled it because I
think it was pretty neat.
--~--~-
Hello Russell,
On Fri, Nov 03, 2006 at 10:26:23AM +0800, Russell Keith-Magee wrote:
> Thanks for the report. Apologies for the behaviour of the spam filter;
> we've been having some difficulties with it lately.
>
> Its true - rel isn't used. But neither is the rest of the method. The
> _set meth
On Nov 4, 2006, at 2:15 AM, argh44z wrote:
>
> Here: http://huzzah.cc/
>
> I'm thinking about cleaning up the code and open-sourcing it. Is
> anyone
> interested? I ask this because 3 weeks ago when I started working on
> it, I didn't really see much forum software written with Django that
> w
Ah gracias.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTE
Hi argh44z,
But did you have the same problem? Was the same sessionid sent to
different clients?
Thanks for help
On 11/3/06, argh44z <[EMAIL PROTECTED]> wrote:
>
> On Nov 3, 12:26 pm, "argh44z" <[EMAIL PROTECTED]> wrote:
> > On Nov 3, 10:23 am, "Jakub Labath" <[EMAIL PROTECTED]> wrote:
> >
> >
Sure.. send it out. I am using a version of Myghty, at least in
testing.
http://gretschpages.com/forum/
but I love seeing how other folks do things.
There oughta be some sort of django forum group that could take the
good work from Zyons, Myghty and this one, merge the best ideas, and
build a si
Hello!
I'm trying to reimplement legacy PHP-based app with django
The most interesting part is some sort of "registration"
It looks like:
* step1:
user enter some information in form
* step2:
app return next form where some select's choices "based" on values
from step1
* step3
Are you developing that forum w/ django?
regards,
Jason
==
Jason Wydro
project engineer
w3developing
toll free: (800) 615-6493
local: (971) 732-5055
fax: (971) 223-3668
mobile-mail: [EMAIL PROTECTED]
email: [EMAIL PROTECTED]
web: www.w3developing.com
==
When python expects a list and gets a string, it treats each character
of the string as an item in the list. If you look at the first
character of each email address in the TO field, you will notice that
it spells out your email address. Perhaps this will make it more
clear:
>>> s = 'string'
>>>
iain duncan wrote:
> I would honestly say it will take much less time for him to get mysql
> running on the laptop ( which is simple with fink ) than to figure out a
> nice porting system.
You're right. I was making the assumption that SQLite and pysqlite
would be an easier install process for
Do I need to include {% for object in latest %}? Or, does this replace
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-users@googlegroups.com
To
Me? Yeah. It's a variation on Piotr's Myghtyboard, tweaked for my needs.
--~--~-~--~~~---~--~~
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
On Nov 3, 3:58 pm, "Andy" <[EMAIL PROTECTED]> wrote:
> Do I need to include {% for object in latest %}? Or, does this replace
> it?
You need to include it:
{% for object in latest %}
{% ifequal forloop.counter "1" %}
-- Insert code here to render the first blog entry ---
{% else %}
-- cod
On Nov 3, 2:26 pm, "yun" <[EMAIL PROTECTED]> wrote:
> As I'm relatively new to Django (I'm still reading through tutorials
> and documentation), I was wondering how you managed user
> authentication. I know that it can be managed throught the auth
> package, but I was curious how you specifically
On Nov 3, 2:38 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Sure.. send it out. I am using a version of Myghty, at least in
> testing.http://gretschpages.com/forum/
Very cool design.
> but I love seeing how other folks do things.
>
> There oughta be some sort of django forum group that c
On Nov 3, 2:35 pm, "Jakub Labath" <[EMAIL PROTECTED]> wrote:
> Hi argh44z,
>
> But did you have the same problem? Was the same sessionid sent to
> different clients?
Yes.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
If I create a new instance of a database object from a view, this item
appears fine in the database and even in the changelist view of the
admin, but clicking on the item ( as if going to delete or edit it )
just gets a template error. Anyone know why this is?
Ie in the the view method we have
h
I have a lovely little django driven database site that is fine
except for one thing...
ever so occassionaly there is a sql call that goes
select * from product
Now, I don't call that explicitly... but it does happen... and I have
a million products and it kills mysqld... shaboom!
On 11/4/06, yary <[EMAIL PROTECTED]> wrote:
>
> Russell Keith-Magee wrote:
> Django's model syntax already allows ambiguities. I just tried the
> above, and Django doesn't complain when you create the model, it does
Erm... I'd be interested to know how you tested this, because I get:
Error: Coul
On 11/4/06, Tom Smith <[EMAIL PROTECTED]> wrote:
> Any pointers as to how I might track this tricky one down, gratefully
> received...
Two suggestions:
1) The query might be issued by the manipulators - one of my
co-workers is currently tracking a performance problem that seems to
be caused whe
On 11/4/06, iain duncan <[EMAIL PROTECTED]> wrote:
>
> If I create a new instance of a database object from a view, this item
> appears fine in the database and even in the changelist view of the
> admin, but clicking on the item ( as if going to delete or edit it )
> just gets a template error. A
On 11/4/06, Jakub Labath <[EMAIL PROTECTED]> wrote:
>
> User A logs in and user B logs in they both surf the site for a bit
> then all of a sudden the user B is now user A.
Are you using the caching framework, or is there a proxy cache (e.g.,
squid) between the users and your web site? It sounds
On 11/4/06, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> Russell Keith-Magee wrote:
> I'm just curious... when the multi-db branch comes in, is this something
> where you could have 2 database settings and you could serialize with
> data from DB1 and de-serialize to DB2?
I'm not sure. I can't say I
On 11/4/06, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> iain duncan wrote:
> If I end up helping him more than I'm thinking, I'll try to blog it or
> update the Django on Tiger page (which is against 0.91 and assumes
> Postgresql).
I run OSX at home, running the DarwinPorts tools. Once I found thos
Hi,
I'm pretty new to django, so forgive me if this is an old topic, but...
I'd like to make a custom workflow for publishing purposes and have it
part of the built-in admin authorization system, without modifying the
admin code itself (in case of upgrades, etc.)
(So instead of just user->can m
I had the same problem. I fixed it by placing a forward slash in front
of the image src in the template where I render the page. Seems to work
fine.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
Please check
multiple model file:
models/
__init__.py
model_a.py
model_b.py
in model_x.py set app_label in Meta manually
in __init__.py:
from model_a import *
from model_b import *
--~--~-~--~~~---~--~~
You received this message because you
Jakub Labath wrote:
> Hi All,
>
> I have serious problem with my django websites.
> I've experienced random user switching.
>
> User A logs in and user B logs in they both surf the site for a bit
> then all of a sudden the user B is now user A.
>
> So far I tracked it down to the fact that the
Bill de hOra wrote:
>
> http://www.djangoproject.com/documentation/cache/
One other thing; be sure you are only ever issuing the initial cookie
with POST request and not a GET.
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because you are subscri
Okay, so I've put in that code and it processes it fine and everything,
however, all the entries are being placed in the else section, the
filter for counter "1" doesn't seem to be grabbing the latest article.
Is there another filter that could maybe grab it?
--~--~-~--~~
PS the site is main.howcurio.us/blog
--~--~-~--~~~---~--~~
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 ema
On Nov 3, 8:15 pm, "argh44z" <[EMAIL PROTECTED]> wrote:
> I'm thinking about cleaning up the code and open-sourcing it. Is anyone
> interested? I ask this because 3 weeks ago when I started working on
> it, I didn't really see much forum software written with Django that
> was in much actual usage
Could paste your template code here: http://paste.e-scribe.com/ and
paste the URL to the paste bin in a message here?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
73 matches
Mail list logo