gkelly wrote:
> I have been struggling with timezones in my application as well. I've
> looked into using the PyTZ module from http://pytz.sourceforge.net/
BTW it weighs about a megabyte :-). The reason is that it's not enough
to just store a deviation from UTC to get the right local time.
Diff
On Mon, 2006-10-09 at 19:38 -0700, [EMAIL PROTECTED] wrote:
> James,
> Would it be valid to take the hours and multiply them by 60 then add
> the remaining minutes? For example:
I had thought that's what you were proposing in your most recent post.
Definitely store the number as minutes. It'
carlwenrich wrote:
> ...instead of just the localhost (127.0.0.1:8000) address.
You can specify an ip address and port using this command:
>From your project root:
#python manage.py runserver (your ip address):(the port you want to
listen on)
Here is an example:
#python manage.py runserver 192
Malcolm Tredinnick wrote:
> Then focus your attention on that one. If
> necessary, put some debugging prints into the Django source at one of
> the points in the traceback (starting from the bottom) to see what might
> be going on. Print the information to sys.stderr, which will go to your
> Apac
I will take a look at that, thanks for pointing it out!
--Nick
--~--~-~--~~~---~--~~
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
James,
Would it be valid to take the hours and multiply them by 60 then add
the remaining minutes? For example:
French Polynesia (UTC - 9:30)
offset = -((9 * 60 = 540) + 30)
offset = -570 minutes
>>> print now()
2006-10-09 20:31:02.000
>>> print now() + RelativeDateTime(minutes=-570)
20
nevermind, it's working now. thanks again.
--~--~-~--~~~---~--~~
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, sen
Thanks Malcolm,
I tracked it down to the staticpages (which I have a slightly modified
version) that were causing the problem. But it wasn't the staticpages
directly it was just that they start the 404 page not found process.
In the 404.html template I was extending a template called 'base.html'
When I use 0.0.0.0:8000, the runserver module runs, but I still can't
connect via my ip address. If I use my ip address (as the manual says I
should be able to) the runserver module says that the ip address can't
be assigned to. Please advise.
--~--~-~--~~~---~--~
thanks
--~--~-~--~~~---~--~~
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 PROTECTED]
For mor
python manage.py runserver 0.0.0.0:8000
Zero IP means listen on all available addresses.
--~--~-~--~~~---~--~~
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@googl
...instead of just the localhost (127.0.0.1:8000) address.
--~--~-~--~~~---~--~~
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
I don't know if you've resolved this, but I had a similar error, and...
The blooper that I had made was in renaming a column in the database.
It was in the midst of a number of other changes, and somehow I never
fixed the model to have the same literal name. Running
python manage.py validate
On Mon, 2006-10-09 at 17:11 -0700, MerMer wrote:
> Thanks for all this, though I have to say right now I don't fully
> understand many of these settings. Is this fully covered in the
> documentation - if so where? I've looked in the Settings folder - am I
> missing something?
If you look on ht
On Mon, 2006-10-09 at 14:41 +0200, patrickk wrote:
> some more details:
>
> my posting-model:
>
> class Posting(models.Model):
> title = models.CharField('Titel', maxlength=200)
> ...
> user = models.ForeignKey(User)
> ...
>
> so, every posting is connected to a user.
> ques
On Mon, 2006-10-09 at 19:05 -0400, James Punteney wrote:
> I've been working on a site in development everything is working as
> expected. This evening I went to set it live but when I set the debug
> flag in the settings.py to False it gives me this error:
> Mod_python error: "PythonHandler djang
On Mon, 2006-10-09 at 15:08 -0400, [EMAIL PROTECTED] wrote:
> I'm playing with creating a custom django field to store a point. I'm
> using PostGIS.
>
> The point is stored as a tuple, and in my field object I have
>
> def pre_save(self, model_instance, add):
> value = getattr(model_in
On Mon, 2006-10-09 at 14:11 -0400, Adam M Peacock wrote:
> I'm currently writing a webapp in Django that will have some custom
> functions, such as sending email to a group of users - I would like to
> be able to leveredge Django's admin interface for the task, but I can't
> figure how where/ho
On Mon, 2006-10-09 at 19:03 +0100, Tom Smith wrote:
> In trying to do some custom SQLto search for words (so "Three" but
> not "Threesome")
>
> ... but because the call adds quotes.. I have had to do this...
>
> for word in words:
> sql = """select count(*) from myapp_pro
On Mon, 2006-10-09 at 05:31 -0700, Panos Laganakos wrote:
> > There are a few corner cases for objects that only have an implicit
> > primary key field like this. Working with them in the admin interface is
> > one of the areas that may or may not work. It's not really worth us
> > putting in an e
Thanks for all this, though I have to say right now I don't fully
understand many of these settings. Is this fully covered in the
documentation - if so where? I've looked in the Settings folder - am I
missing something?
Cheers
MerMer
--~--~-~--~~~---~--~~
You
Hi MerMer,
Generally, custom tags (and filters) fit wonderfully with Django's DRY
(don't repeat yourself) principle -- once defined, you can reuse them
easily in future applications.
That said, there's often more than one way to skin the cat in Django
and Python. For example, you could have a ge
Many thanks - I did check the docs but didn't see it in the Filter
section.
If I need something similar, which is not covered by a filter (such as
an average of columns) - what's the best way to procede. Should I:-
a) Do the calculation in the view
b) create a custom tag
c) Do something else
I've walked through the "Running Django on a shared-hosting provider
with Apache" -- but apparently I don't catch on that fast.My
largest challenge is that I don't have SSH access. I've read a few
things here and there about creating a script to install it, but I'm
not sure what type of scrip
I've been working on a site in development everything is working as
expected. This evening I went to set it live but when I set the debug
flag in the settings.py to False it gives me this error:
Mod_python error: "PythonHandler django.core.handlers.modpython"
Traceback (most recent call last):
Dreamhost was doing RAM upgrades on a bunch of machines this
afternoon. I *highly* recommend you subscribe to the Dreamhost RSS
feed, as they're quite good about warning you beforehand when
something like this will happen:
http://www.dreamhoststatus.com/feed/
Jay P.
--~--~-~--~~
RG wrote:
> Been playing around with generic views and templates and have run
> across this error:
> Exception Value: Error in {% textile %} filter: The Python textile
> library isn't installed.
> So is there a python textile library I need to install? If so, where
> can I get this and how can I i
On 10/9/06, RG <[EMAIL PROTECTED]> wrote:
> So is there a python textile library I need to install? If so, where
> can I get this and how can I install it?
http://cheeseshop.python.org/pypi/textile
--
"May the forces of evil become confused on the way to your house."
-- George Carlin
--~--~-
Been playing around with generic views and templates and have run
across this error:
Exception Value: Error in {% textile %} filter: The Python textile
library isn't installed.
So is there a python textile library I need to install? If so, where
can I get this and how can I install it?
Thanks,
Ry
Hmph. Seems to have fixed itself.
--~--~-~--~~~---~--~~
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 t
HELP! Everything just went belly up. No idea why. Page never loads. No
error, nothing. When I run django.fcgi from the command line, I get:
Traceback (most recent call last):
File "/home/.alibi/tbaxter/gretschpages.com/fcgi.py", line 580, in
run
protocolStatus, appStatus = self.server.handl
On 10/9/06, Ramdas S <[EMAIL PROTECTED]> wrote:
> I guess the policy is not to embrace any Ajax tool-kit in principle. But
> there were many official and unofficial projects on integration with Dojo.
> At least I remember hearing some announcements. Any update on what is the
> exact Ajax strategy
Hi,I guess the policy is not to embrace any Ajax tool-kit in principle. But there were many official and unofficial projects on integration with Dojo. At least I remember hearing some announcements. Any update on what is the exact Ajax strategy into future.
Does anyone know about these? Is there a
You wouldn't happen to know a good resource of where I can learn more
of how to create a form like this would you? I'd like to implement a
similar capability and would like to read up on how to do it.
--Ray
--~--~-~--~~~---~--~~
You received this message because y
I'm playing with creating a custom django field to store a point. I'm
using PostGIS.
The point is stored as a tuple, and in my field object I have
def pre_save(self, model_instance, add):
value = getattr(model_instance, self.attname)
return r"GeomFromText('Point(%f, %f)', 830
On 10/9/06, frank <[EMAIL PROTECTED]> wrote:
> It would be most helpful if there was some documentation
> somewhere that described what mod_python/apache needs
> as distinct from the development server.
The biggest problem I've seen people have when migrating from the dev
server to Apache is, bar
Very timely. I was just looking for something like this.
One observation. When redirecting to https elsewhere in the django
code I see this call, "django.http.get_host(request)" for resolving the
host portion.
Thanks.
--~--~-~--~~~---~--~~
You received this me
It's running now. I ended up putting a whole bunch of links
so that files could be "found". Really ugly band-aid.
It would be most helpful if there was some documentation
somewhere that described what mod_python/apache needs
as distinct from the development server.
--~--~-~--~~---
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
We have discussed together a bit and sorted some things out.
Here's a little update:
To stop spamming the mailing list, we created a new one:
[EMAIL PROTECTED]
To subscribe visit this page:
http://golfos.net/cgi-bin/mailman/listinfo/djangoforge
Javier,
Is it possible to use this with the generic view?
Javier Rivera wrote:
> viestards escribió:
> >> Using the 'date' filter, you can format the output however you want,
> >> within templates.
> >>
> >> For example, to format a date as "September 17, 2006", you would do
> >> the fol
In trying to do some custom SQLto search for words (so "Three" but
not "Threesome")
... but because the call adds quotes.. I have had to do this...
for word in words:
sql = """select count(*) from myapp_product WHERE title
LIKE (%s)
AND title RLIKE %s """
I'm currently writing a webapp in Django that will have some custom
functions, such as sending email to a group of users - I would like to
be able to leveredge Django's admin interface for the task, but I can't
figure how where/how to make a custom page in the admin interface,
ideally one that
Joseph Kocherhans wrote:
> > Does anyone know of a way to login a user without having to
> > authenticate first? Or authenticating with an encrypted password?
>
> The problem is probably that the user.backend attribute does not
> exist. As a hack, you could just set it.
>
> user.backend = 'dja
On 10/9/06, SanPy <[EMAIL PROTECTED]> wrote:
>
> Chris Moffitt wrote:
> > >
> > I've was tripped up by this too. Can you try something like this:
> >
> > user = authenticate(username=data[*'user_name'*],
> > password=data[*'password'*])
> > login(request, user)
> >
> > This seems to
I am trying to create my own Add/Update form, using generic views. I
am dealing with a related field fase_projeto this way:
{% for fase in form.fase_projeto %}
Fase {{ forloop.counter0}}: {{ fase.descricao }}
Descrição: {{ fase.tipo }}
Início: {{ fase.in
Chris Moffitt wrote:
> >
> I've was tripped up by this too. Can you try something like this:
>
> user = authenticate(username=data[*'user_name'*],
> password=data[*'password'*])
> login(request, user)
>
> This seems to work for me. If you want to see the full code, it's here -
> htt
I have been struggling with timezones in my application as well. I've
looked into using the PyTZ module from http://pytz.sourceforge.net/
PyTZ is basically an implementation for the tzinfo parameter of the
datetime module.
It can do some pretty neat things, such as taking a naive datetime (a
datet
On 10/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> std_offset = models.SmallIntegerField()
Keep in mind that some time zones are offset by partial hours, so this
doesn't actually give complete coverage. The problematic time zones
are:
French Polynesia (UTC - 9:30)
Labrador and Newfou
Serg,
I have used a number of editors/IDEs, but recently switced to Eclipse
3.2 + PyDev + Subclipse + WebTools.So far this has proven to be a
good combination for me. Some things that I like about this
combination.
1. Multi-Platform.
2. Low/No Cost.
3. They work.
4. I can move to something
I have been have trouble getting multi-column ordering working in my Admin
views.
I submitted a patch that I think would help,
http://code.djangoproject.com/ticket/2870, only to realize that the default
manager does not get set as documents for which I submitted a ticket,
http://code.djangoproje
I know the user last login is available through the user object, and
I've seen Ian's middleware for lastseen, but I'm really struggling
with figuring out how to get some sort of user last visited thing
together.
Any suggestions?
--~--~-~--~~~---~--~~
You receive
All,
As with most things in this industry there are multiple ways of doing
the same thing. Since my last post I have been working with this model
and have come full circle in selecting what appears to be the best
method of storing the timezone offset data in my model. I'm currently
using the f
Thanks, that was it, luckily I have cygwin installed which comes with a
mail server.
--~--~-~--~~~---~--~~
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
James Bennett wrote:
> In order for email to work, you do have to have a valid email server
> to connect to, either running locally or on a remote server.
And if it's remote, you need to set EMAIL_HOST to point to it in your
settings file.
--~--~-~--~~~---~--~~
Y
On Oct 8, 2006, at 7:28 AM, Dirk Eschler wrote:
>
> Am Samstag, 7. Oktober 2006 23:38 schrieb MerMer:
>> I'm using a default local installation on a Windows XP machine,
>> running
>> Firefox 1.5
>>
>> When I try the following URL
>> http://localhost:8000/media/js/textareas.js I get a message
On 10/9/06, hernan43 <[EMAIL PROTECTED]> wrote:
> In the Django admin, there is a feature where you can click a "+"
> symbol and it will pop-up a form in another window that when you fill
> it out an submit, it will add that item to the current form.
The file you're looking for is here:
http://c
On 10/9/06, shidan <[EMAIL PROTECTED]> wrote:
> Im getting the following exception:
>
> Request Method: POST
> Request URL:http://localhost:8000/signup/
> Exception Type: error
> Exception Value:(10061, 'Connection refused')
> Exception Location: C:\Python24\lib\smt
Hi, when I use the following:
send_mail(email_subject,
email_body,
'[EMAIL PROTECTED]',
[new_user.email],fail_silently=False,)
Im getting the following exception:
Request Method: POST
Request URL:http:/
On Oct 9, 9:30 am, "MerMer" <[EMAIL PROTECTED]> wrote:
> > Your question doesn't really make sense for the development server,
> > since it only ever serves dynamic content.Does this mean that I will have
> > problems serving Javascript files using
> just the development server?
>
No. You can
In the Django admin, there is a feature where you can click a "+"
symbol and it will pop-up a form in another window that when you fill
it out an submit, it will add that item to the current form.
I'm not sure what you call that. I would like to add a similar
functionality to an app that I am dev
On 10/7/06, Picio <[EMAIL PROTECTED]> wrote:
>
> Do you know about
> WAMP
> LAMP
> Apache2Triad (That's what I'm using now but it lacks Django)
> XAMPP
I am very aware of those 'kits', and have used them in the past (for
php dev work). However I have never heard of one that will work out of
the b
See: http://www.djangoproject.com/documentation/templates/#add
Use it like this:
{{ objects.cash|add:objects.cash1 }}
On Oct 9, 9:22 am, "MerMer" <[EMAIL PROTECTED]> wrote:
> Another newbie question!
>
> If I have two tags {{ objects.cash }} and another {{ objects.cash1 }}
> can I add these t
On 10/9/06, MerMer <[EMAIL PROTECTED]> wrote:
> Does this mean that I will have problems serving Javascript files using
> just the development server?
Probably. The development server isn't a "real" web server; it doesn't
know how to serve static files off the disk, for example. There are
some th
thanks.
that probably also means, that I´m not able to get related postings
from a list of comments in the template.
so, I have to construct a list of comments with postings and user-
details. seems a bit heavy ...
having my scenario in mind, it´s probably better to write my own
comment-mod
Hello patrickk!
Generic relations are limitting in the way, that it's impossible to
select from all tables from the relationship at once. What you can do
is to get the 10 comments in Python level. That is to get a list of
all Postings of some author, then for each of the Postings, to get its
comm
> Your question doesn't really make sense for the development server,
> since it only ever serves dynamic content.
Does this mean that I will have problems serving Javascript files using
just the development server?
I've been trying to get some Dojo widgets and MCEtiny to work. I've
installed
Another newbie question!
If I have two tags {{ objects.cash }} and another {{ objects.cash1 }}
can I add these together in the template?
If not which is the most appropriate way to manage something like this.
MerMer
--~--~-~--~~~---~--~~
You received this mess
some more details:
my posting-model:
class Posting(models.Model):
title = models.CharField('Titel', maxlength=200)
...
user = models.ForeignKey(User)
...
so, every posting is connected to a user.
question is, how do I get the latest comments for postings by that user?
usual
*kiss* TextMate!Very minimalist layout but an incredible feature set - still dazzles me. Kind regards,Simon de HaanEight Media[EMAIL PROTECTED]+31 (0)26 38 42 440 On Oct 9, 2006, at 1:50 PM, David Johansson wrote:I used to use emacs, but now it's either eclipse with pydev [1] or gedit.Two things ar
> There are a few corner cases for objects that only have an implicit
> primary key field like this. Working with them in the admin interface is
> one of the areas that may or may not work. It's not really worth us
> putting in an enormous amount of time to get all of this ironed out,
> since you
I used to use emacs, but now it's either eclipse with pydev [1] or gedit.
Two things are nice in eclipse, subversion (thropugh subclipse) and
the "Outline", a tree with an overview over your functions and
classes. When projects grows larger it helps alot.
gedit is lighweight and nice and uses gn
On 8 Oct 2006, at 5:27, [EMAIL PROTECTED] wrote:
> so now we can specify our urls for, say a login screen, and enjoy
> ssl for that page only without explicit redirects. Also there is no
> way for a user to request an unsecure version of that page if one
> is not explicitly offered.
Yes, un
> I'd also recommend the snippetsemu plugin as well but that's because I
> wrote it.http://www.vim.org/scripts/script.php?script_id=1318
> There's tips for it on the django
> wiki:http://code.djangoproject.com/wiki/UsingVimWithDjango
Vim and snippetsEmu for me too. Its really easy to use Snip to
On 09/10/06, iain duncan <[EMAIL PROTECTED]> wrote:
> Ha ha, too funny. Yup, vim all the way. YMMV. Oops, not supposed to say
> that in holy wars am I? God uses vim and he is on my side! ;)
>
> On a serious note, I use:
> - fluxbox on linux
> - heavily pimped out gvim ( ie much customization )
> -
Malcom, I hear what you're saying.
But regarding this particular project, its just the way I would have
done it if I wrote it directly to SQL.
One table for the DVDs and one table for the Files, etc.
I need to be able to manipulate it from the admin, so I can handle the
DVD objects explicitly.
django-admin.py inspectdb --settings=settings > models.py
Traceback (most recent call last):
File "/home/mark/bin/django-admin.py", line 8, in ?
management.execute_from_command_line()
File "/usr/lib/python2.4/site-packages/django/core/management.py",
line 1307, in execute_from_command_line
Milton Waddams escribió:
> I use eric3 for my python work, jEdit for templates.
I use eric3 for both.
> I only use the basic features of eric (projects and editing).
I also use project browsing, autocompletion (from API and/or previous
text), hints and some other things (like the built-in gre
Thanks for the link! This is what I was looking for.
Greetings,
Peter
--~--~-~--~~~---~--~~
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 unsu
I currently use Notepad++ in Windows, it is based on Scintilla so the
editor is very similar to scite. The nice thing about the editor is
that it is very python friendly wrt to indentation, indentation guides
and folding. Very minimalistic and has the nice Firefox approach to
tabbing (Middle mouse
On 10/9/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I like KDevelop, for Linux. Works also fine for django templates.
> Has syntax highlighting, class browsing, ctags, bookmarks, and
> all the usual editor stuff. I really like the class browser for
> looking up source code within dj
Hi,
I like KDevelop, for Linux. Works also fine for django templates.
Has syntax highlighting, class browsing, ctags, bookmarks, and
all the usual editor stuff. I really like the class browser for
looking up source code within django--Alt+C, start entering the
class name, and you're there.
B
Anyway, you can find the location of your django project files with
the following (if this is what you really need):
import os
DIRNAME = os.path.dirname(__file__)
Good luck!
Aidas Bendoraitis [aka Archatas]
On 10/9/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Sun, 2006-10-08 at 12:5
Another vote for PyScripter if you're working in Windows. I still have
to work out how to integrate the integrated command line interface with
Django (so that it equals manage.py runshell in functionality).
--~--~-~--~~~---~--~~
You received this message because y
> agreed, in a perfect world i would parse the log files. But
> sometimes you don't have access to a cron daemon.
In this case you should read the database API documentation page.
Then your code looks something like this:
from django.shortcuts import get_object_or_404
from my.models import MyOb
84 matches
Mail list logo