Hi.
I'm stumped and can't figure out a solution for the following:
With the models:
class Entry(models.Model):
pub_date = models.DateTimeField('date published')
created = models.DateTimeField(auto_now_add=True, editable=False)
edited = models.DateTimeField(auto_now=True, editable=Fal
On Fri, Aug 29, 2008 at 8:09 PM, Richard Ward <[EMAIL PROTECTED]> wrote:
>
> It looks like the solution to this is in the newest release. Ref.
> http://code.djangoproject.com/changeset/8136
Richard - Gergo, Antti, and I are well aware of the m2m intermediate
change in [8136]. What we are discuss
On Aug 30, 5:40 am, bryanzera <[EMAIL PROTECTED]> wrote:
> I am a new Django user with Django 0.96 deployed in a sub-directory
> under our main document root. My problem is that I cannot get my URL
> configuration to work.
>
> Inside the Django-deployed subdirectory, I have the following urls.p
Chapter 4 of the book: "Learning Website Development with Django" by
Ayman Hourieh offers a simple example of a login page. The example
worked with an earlier svn version of Django, and now seems to fail
with the latest svn version (8728).
Specifically, this pattern:
urlpatterns = patterns('
I can't say for sure, but I believe that the now button in the admin
is a javascript. So I think that is where you need to look to control
the output.
Steve
On Aug 29, 4:14 pm, Gerard Petersen <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Im *still* :-( trying to get the date format from -mm-dd
Here's a pastebin of the traceback: http://pastebin.com/m43fb0960
Photologue is version 2.0-rc1
Django is version 1.0-beta_1
I did everything the photologue readme said. Put photologue in my
installed apps, ran syncdb, plinit, etc. everything went fine.
I added a photo and made a gallery, and
Thanks Malcolm. That really cleared things up for me! Now I can
relax, just a little, for the holiday weekend. That was really
driving me nuts!
On Aug 29, 6:06 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2008-08-29 at 15:00 -0700, lingrlongr wrote:
> > I can see some differenc
That's also a good idea. Thanks Jim.
--~--~-~--~~~---~--~~
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
Thanks a lot, now I get it. That's exactly why I asked, I suspected
that the imports had to be done is such a way that they would be
independent of the location of app so I can reuse the code in many
projects.
Cheers!
--~--~-~--~~~---~--~~
You received this message
On Aug 30, 12:20 am, Greg Fuller <[EMAIL PROTECTED]> wrote:
> Thanks for the replies.
>
> I like the middleware solution, if you can modify settings variables
> during middleware processing. The documentation warns against altering
> settings at runtime.
>
> What are the consequences of ignoring
On Fri, Aug 29, 2008 at 5:58 PM, Guillaume Lederrey
<[EMAIL PROTECTED]> wrote:
> After updating to the latest trunk, I get a couple of errors when I
> have field that define "core=True". After digging into the code, I
> find changeset 8616 (http://code.djangoproject.com/changeset/8616)
> that docu
Hello !
After updating to the latest trunk, I get a couple of errors when I
have field that define "core=True". After digging into the code, I
find changeset 8616 (http://code.djangoproject.com/changeset/8616)
that documents that. However, this doesnt seem to be include in the
backward incompatib
Hi All,
I have been hitting my head against a wall for way to long on this.
When I view it on the edit page everything looks great! But when I
try to Save or Update, everything unravels.
I'm following it just the way the very sparse documentation suggests,
and yet I get a "Exception Type:
On Fri, 2008-08-29 at 15:00 -0700, lingrlongr wrote:
> I can see some differences between the Python Path for the dev server
> (manage.py runserver) and apache/mod_python. I created an error in a
> template using an invalid tag so the Django pretty error screen
> appears. Using the development
I can see some differences between the Python Path for the dev server
(manage.py runserver) and apache/mod_python. I created an error in a
template using an invalid tag so the Django pretty error screen
appears. Using the development server I see:
Python Path:['/home/django/proj/loan', '/us
I have a situation where I want to edit the IDv3 tag on mp3's uploaded
in a FileField. The model with the FileField is being edited inline to
a parent model, and I need to use some of the parent data in the IDv3
tag. I am using a custom filestorage backend for Amazon S3, so I
basically need a way
On Aug 29, 2008, at 2:22 PM, Benjamin Buch wrote:
>
> Clumsy subject, I know...
>
> I know there was a recent discussion about this, but I lost it, so
> sorry for asking again.
> So here's the question:
>
> How can you allow your users to add something like pictures into
> something like blog pos
Hi All,
Im *still* :-( trying to get the date format from -mm-dd to dd-mm-
After a major dig into mysql, it seems that the date format in it's tables is
always -mm-dd. Normally, depending on your locale, date and/or time stamps
are formatted on the fly.
I changed all the date rel
Martin,
After a few days of diggin' I'm well on my way. Never saw the page you sent me.
Marvelous docs. Thanx!!
regards,
Gerard.
Martin Diers wrote:
> I would suggest that first you learn about forms and widgets apart
> from the admin. Once that is done, it's pretty trivial to crate your
I would suggest that first you learn about forms and widgets apart
from the admin. Once that is done, it's pretty trivial to crate your
own ModelForm and assign it to your admin.
As to a tutorial, there's the newforms-admin HOWTO, that may be of use:
http://code.djangoproject.com/wiki/Newform
There is a currently a discussion an even newer discussion on Dev,
where Jacob has proposed a new syntax, and has a patch that would
allow this:
{% url django-admindocs-docroot as docroot %}
Then docroot becomes a variable, containing the url, that can be used
in a {% blocktrans %}, obvi
Just to let you know, if you upgraded your Django version, you
wouldn't have to manually specify base_url in you URLconf because
Django will do it for you. I'm not sure what's causing your problem
though.
Erik
On 29.08.2008, at 22:40, bryanzera wrote:
>
> I am a new Django user with Djang
I am a new Django user with Django 0.96 deployed in a sub-directory
under our main document root. My problem is that I cannot get my URL
configuration to work.
Inside the Django-deployed subdirectory, I have the following urls.py
file:
from django.conf.urls.defaults import *
base_url = 'columb
i have a table with name catagory and sub category
class Products(models.Model):
name = models.CharField(max_length=30)
catagory = models.ForeignKey(Catagories)
sub_catagory = models.ForeignKey(Sub_Catagory)
i want to display the products on a page like this
Catagory
This sounds like the same problem I'm having I have a post
going here too!
http://groups.google.com/group/django-users/browse_thread/thread/c30b4395f5153cf3/dad6e7a1ebef3175#dad6e7a1ebef3175
On Aug 29, 2:54 pm, Aaron <[EMAIL PROTECTED]> wrote:
> Hi, strange enough, I was having a simil
Clumsy subject, I know...
I know there was a recent discussion about this, but I lost it, so
sorry for asking again.
So here's the question:
How can you allow your users to add something like pictures into
something like blog posts?
Not just below or above (this could be achieved by a simple
On Fri, 2008-08-29 at 11:16 -0700, Aidas Bendoraitis wrote:
> Hello all!
>
> How to control the escaping of translations in templates? For example,
> {% trans "I & Co" %} should be escaped in html templates but not in
> javascript (or other language) templates.
You'll have to use different mess
I'd like to build relations with objects without saving to pre-
determine the price for a proposed order based on a set of products.
But when I add a Product project to the Order, I first have to save
the Order. Is there any way around this?
Example:
class Order(Model):
id = models.AutoF
Hi,
in my project I want to give the users the possibility to put in some
content (some sort of page intro...) into a text field and than choose
on which page the content gets displayed.
Perhaps a very common problem while building cmssy projects...
I thought I could achieve this by displayi
Hi, strange enough, I was having a similar problem as you just awhile
ago (w/ mod_wsgi). The cause as I discovered was that if you have an
app inside your project, you'll have to include the project name
before any import statements. So, for your case, chances are, there
may be references to boo
> Maybe I'm wrong but this patch define DEFAULT_ALGO at "django
> installation" level. I think it shoud be defined at prject level.
> something like this
>
try:
> ... DEFAULT_ALGO = settings.DEFAULT_ALGO
> ... except NameError:
> ... DEFAULT_ALGO = 'sha1'
>
> does refer to project s
Hello all!
How to control the escaping of translations in templates? For example,
{% trans "I & Co" %} should be escaped in html templates but not in
javascript (or other language) templates.
Aidas Bendoraitis aka Archatas
--~--~-~--~~~---~--~~
You received this
I think you should be able to customize it by simply defining a
response_add method in the corresponding class of your admin.py
class MyAdmin(admin.ModelAdmin):
as your admin interface is derived from ModelAdmin and response_add is
defined in it by creating
def response_add(self, request, ob
I think a possibility would be to overwrite the admin template as
described in http://www.djangobook.com/en/1.0/chapter17/
V
On Aug 29, 3:35 pm, Dennis Schmidt <[EMAIL PROTECTED]> wrote:
> Hello again,
>
> now I'm just wondering how I can add some custom js files to a model's
> "list overview pa
Am 26.08.2008 um 15:56 schrieb Karen Tracey:
> The traceback shows the sequence of calls made. So runserver.py on
> line 47 called self.validate... which wound up on line 122 of
> base.py calling get_validation_errors, etc. until you get to line
> 139 of base.py caling contribute_to_class
Juan Miguel: Confirm my suspects, thankyou.
varikin: how i didn't think on it before, thanyou.
--~--~-~--~~~---~--~~
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
> How to view the sql query statement involved in a django web page for
> optimization? thx
http://www.djangoproject.com/documentation/faq/#how-can-i-see-the-raw-sql-queries-django-is-running
Just make sure DEBUG is False in a production environment, or
this is one of the first things that will
I'm probably doing something stupid but this has bugged me all
morning. I have a ModelForm form and a view to add info to a Media
model I have. This works:
class AddPhotoForm(ModelForm):
class Meta:
model = Media
def add_pet_photo(request, pet_id):
pet = Pet.objects.get(id=pet_id)
Howdy Egon!
About this part:
> Now imagine a human enters search terms into a text input field of a
> form, which passes a queryset object instance back to a view, which
> then renders /calls to a template where I can make use of that
> queryset.
> So far correct?
When the user enters search te
Hi, all:
How to view the sql query statement involved in a django web page for
optimization? thx
--~--~-~--~~~---~--~~
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@
This approach has locking issues in multi user environment. I will
need to take an exclusive lock when I read and update the table.
How can I take exclusive lock in django ORM?
In case of a sequence, DB does the locking for me.
has anyone used Sequences (postgresql) using either django ORM or
d
Come meet other Django developers from Toronto!
http://groups.google.ca/group/django-toronto
--~--~-~--~~~---~--~~
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@goog
On Fri, Aug 29, 2008 at 11:24 AM, Briohny <[EMAIL PROTECTED]>wrote:
>
> Hi again Karen,
>
> Just wondering about Pressroom too. I couldn't see a new version
> however the version that is currently in trunk doesn't seem to be
> working in Django-1.0-alpha-2 version.
>
> File "C:\Documents and Set
There is somewhere an SQLLogger floating around. I use the following, which
I found a while ago and will print the SQL statements at the bottom of the
generated page.
from django.db import connection
from django.template import Template, Context
class SQLLogMiddleware:
def process_response (
Thanks Malcolm. How do I choose which version I want to use?
I just don't understand it. Maybe some errors will help...
With DEBUG = True, I don't get any useful information. So I turn that
off and now I get this traceback:
Traceback (most recent call last):
File "/usr/local/python/lib/py
Hi again Karen,
Just wondering about Pressroom too. I couldn't see a new version
however the version that is currently in trunk doesn't seem to be
working in Django-1.0-alpha-2 version.
File "C:\Documents and Settings\TR\Sample Projects\newsite\ ", line
7, in
from django_apps.photologue.
Hi!
Before I paste the code here is what I want to achieve:
1) All content is supplied via django admin, no custom upload/edit
forms
2) The Photo class holds title and note (the text data), two images
(full and thumb), and stats data of hits and comments count
3) The stamp should be updated only
Koen Bok wrote:
> I'd like to build object relations (Model classes) without saving them
> to the database to predict a price for a specific order. Let's say I
> have this:
>
> class Order(Model):
> id = models.AutoField(primary_key=True)
> number = models.IntegerField()
>
> de
Thanks for the replies.
I like the middleware solution, if you can modify settings variables
during middleware processing. The documentation warns against altering
settings at runtime.
What are the consequences of ignoring the warning?
Eric, I don't think setting up multiple projects would wor
Hi there,
as far as I understood and until now needed to know, Django works for
me like this:
Human enters url into browser -> urls.py -> views.py -> template
In the template, I could dynamically generate a url which matches in
another urls.py somewhere, and that closes the circle.
Now imagine
On Fri, Aug 29, 2008 at 9:47 AM, truebosko <[EMAIL PROTECTED]> wrote:
>
> Basically lets you over-ride templates. Maybe that message is simply
> part of a template, not sure .. but hopefully that helps.
>
No, these messages are not part of the templates. You can see where they
are built in the c
Hi All,
Im trying to get the date format to european (dd-mm-). I configured the
timezone in settings.py. Since I use modelforms, should this field format be
set in the model?
Currently the error on the form field is "Enter a valid date". Is this due to
the model or the form field definiti
I'm not sure on that specific one, but you can over-ride admin
templates piece by piece
See:
http://www.djangoproject.com/documentation/tutorial02/#customize-the-admin-look-and-feel
Basically lets you over-ride templates. Maybe that message is simply
part of a template, not sure .. but hopeful
Hello again,
now I'm just wondering how I can add some custom js files to a model's
"list overview page" in the admin site. When I add this inner Media
class to the model's admin class in the admin.py the js files will
only be included on the editing page. But I need some js files in the
overview
On Fri, Aug 29, 2008 at 9:15 AM, Dennis Schmidt
<[EMAIL PROTECTED]>wrote:
>
> Hello everybody,
>
> when you do something like saving an object in the admin site this
> small yellow bar on top will show up, telling you something like
> "correctly saved". I'd like to display my own custom messages t
Issue solved by Sean Gillies! (http://sgillies.net/)
See http://trac.osgeo.org/geos/ticket/201
and even a snapshot with the fix
http://gispython.org/downloads/geos/geos-r2174.tar.gz
Thanks man! You rock!
[]s
Luiz Fernando Barbosa Vital
On Tue, Aug 26, 2008 at 6:02 PM, Luiz Vital <[EMAIL PR
Hello everybody,
when you do something like saving an object in the admin site this
small yellow bar on top will show up, telling you something like
"correctly saved". I'd like to display my own custom messages there.
But I couldn't find out yet how to achieve this. Can someone help me
please?
r
> > If it's mostly paths that you need to change, check out:
>
> >http://rob.cogit8.org/blog/2008/Jun/20/django-and-relativity/
There's a much easier (IMO anyway) method that does not involve
messing with settings.py. If you just want to find out the directory
of the current application, you ca
Hi!
I would like to write a simple test to see that the files uploaded
through a form are properly saved. Could someone tell me what data
should I post in the testclient?
thanks, Viktor
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
On Aug 29, 8:50 pm, Erik Allik <[EMAIL PROTECTED]> wrote:
> For the iPhone templates issue, I'd set up two projects instead of one
> -- one for regular browsers, one for the iPhone. Then I'd simply
> redirect from the regular one to the iPhone one as needed. Although
> this has the negative
Actually, there is an admin interface built into django.
You can get it running by simply adding django.contrib.admin to your
settings.py INSTALLED_APPS variable and reading through the comments
of your urls.py and uncommenting the corresponding lines.
Still, by default this admin is not extremel
On Fri, Aug 29, 2008 at 5:18 AM, Benjamin Buch <[EMAIL PROTECTED]> wrote:
>
> Seems like something in django/contrib/gis/geos broke the python help
> system:
>
> benjamin-buchs-macbook:~ benjamin$ python
> Python 2.5.1 (r251:54863, Feb 4 2008, 21:48:13)
> [GCC 4.0.1 (Apple Inc. build 5465)] on da
If you can't get this to work out with mod_python, perhaps consider
using mod_wsgi.
http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi
Checkout this post for comparisons between the two:
http://groups.google.com/group/django-users/browse_thread/thread/456581f4bc8506b8/5db7dd7bceb87f48
It looks like the solution to this is in the newest release. Ref.
http://code.djangoproject.com/changeset/8136
On Fri, Aug 29, 2008 at 1:40 AM, akaihola <[EMAIL PROTECTED]> wrote:
>
> This looks like Gergo's ticket for his original request:
> http://code.djangoproject.com/ticket/8334
> >
>
--
No :(
I already tried that.
same results.
cavebird
On Aug 29, 4:47 pm, Aaron <[EMAIL PROTECTED]> wrote:
> Hi cavebird,
>
> Not sure if this has anything to do with the symbolic link, but I
> remember having some path issues on mod_python awhile back. Try
> copying mysite inside htdocs and see
On Aug 29, 10:30 am, Martin Gilday <[EMAIL PROTECTED]> wrote:
> Is it possible to run a single test using manage.py test, rather than
> the whole suite? I have defined a tests.py in one of my apps and
> would just like to run those tests, as the auto generated tests take
> far to long to be runni
Hi cavebird,
Not sure if this has anything to do with the symbolic link, but I
remember having some path issues on mod_python awhile back. Try
copying mysite inside htdocs and see if that has any effects.
Aaron
On Aug 29, 4:32 am, cavebird <[EMAIL PROTECTED]> wrote:
> Hi,
> I have been learnin
A reguler download would be appreciated.
Regards,
Gerard.
DavidY wrote:
> Here is a two page, concise, example-based cheat sheet for
> forms.Forms
>
> http://www.scribd.com/doc/5224358/cheatsheet-of-formsForm-for-django
>
> download is available on the page somewhere
> have a good time web de
Hi,
I have been learning Django and came across this problem
I am trying to access django apps from apache2 but it just wont work :
(
Here is what i did:
added in /usr/local/apache2/conf/extra/httpd-info.conf:
SetHandler python-program
PythonHandler django.core.handlers.modpython
Pyth
Hi guys,
I am experienced some trouble when using the "accounts/login" next
redirection that involves more than one query string. For some
reason, the redirected url is truncate and only seems to pick up the
first query string.
For example, both of the following:
accounts/login/?next=/post/add
I'd like to build object relations (Model classes) without saving them
to the database to predict a price for a specific order. Let's say I
have this:
class Order(Model):
id = models.AutoField(primary_key=True)
number = models.IntegerField()
def total(self):
For the iPhone templates issue, I'd set up two projects instead of one
-- one for regular browsers, one for the iPhone. Then I'd simply
redirect from the regular one to the iPhone one as needed. Although
this has the negative side effect of having more than one URL per
resource, but you co
I'm not sure if this will work for you, but I'd simply create a
"helper" table and Django model for that and insert new entries there
to get the next number in the sequence. You might even find it useful
for storing other data such as when a certain number in the sequence
was generated and
Malcolm Tredinnick wrote:
>
> On Thu, 2008-08-28 at 21:32 -0400, Steve Holden wrote:
>> lingrlongr wrote:
>>> Submitted ticket #8663 for the following:
>>>
>>> When a ModelForm? is used to display a form for a Model, the fields
>>> defined with a choices option insert a "---" value for the fi
Is it possible to run a single test using manage.py test, rather than
the whole suite? I have defined a tests.py in one of my apps and
would just like to run those tests, as the auto generated tests take
far to long to be running every time whilst writing them. This might
be because I am new to
Seems like something in django/contrib/gis/geos broke the python help
system:
benjamin-buchs-macbook:~ benjamin$ python
Python 2.5.1 (r251:54863, Feb 4 2008, 21:48:13)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> help
Here is a two page, concise, example-based cheat sheet for
forms.Forms
http://www.scribd.com/doc/5224358/cheatsheet-of-formsForm-for-django
download is available on the page somewhere
have a good time web developing
--~--~-~--~~~---~--~~
You received this message
Here is a two page, concise, example-based cheat sheet for
forms.Forms
http://www.scribd.com/doc/5224358/cheatsheet-of-formsForm-for-django
download is available on the page somewhere
have a good time web developing
--~--~-~--~~~---~--~~
You received this message
On Aug 29, 4:19 am, Issac <[EMAIL PROTECTED]> wrote:
> I have installed python2.5 on RH3L-AS4 successfully.
> And already installed Django1.0-beta2 successfully.
>
> After i create a project test, when i use python manage.py runserver
> to start the dev server, the log shows error during the start
On Aug 28, 11:24 pm, Greg Fuller <[EMAIL PROTECTED]> wrote:
> I would like a way to to adjust settings based on information in the
> http header. I've seen a similar question asked before, but I don't
> need all the django request object, just the http header information.
> More specifically, us
try docs.djangoproject.com
RS
On Fri, Aug 29, 2008 at 12:28 PM, Luka Birsa <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> I'm just starting with Django (I read the djangobook.com) and I've
> upgraded to 1.0. There are quite some changes and I'm wondering is
> there any documentation (as in a good book
On Aug 29, 7:18 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I can get user_utilization but member.user gives me django object. How
> can I get that information?
>
> In [199]: for member in prj_members:
> .: member.user
> .: member.user_utilization
> .:
> Out[1
Hello
I'm just starting with Django (I read the djangobook.com) and I've
upgraded to 1.0. There are quite some changes and I'm wondering is
there any documentation (as in a good book) coming out?
Best regards,
Luka
--~--~-~--~~~---~--~~
You received this message
Maybe I'm wrong but this patch define DEFAULT_ALGO at "django
installation" level. I think it shoud be defined at prject level.
something like this
>>> try:
... DEFAULT_ALGO = settings.DEFAULT_ALGO
... except NameError:
... DEFAULT_ALGO = 'sha1'
does refer to project settings have some s
Very interesting approach, going through subclassing HttpResponse for
generating views. Just some more alternatives if you don't mind ;-)
A couple of months ago, Arne Brodowski wrote some similar on his blog
[1] also kind of using the servlet-split (a view-method per
http-method). Also some time
85 matches
Mail list logo