Daniel Poelzleithner wrote:
> Yes i know. There would be other solutions like shm, or global mutexes,
In fact those two don't seem to work for this situation anyway. I was
digging this whole field over a month ago and remember that the main
problem is that to use anything shared in memory you s
Malcolm Tredinnick wrote:
> I would also just mention that the simplistic approach (having parent
> field) doesn't perform that badly for small structures. For example, I
> can construct the whole tree for the tag hierarchy in my blog in only a
> few microseconds. For small (say, a few dozen) data
On 8/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I'm making a wiki in Django, it's very basic right now (add, edit,
> history, diff) but as it is my first not-mini app in the framework I
> would welcome any comments and sugestions about the code and any other
> replyes :) I want to mak
I'm making a wiki in Django, it's very basic right now (add, edit,
history, diff) but as it is my first not-mini app in the framework I
would welcome any comments and sugestions about the code and any other
replyes :) I want to make it as it should be.
Source: http://www.rk.edu.pl/diamanda.zip (s
Does django support sending email via TLS? I am trying to use gmail
smtp server to send out emails but it needs TLS. Is there a way to do
this in django?
Instead of using django's send_mail, I am using tlslite to send out
emails via gmail's smtp server. If django supports tls, that would be
great
On 8/16/06, Ian Holsman <[EMAIL PROTECTED]> wrote:
>
> would this actually work?
>
> I thought this would have been evaluated when you start up the
> process, and the show_dict is first called.
> not on every request (which is what they want I'm guessing)
Ack, you're right.
You'll need to defer
On Thu, 2006-08-17 at 04:15 +0200, Daniel Poelzleithner wrote:
[...]
> I think django should have a Lock class and maybe Semaphores, too, which
> check which type of server the app is running and choose the best
> locking method.
I think this is really beyond the scope of Django. If you need
inte
Ivan Sagalaev wrote:
> As Ian has pointed you can use file system as a device for locking
> between separate processes. This is not really something specific to Django.
Yes i know. There would be other solutions like shm, or global mutexes,
but filelocks seem to be the best of the worst. Howeve
would this actually work?
I thought this would have been evaluated when you start up the
process, and the show_dict is first called.
not on every request (which is what they want I'm guessing)
regards
Ian.
On 17/08/2006, at 5:30 AM, [EMAIL PROTECTED] wrote:
>
> Do I need to import datetime i
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Do I need to import datetime into urls.py or something?
from datetime import datetime
datetime.now()
should do...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Hi Karen,
On Wed, 2006-08-16 at 06:01 -0700, Karen Tracey wrote:
[...]
> Hmm, in the case where I hit this I don't believe there was a loop in
> the FK relations. The whole model group goes like this:
>
> There are 3 models with no ForeignKeys: Entry, Author, and Publisher
> There are 2 models
On Wed, 2006-08-16 at 15:36 +, spacedman wrote:
>
> 一首诗 wrote:
> > I have a table like this
> >
> > id | name | parentid
> >
> > And parentid is a Foreign Key to ID.
> >
> > So I have a tree in my database. My question is that, how can I
> > represent it on the web as a tree.
>
> If you ca
And this is one of the many reasons I love Django the community.
Highly informative response, for which I thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Your right. My bad. I must have read it here in the newsgroup.
--~--~-~--~~~---~--~~
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 unsubscrib
On 8/16/06, Seth Buntin <[EMAIL PROTECTED]> wrote:
> Thanks Adrian. That was it. I think I got that from the documentation.
> Should it be changed?
Which part of the documentation had that? I was pretty sure we've
changed all references of django.core.template to django.template, but
we may hav
Thanks Adrian. That was it. I think I got that from the documentation.
Should it be changed?
--~--~-~--~~~---~--~~
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@
On 8/17/06, Hawkeye <[EMAIL PROTECTED]
> wrote:
Is this a bug, or was my understanding of quoted ForeignKey valuesincorrect?Could be interpreted as a bug/missing feature, but probably more in the misunderstanding column.The string quoted form exists to allow you to forward reference a table;
i.e.c
Some combination of cgi and a system or execute command is a fun way
to both piss off your hosting provider and get that done.
You'll need to insert all the appropriate paths but it would look
something like this:
os.system('/path/to/python /path/to/manage.py syncdb');
If your hosting provider i
On 08/16/06 23:30, Fabien Schwob wrote:
> Nobody have an idea on how to solve this problem ?
>
> On 8/10/06, Fabien Schwob <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> The development of my Django site is on the way. And in order to try
>> it online, I've decided to install it under Apache + mod_py
Hmm... Looks like I fixed this.
I had:
from app.user.models import UserProfile
[...]
owner = models.ForeignKey('UserProfile', related_name='foo')
I changed it to:
from app.user.models import UserProfile
[...]
owner = models.ForeignKey(UserProfile, related_name='foo')
Is this a bug, or was my un
Oops, missed an 'endifequal' at the end of the comparison:
{% for x in make_list object.get_rating_stars %}
{% ifequal x '*' %}
{% else %}
{% endifequal %}
{% endfor %}
Don
--~--~-~--~~~---~--~~
You
I've just been fighting with the same problem. Mine was with in the
rewrite rules in .htaccess.
Try appending a '/' in the URL to see what happens.
After several hours of dorking around with it, I realized that I was
getting the error when going to the URL:
http://django.myhostname.com/djan
On 8/16/06, Seth Buntin <[EMAIL PROTECTED]> wrote:
> I have created a custom template tag that gets specific information
> from the database:
>
> linkroll.py:
> from django.core import template
> from seth_blog.blog.models import Linkroll
> register = template.Library()
>
> def linkroll():
> l
On 8/16/06, Fabien Schwob <[EMAIL PROTECTED]> wrote:
> Nobody have an idea on how to solve this problem ?
Hey Fabien,
It'd be a great help if you pasted the errors from Apache's error log.
Also, what kind of 403 errors do you get -- could you include a link
to a screenshot?
Adrian
--
Adrian H
I'm trying to create my first Django app. When I attempt to validate,
I receive the "str object has no attribute _meta" error.
Can anyone provide any insight?
I'm running from the dev branch, and have included the output of
"./manage.py validate"
Thanks!
Traceback (most recent call last):
Tim Shaffer wrote:
> Here is my .htaccess file... let me know if you have any questions.
OK, my django.fcgi and .htaccess are *exactly* like yours (with
slightly adjusted paths), and still, it doesn't work :( It just stalls
for a long time and then apache throws Internal Server Error.
Does .bash
Sorry. I should have been more clear. The rules which now seem to be
working for me are the ones that I posted in my previous message.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
THAT IS CRAZY
WHO MADE UP THAT PRICE
$1,000,000 Dollars for that?
http://million.b4site.com
can anyone afford that?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g
don´t know if this is of any help (I didn´t have the time to work on
it lately, but we´re already using it):
http://www.vonautomatisch.at/django/filebrowser/
patrick
Am 16.08.2006 um 19:27 schrieb Nathan Ekstrom:
>
> Let me clarify I need to be able to do something like
>
> front_image = mod
On Aug 16, 2006, at 7:12 AM, [EMAIL PROTECTED] wrote:
>
> Waylan,
>
> This is a really nifty solution, but, again, it puts presentation
> logic
> into the views.py file, which is supposed to contain business logic.
> I'd rather not do that...
But nothing is ever so rigid as to require you do i
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I've got an app for user events, using the generic list view to display
> them. So far , so good. But I don't want to display them if the date is
> past. So, how would I filter those out. Here's the template code, so
> you can sorta see
Nobody have an idea on how to solve this problem ?
On 8/10/06, Fabien Schwob <[EMAIL PROTECTED]> wrote:
> Hello,
>
> The development of my Django site is on the way. And in order to try
> it online, I've decided to install it under Apache + mod_python. But
> when I'm trying to access it, I get a 4
Do I need to import datetime into urls.py or something?
I'm passing
show_dict = {
'queryset': Show.objects.filter(show_date__gte=datetime.now()),
'template_object_name': 'show',
'allow_empty': 'true',
}
but it throws an error:
NameError at /shows/
name 'datetime' is not defined
--~
I'm using the generic list view. There was some reason I didn't think
the generic date view was right for this, although I can't remember
what it was now.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django user
I thought a change was made in the generic date views to show only
future events. It is the allow_future parameter, I believe.
Corey
On Aug 16, 2006, at 1:38 PM, [EMAIL PROTECTED] wrote:
>
> I've got an app for user events, using the generic list view to
> display
> them. So far , so good.
You may have a name conflict. Rename the file 'linkroll.py' to
'linkroll_tags.py' or something similar.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dja
Thanks for sharing that spaceman.
On 8/16/06, spacedman <[EMAIL PROTECTED]> wrote:
>
>
> 一首诗 wrote:
> > I have a table like this
> >
> > id | name | parentid
> >
> > And parentid is a Foreign Key to ID.
> >
> > So I have a tree in my database. My question is that, how can I
> > represent it on t
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I've got an app for user events, using the generic list view to display
> them. So far , so good. But I don't want to display them if the date is
> past. So, how would I filter those out. Here's the template code, so
> you can sorta see
Daniel Poelzleithner wrote:
> After further investigation, i found out that locking of any kind
> doesn't work with apache in prefolk mode, and more or less in the
> threaded mode. I haven't found a nice and clean solution yet to do
> locking on requests, which worries me a little bit. Locking can
I have created a custom template tag that gets specific information
from the database:
linkroll.py:
from django.core import template
from seth_blog.blog.models import Linkroll
register = template.Library()
def linkroll():
links = Linkroll.objects.all()[:5]
return {'links': links}
# Here
I'm not sure if my problem is related to this thread[1] or if I'm just
misunderstanding something with regard to limit_choices_to.
First I tried this (in relevant part):
from django.contrib.auth.models import User
class Project(models.Model):
coordinator = models.ForeignKey(
User,
Let me clarify I need to be able to do something like
front_image = model.ImageField(upload_to='plan_images/hp/p%id/lrg') and
have %id be replaced with the models id field. Giving a final save
path of something like /plan_images/hp/p1/lrg. I also want
to create a preview size of the image and a
[EMAIL PROTECTED] wrote:
> I'd really love to be able to do something like this:
> {% if videoObject.rating > 0 %}*{% endif %}
> {% if videoObject.rating > 1 %}*{% endif %}
> {% if videoObject.rating > 2 %}*{% endif %}
If this type of code is your goal, you could do something like:
{% ifequal vi
Got it!
added import datetime
then
show_dict = {
'queryset':
Show.objects.filter(show_date__gte=datetime.datetime.now()),
'template_object_name': 'show',
'allow_empty': 'true',
}
Thank you Ian! I knew it had to be something fairly straightforward,
but sometimes it's all a matter of
On 8/16/06, Jason F. McBrayer <[EMAIL PROTECTED]> wrote:
>
> Robin Gruyters <[EMAIL PROTECTED]> writes:
>
> >> > > My hosting provider doesn't give shell access, so I can't
> >> > > execute like "syncdb", "startapp", "startproject", etc.
> >> > >
> >> > > Is there another way to do this? (e.g. by
On 8/16/06, Nathan Ekstrom <[EMAIL PROTECTED]> wrote:
>
> Saving with the same name is fine I just need a custom way to specify
> the directory.
Well, my patch gets you that, but again, not from the Admin.
Jay P.
--~--~-~--~~~---~--~~
You received this message be
Your right, I don't deny that I am still a noob at this, I know there
is probably a better way out there and I just can't see how to do
that. is there anyway I can see your model and your manipulator class?
--~--~-~--~~~---~--~~
You received this message because yo
Hi,
Sorry to bring this question up again, since it passed over this list
earlier today.
I thought that Malcolm Tredinnick post on extending generic views is
very insightful
http://www.pointy-stick.com/blog/2006/06/29/django-tips-extending-generic-views/
as simple as that actually is. Using view
Saving with the same name is fine I just need a custom way to specify
the directory.
--~--~-~--~~~---~--~~
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@googlegrou
Thanks, Alan!
Widthratio is exactly what I'm looking for to solve this problem!
I still wish for a custom "if" tag to solve non-charting problems in
templates, and I guess I'll just have to write it and post it to the
wiki. But for now, widthratio does exactly what I need, when I need
it.
Mae
On 8/16/06, James Bennett <[EMAIL PROTECTED]> wrote:
> Being able to see the correct current URL is a vital security feature
> in web browsers, and (short of using JavaScript to open a new window
> which lacks a location bar -- something not guaranteed to work because
> browsers allow users to dis
I just realized that it isn't the entire picture needed to build the tree.
Also look at the "tree" function in:
http://code.b0b.net/rep/GameDB/trunk/gamedb/driver/views.py
-Russell
On Wed, Aug 16, 2006 at 06:48:13AM -0700, ? wrote:
>
> I have a table like this
>
> id | name | paren
I've got an app for user events, using the generic list view to display
them. So far , so good. But I don't want to display them if the date is
past. So, how would I filter those out. Here's the template code, so
you can sorta see what I'm getting at:
{% for show in show_list|dictsort:"show_date"
Anyone thought of using Django's feeds to supply XML in a sort of
simple, read-only, web service kinda way? :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
On 8/16/06, 一首诗 <[EMAIL PROTECTED]> wrote:
> Is there any example that I could study?
You may find some of the examples here[1] helpful.
[1] http://code.djangoproject.com/wiki/CookBookDataModels
--
Waylan Limberg
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
Ian Holsman wrote:
> aren't semaphores inter-process (not cross process)?
>
> try using a file handle instead..
After further investigation, i found out that locking of any kind
doesn't work with apache in prefolk mode, and more or less in the
threaded mode. I haven't found a nice and clean solut
I can do that, but it would couple presentation with my Video model,
and I'd rather not. After all, I suspect that denying me the proper
"if" tag was Django's political statement of "thou shalt not couple
presentation with business logic, and we shall enforce it". It'd be a
shame to couple tiers
yes, it is a problem i met. can't figure out how to resolve~~
hope someone can give some advices thanks lot
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send emai
Waylan,
This is a really nifty solution, but, again, it puts presentation logic
into the views.py file, which is supposed to contain business logic.
I'd rather not do that...
A custom template tag is possibly my solution, and yes, I'm surprised
that no one else had done it yet, too.
Mae
--~--
> So I have a tree in my database. My question is that, how can I
> represent it on the web as a tree. Something like this :
>
> Is there any example that I could study?
>
I used the category model here -
http://code.djangoproject.com/wiki/CookBookCategoryDataModelPostMagic
Then, used ElemenTr
I thought that this thread sounded interesting so I had a go creating
several vmware images. The first was an Ubuntu which weighed in at
over 500 mb (all sizes are the 'used' portion from df -h), which then
stopped working (I think I _may_ have deleted the kernel image while
trying to save space).
Robin Gruyters <[EMAIL PROTECTED]> writes:
>> > > My hosting provider doesn't give shell access, so I can't
>> > > execute like "syncdb", "startapp", "startproject", etc.
>> > >
>> > > Is there another way to do this? (e.g. by creating a runsync.py
>> > > script?! (or something?))
If you can acc
>
> How about adding a method to your Video model?
>
> Video model:
> def get_rating_stars(self):
> return "***" # Implementation left as an exercise for the reader ;-)
>
This isn't much of an exercise, although it may not be immediately
obvious to the noobi.
def get_rating_stars(self):
Malcolm Tredinnick wrote:
> On Tue, 2006-08-15 at 23:22 -0700, 一首诗 wrote:
> > But if there is a loop in FK relations, it will never stopped!
>
> Wow. Looks like you're right. Good debugging!
Hmm, in the case where I hit this I don't believe there was a loop in
the FK relations. The whole model
一首诗 wrote:
> I have a table like this
>
> id | name | parentid
>
> And parentid is a Foreign Key to ID.
>
> So I have a tree in my database. My question is that, how can I
> represent it on the web as a tree.
If you can rework your database slightly you can use Modified Preorder
Tree Traversal
Corey, The general consensus seems to be that you use the built-in
admin to get things rolling. Then, after building the front end and to
have a fully functioning app, you'll most likely want to build your
own customized back end, unless you happen to have a simple
publishing/blogging system were
Mine probably isn't terribly efficient (I'm just learning) but,
http://code.b0b.net/rep/GameDB/trunk/gamedb/driver/controller.py
I use a third-party tree javascript library that I found here:
http://www.dhtmlgoodies.com
-Russell
On Wed, Aug 16, 2006 at 06:48:13AM -0700, ? wrote:
>
>
You may want to take a look at this thread [1]. Particularly the
responce by Ivan Sagalaev. Personally, I wouldn't want to serve
(large) files that way, but I suppose it may be a requirement for some
projects. If your just trying to restrict access, I'd go with Adrain's
suggestion[2].
[1]
http:/
Hit me (not too hard) if I'm wrong, but hiding fields is not
the prettiest way to change the behaviour of the manipulator,
because:
- it could bring security issues (someone hacking the HTML
form to include hidden fields in it, which will be taken into
account when the manipulator eats the POSTed
On 8/15/06, Andy Dustman <[EMAIL PROTECTED]> wrote:
> In fact, it does LIKE %string%, which is quite expensive. Usually want
> I want out of an admin search is a startswith match, i.e. LIKE
> string%, which can use an index. Unfortunately there doesn't seem to
> be a way to do this yet. Maybe some
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> That works if i redirect a django view page to another django view
> page.
> what if i want to redirect to a non-django view page,like a mp3 file.
Being able to see the correct current URL is a vital security feature
in web browsers, and
That works if i redirect a django view page to another django view
page.
what if i want to redirect to a non-django view page,like a mp3 file.
Chris Long 写道:
> If you had two views:
>
> def view_1(request):
>
>return render_to_response(...)
>
> def view_2(request):
>
> retur
I have a table like this
id | name | parentid
And parentid is a Foreign Key to ID.
So I have a tree in my database. My question is that, how can I
represent it on the web as a tree. Something like this :
http://community.csdn.net/
or simply this :
http://www.smth.org/frames.html
Is there
Sorry for my mistake!
Because my code is on a PC without Internet Connection, I can not just
coyp and paste the function name.
I've an idea about how to elminate the loop. Add an optional para to
the function which included all processed Foreign Key RelationShip in
the form of
[ [table1Name, C
Apple wrote:
>
>> generally this means that you should put in some url-rewriting...
>
> Do you mean url rewriting in my url.py or in my .htacess?
>
> I've tried removing the .htacess file and directly accessing the fcgi
> file. It still generates a 500 Error. At this point I have not a clue
>
If i use ResponseRedirect to redirect to a new page ,
the browser's url will change to the new url.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-u
Thank you. I was looking through the ForeignKey class for clues, but
did not find any. I find it amazing how much of a working model you get
from inspectdb, but obviously, it cannot account for old crusty
schemas.
david
--~--~-~--~~~---~--~~
You received this mes
I was sorting by subject and it was doing an ok job. Thanks for
pointing this out.
I always feel stupid when there is such an obvious feature that I
never noticed...
Corey
On Aug 15, 2006, at 10:04 PM, Sean Schertell wrote:
>
> Hey guys,
>
> I hope I'm not the only schmuck to arrive so lat
On Tue, 2006-08-15 at 23:22 -0700, 一首诗 wrote:
> Hah!
>
> I've just found what happened!
>
> django.db.models.fill_cache_table is a function that calls itself until
> it processed all table connected by FK.
For anybody else wondering why they can't this method, it's called
fill_table_cache() (I
If you had two views:
def view_1(request):
return render_to_response(...)
def view_2(request):
return view_1(request)
Will return the view_1 but will be under the view_2 URL.
Chris
--~--~-~--~~~---~--~~
You received this message because you
You can get the database from IP database, ZIP code database and cities
database from:
http://www.ip2location.com
http://www.zipcodeworld.com
http://www.geodatasource.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
Hi,
I'm using those:
http://www.hostip.info/
They have a very handy API:
http://www.hostip.info/use.html
Enjoy,
G
On 8/16/06, David Blewett <[EMAIL PROTECTED]> wrote:
> You could combine the maxmind GeoIP database 1 + cross-referencing that with
> the CivicSpace ZIP code database 2.
>
> David
On Tue, Aug 15, 2006 at 07:57:49PM -0700, Julio C?sar Carrascal Urquijo wrote:
>
> I'm using a cursor inside the _pre_save() method for one of my models
> and figured it would be wise to use the table name gerated by Django
> instead of just hard-coding the name.
Err, _pre_save() was ousted as p
Hi Ian,
Many thanks for your very clear explanation!
That was exacty the problem which got me stuck...
> As a workaround, try giving another field, such as the title, the
> attribute "core=True", and see if that help things.
Works flawless now!
Many thanks!
I hope your patch will be added to t
I found the error. I was using the ipython shell to run 'run manage.py
reset myapp' but unfortunatly things got cached. Running 'sqlreset'
instead of 'reset' showed me that some old SQL was used, so updating
the models didn't change the SQL. :(
Restarting IPython fixed the problem.
--~--~---
I was using the ipython shell to run 'run manage.py reset myapp'
(because I was using IPython anyway) but unfortunatly it seemed like
IPython cached the models or SQL. Running 'sqlreset' instead of 'reset'
showed me that some old SQL was used, so updating the models didn't
change the SQL. that IPy
86 matches
Mail list logo