Thank you Malcolm and Karen, I had to step for the day but when I got
home I read your comments and fixed the issue which was exactly as you
both pointed out.
this helped make my photo model much more search friendly.
@permalink
def get_absolute_url(self):
return ('photo_detail',
On Thu, 2008-04-24 at 22:59 -0700, Eric Abrahamsen wrote:
> I'm trying to implement a very basic tagging function using generic
> relations, and running into errors I don't understand. The basic setup
> is, I've got a model called Series, and series should be linkable to
> many models via a
I'm trying to implement a very basic tagging function using generic
relations, and running into errors I don't understand. The basic setup
is, I've got a model called Series, and series should be linkable to
many models via a SeriesItem model. Following the instructions here:
http://www.djan
Hey,
I think you should take a look at this. I used this and its working
fine.
http://www.djangosnippets.org/snippets/141/
Do remember to install 'libgmail' module inorder to get this working.
On Apr 24, 10:55 am, Szaijan <[EMAIL PROTECTED]> wrote:
> I am building my first Django app and tr
On Thu, 2008-04-24 at 19:44 -0700, zoggernaut wrote:
[...]
>
> SetHandler python-program
> PythonHandler django.core.handlers.modpython
> SetEnv DJANGO_SETTINGS_MODULE frobnitz.settings
> #SetEnv DJANGO_SETTINGS_MODULE settings.py
> PythonDebug On
> PythonPath "['/usr/hom
On Thu, 2008-04-24 at 17:27 -0700, Scott McCracken wrote:
> Please excuse my apparent inability to figure out local server issues.
> I would simply like to use Markdown to format text in my Django app:
> * I have Django setup locally (OS X), with 'django.contrib.markup'
> added to my INSTALLED_AP
On Thu, 2008-04-24 at 15:29 -0700, jonknee wrote:
> > Look at the 'tables' and 'where' parameters to the extra() method on
> > querysets.
> >
>
> I got very close with the tables parameter, but it always adds in a
> comma between the existing INNER JOIN statements and the one I'm
> trying to add
Rodney Topor wrote:
OK, sorry for the unclear message.
I've now discovered that if I use an embedded CSS file in a template -
h1 { color: red} - then it works correctly.
But if I use an external CSS file in a template - - then, even if the
style sheet only changes font colors, the effect is tha
There is a safe filter, so {{ myvar|safe }}. You can also look into
using the autoescape tag, too. Check out the documentation listed
here:
http://www.djangoproject.com/documentation/templates/#automatic-html-escaping
Hope that helps!
-Eric Florenzano
On Apr 24, 11:57 pm, Brandon Taylor <[EMA
Hi everyone,
I've got TinyMCE integrated into my admin, and is working great, but
when I output the HTML for the record into my template, the HTML tags
are being rendered as plain text, as in, all of the tags are visible.
What can I do to allow HTML stored in my database to render properly
in th
very beauty ful game www.mobilegalaxy.net.tc
--~--~-~--~~~---~--~~
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
On Apr 25, 1:01 pm, gmacgregor <[EMAIL PROTECTED]> wrote:
>
> http://groups.google.com/group/django-users/browse_thread/thread/906a...
Thank you. Now I understand this issue.
> It's best to create a "templates" directory and then within that
> directory create directories that correspond to e
On 4/24/08, Rodney Topor <[EMAIL PROTECTED]> wrote:
>
> Is Flatpages required to display every static HTML page? It seems to
> require a fair bit of work by the programmer, and requires additional
> tables and rows in the database. I guess it's simpler for the
> programmer than writing a ne
I'm having similar issues gettind mod_python to work with Apache on a
windows box. I don't have my httpd.conf in front of me atm, but i'm
basically seeing what zoggernaut is seeing :(
Best,
R
On 25-Apr-08, at 8:14 AM, zoggernaut wrote:
>
> FYI, I followed the instructions on the tutorial po
Put your CSS files in your media directory. If your media url is
"http://yoursite/media/";, then you could do something like and you should see your intended
style.
On Thu, Apr 24, 2008 at 10:01 PM, gmacgregor <[EMAIL PROTECTED]> wrote:
>
>
> On Apr 24, 10:49 pm, Rodney Topor <[EMAIL PROTECTE
Is Flatpages required to display every static HTML page? It seems to
require a fair bit of work by the programmer, and requires additional
tables and rows in the database. I guess it's simpler for the
programmer than writing a new view for every static HTML page, though
this would not require d
On Apr 24, 10:49 pm, Rodney Topor <[EMAIL PROTECTED]> wrote:
> So, if my project has a directory structure "mysite/templates/app/
> template.html", then in which directory should I place the CSS file?
You'll find this thread helpful:
http://groups.google.com/group/django-users/browse_thread/thr
I forgot to add I am using the most recent release of SVN.
--~--~-~--~~~---~--~~
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
Well I have been attempting to make this work for me
http://code.google.com/p/django-registration/
in conjunction with the gmail piece, but I think I am missing
something. I changed my settings file accordingly and the other file
as directed. I have libgmail installed, from django.core.mail impo
OK, sorry for the unclear message.
I've now discovered that if I use an embedded CSS file in a template -
h1 { color: red} - then it works correctly.
But if I use an external CSS file in a template - - then, even if the
style sheet only changes font colors, the effect is that the font
style is c
FYI, I followed the instructions on the tutorial posted here:
http://www.djangoproject.com/documentation/tutorial01
Below is my settings.py Mod_python runs fine.
settings.py
-
DEBUG = True
TEMPLATE_DEBUG = DE
Hi,
You can pass "allow_empty=True" to generic views in case of you don't like
404.
Cheer
Chatchai
2008/4/24 David Reynolds <[EMAIL PROTECTED]>:
>
>
> On 21 Apr 2008, at 10:14 pm, Jon Lesser wrote:
>
> > It seems that if there are no entries for a particular month, the
> > archive link to that
http://code.google.com/p/pyisapi-scgi/
On Fri, Apr 25, 2008 at 1:35 AM, jmDesktop <[EMAIL PROTECTED]> wrote:
>
> I have a requiremnet to use Django on IIS. I know there is a wiki
> page on Django about it, but what I'm after is if anyone is actually
> using it daily in production. Just hoping t
Please excuse my apparent inability to figure out local server issues.
I would simply like to use Markdown to format text in my Django app:
* I have Django setup locally (OS X), with 'django.contrib.markup'
added to my INSTALLED_APPS.
* I installed python-markdown by following the official instruc
So, after re-reading the related_name / related_objects documentation
I've dealt with my lack of understand on properly getting __str__
method to return what I want, I thnk.
And the other part, creating an instance of CheckList whenever an
Event is created should be easy, too.
Just wasn't lookin
On Apr 24, 6:34 am, Rufman <[EMAIL PROTECTED]> wrote:
> Hey Graham
>
> thanks for the insight
>
> Stephane
I won't debate any of what Graham has said, as it's a pretty standard
answer from what I've seen, and he's a lot smarter than me. I just
want to note that fastcgi makes a nice separation
On Apr 23, 7:23 pm, "Jorge Vargas" <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 23, 2008 at 11:09 AM, Don Spaulding
>
> <[EMAIL PROTECTED]> wrote:
>
> > On Apr 22, 11:24 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
> > wrote:
>
> > > On Tue, 2008-04-22 at 13:47 -0700, Don Spaulding wrote:
>
> > > [
> Look at the 'tables' and 'where' parameters to the extra() method on
> querysets.
>
I got very close with the tables parameter, but it always adds in a
comma between the existing INNER JOIN statements and the one I'm
trying to add (which leads to a MySQL error). That makes sense because
its mea
On Thu, Apr 24, 2008 at 4:07 PM, Mihai Damian <[EMAIL PROTECTED]> wrote:
>
> So new lines on blocktrans tags get a \r\n on Windows as opposed to
> just \n on Linux. That's what's causing the whole problem. Maybe the
> make-messages.py could be modified to check if os.name is nt or os2
> and if
On Apr 23, 9:23 am, Justin Bronn <[EMAIL PROTECTED]> wrote:
> > A PointField from that same model containing lat/long pairs obtained
> > from the Google geocoder.
Quick follow-up in case anyone else has a similar problem. The Google
geocoder annoyingly returns latitude and longitude as y/x instea
Hi,
I have the following:
class Event(models.Model):
date = models.DateTimeField()
description = models.TextField()
def __str__(self):
return self.date
class Admin:pass
class CheckList(models.Model):
name = models.CharField(max_length=32)
> ImportError: Could not import settings 'frobnitz.settings' (Is it on
> sys.path? Does it have syntax errors?): No module named
> frobnitz.settings
So as the error clearly asks you:
1. Does your frobnitz/settings.py have syntax errors?
2. Is it in your PYTHONPATH? Your Apache conf for the appli
Hi,
On Apr 24, 11:33 am, meppum <[EMAIL PROTECTED]> wrote:
> If you create a listener for a certain models post_save signal and the
> corresponding function is supposed to create or update another object,
> will all this be saved in the same transaction?
It should be, yes. Signal handlers are la
Awesome, this worked perfectly. I completely forgot about custom
template tags. I can now build the form dynamically and display any
info from the object.
On Apr 24, 1:51 pm, "Phil Davis" <[EMAIL PROTECTED]> wrote:
> 2008/4/24Raisins<[EMAIL PROTECTED]>:
>
>
>
> If you really want to do it you can
So new lines on blocktrans tags get a \r\n on Windows as opposed to
just \n on Linux. That's what's causing the whole problem. Maybe the
make-messages.py could be modified to check if os.name is nt or os2
and if so read the target file, replace \r with '', write the new
content to a temporary file
sys.path
ServerName: 'spork.piggify.org'
DocumentRoot: '/usr/local/www/apache22/data'
URI:'/frobnitz/'
Location: '/frobnitz/'
Directory: None
Filename: '/usr/local/www/apache22/data/frobnitz/'
PathInfo: ''
Phase: 'PythonHandler'
Handler:
On Thu, Apr 24, 2008 at 12:21 PM, Merrick <[EMAIL PROTECTED]> wrote:
>
> Thank you, I updated get_absolute_url to take into consideration the
> fact that I was erroneously using state_slug instead of state.slug and
> the same with photo.slug and place.slug
>
>def get_absolute_url(self):
>
I am building my first Django app and trying to incorporate django-
registration. Whenever a link gets clicked that calls for sending
mail to a user, the page loads continually with no timeout. No errors
are generated and no URL info appears in STDOUT or STDERR when running
on the dev server. T
2008/4/24 Phil Davis <[EMAIL PROTECTED]>:
> 2008/4/24 Raisins <[EMAIL PROTECTED]>:
>
[...]
> {% for x in form %}
> {{x.item.some_x_attr}}
> {{x}}
> {% endfor %}
>
I forgot that within the template there is a BoundField wrapper around
each real form field so the above example should be:
{%
I finally got it working. You can check out the results at
http://niethestate.com/trafficstops/ It was painful, though. Use apache if
you can. I've talked my corp. into buying some linux servers at server beach
so hopefully it will be much easier.
-justin
On Thu, Apr 24, 2008 at 1:35 PM, jmDeskto
I am building my first Django app and trying to incorporate django-
registration. Whenever a link gets clicked that calls for sending
mail to a user, the page loads continually with no timeout. No errors
are generated and no URL info appears in STDOUT or STDERR when running
on the dev server. T
2008/4/24 Raisins <[EMAIL PROTECTED]>:
>
> I have moved along some more. Now Using this snippet (
> http://www.djangosnippets.org/snippets/148/ )
>
> z = FOO.objects.get(id=pram_id)
> y = z.BAR.filter(off = False)
> #.
> form_dict = {}
> for x in y:
> form_dict[x.id] = forms.Boo
Thanks Malcom, I don't know why I thought it didn't work last night.
I guess I shouldn't try to figure out new stuff in the 13th working
hour of the day.
On Apr 24, 12:49 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Wed, 2008-04-23 at 22:19 -0700, Tim Saylor wrote:
> > I have two column
I have a requiremnet to use Django on IIS. I know there is a wiki
page on Django about it, but what I'm after is if anyone is actually
using it daily in production. Just hoping to see how it's going. If
not I have to persuade to use Apache on the Windows box. Thanks.
--~--~-~--~~--
Matias,
On Thu, 24 Apr 2008, Matias Surdi wrote:
> I can't get to work the order_by('related_table.field') as described in
> http://www.djangoproject.com/documentation/db-api/#order-by-fields
>
> Is this documentation correct?
I think it's close. To get the above to work in cases were I've use
Being new in the Python/Django camp (2 weeks) but doing php for
several years, I find this a very interesting topic and I would like
to extend the question a bit, like "when is an app becoming too big?"
The use case here is when you develop a rather complicated "app" which
need to have quite some
Hi again,
I can't get to work the order_by('related_table.field') as described in
http://www.djangoproject.com/documentation/db-api/#order-by-fields
Is this documentation correct?
I'm using django from SVN trunk.
Thanks.
--~--~-~--~~~---~--~~
You received th
On Apr 24, 4:44 am, nickloman <[EMAIL PROTECTED]> wrote:
> class MyForm(forms.Form):
> def __init__(self, user, data=None):
> forms.Form.__init__(self, data)
>
> self.fields['my_options'] =
> ModelChoiceField(queryset=SomeModel.objects.get_users_objects(user))
You're on the ri
Thank you, I updated get_absolute_url to take into consideration the
fact that I was erroneously using state_slug instead of state.slug and
the same with photo.slug and place.slug
def get_absolute_url(self):
return ('photo-detail', None, { 'state' :
self.photo.place.city.state.slug ,
On Thu, 2008-04-24 at 09:08 -0700, Merrick wrote:
> Sorry to confuse things, I actually thought putting the shell output
> would give a bigger picture.
>
> The problem I am trying to solve is getting related to
> get_absolute_url()
>
> >>> photo.get_absolute_url()
> Traceback (most recent call
Sorry to confuse things, I actually thought putting the shell output
would give a bigger picture.
The problem I am trying to solve is getting related to
get_absolute_url()
>>> photo.get_absolute_url()
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.4/site-pack
On Thu, 2008-04-24 at 08:55 -0700, Merrick wrote:
[...]
> ***Shell output
>
> >>> from photologue.models import *
> >>> photo = Photo.objects.get(slug='golf-course-3')
> >>> photo.place.city.state_slug
> Traceback (most recent call last):
> File "", line 1, in ?
> AttributeError: 'City' object
I am still learning Django, and appreciate all of the help I have
received. I spent a few hours on this and just cannot figure out how
to pull off the get_absolute_url() function the way I describe it
below for the Photo class. I want to use the slugs for related models
and step through multiple r
Erik Vorhes wrote:
> There's nothing wrong with parceling out models across different apps.
> And unless you're planning on distributing each app separately, don't
> worry about cross-app dependencies.
>
> In this case, I'd encourage you to--since you'll probably want to do
> more than just book-
Yes, it seem to be problem only on Window environment. I asked my friend to
run command under Linux. It works fine.
Cheers.
Chatchai
2008/4/24 Mihai Damian <[EMAIL PROTECTED]>:
>
> Not shure yet but this could be a Windows only issue. I'll get back
> later with some tests.
> >
>
--~--~---
Rodrigo Culagovski napisał(a):
> it looks like Solr has its own database. The application is in Django,
> so it wouldn't make any sense to replicate the database in the search
> engine.
Solr has an index, not a database. This is complete search and indexing
machinery. Think "mini-google".
--
J
On Thu, 2008-04-24 at 05:15 -0700, LaundroMat wrote:
> Hi,
>
> When creating a new user, is_active is automatically set to True. The
> django docs say this means "Designates whether this account can be
> used to log in. Set this flag to False instead of deleting accounts."
>
> On the admin page
Jarek,
it looks like Solr has its own database. The application is in Django,
so it wouldn't make any sense to replicate the database in the search
engine.
Thanks,
Rodrigo
On Apr 24, 5:37 am, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Rodrigo Culagovski napisał(a):
>
> > I am implementing an aca
Hi,
AFAIK both flags have to be set to true to allow user to log into admin
interface.
Regards,
Valts
On Thu, Apr 24, 2008 at 3:15 PM, LaundroMat <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> When creating a new user, is_active is automatically set to True. The
> django docs say this means "Designates
Not shure yet but this could be a Windows only issue. I'll get back
later with some tests.
--~--~-~--~~~---~--~~
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@google
Hi,
I'm also trying to update the .po for Romanian. I was runing make-
messages.py -l ro to update the .po and got the same error as
chatchai.
I presume this is a bug in bookmarklets.html, right?
Thanks
Mihai
--~--~-~--~~~---~--~~
You received this message becau
Sorry for the delay on clarification. The design can be done (on
paper, no code) ahead of time. Designers are considered a member of
the team so they're part of the 2 person limit. And the 2 person limit
is there to even the playing field. If more people think that limit
is too small, I'd conside
On 21 Apr 2008, at 10:14 pm, Jon Lesser wrote:
> It seems that if there are no entries for a particular month, the
> archive link to that month results in a 404.
> http://www.djangoproject.com/weblog/2008/apr/ <--Works
> http://www.djangoproject.com/weblog/2008/mar/ <--404
>
> I tried to open a
I have moved along some more. Now Using this snippet (
http://www.djangosnippets.org/snippets/148/ )
z = FOO.objects.get(id=pram_id)
y = z.BAR.filter(off = False)
#.
form_dict = {}
for x in y:
form_dict[x.id] = forms.BooleanField(required= False)
#
form = DynForm()
form.setFields
Hi ALL!
If I use ModelForm + FormPreview + form.save() call in done() it never
update objects if PK is AutoField, but always create them, why it can
be so? FormPreview doesn't store PK value enywhere (ex.: to use in
form.instance.pk to determine that it is an update not create) ?
I redefine some
That worked. Thanks!
Darryl Ross wrote:
> I believe you need to go to the 'settings' page and enter a name and
> email address first.
>
> Cheers
> -D
>
> Tyler Erickson wrote:
> > What do I need to do to edit the following page?
> > http://code.djangoproject.com/wiki/GeoDjango
> >
> > It lets me
Hi,
When creating a new user, is_active is automatically set to True. The
django docs say this means "Designates whether this account can be
used to log in. Set this flag to False instead of deleting accounts."
On the admin pages of a django website however, next to the "Active"
flag, the descri
strange, when I use preview and change any field it create new object,
not update him. I just call form.save() in done() method, and I change
post_post() a bit to pass form instance, not just cleaned_data to the
done method :/ Is there something wrong with form instance that it is
not passed to do
Hey Graham
thanks for the insight
Stephane
On Apr 24, 2:22 am, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Apr 24, 12:57 am, Rufman <[EMAIL PROTECTED]> wrote:
>
> > Hey
>
> > I was wondering: Is Django faster and stabler using mod_python or
> > fcgi?
>
> > I read that mod_python can be a m
Thanks a lot, Malcolm!
On Apr 24, 2:25 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Thu, 2008-04-24 at 04:21 -0700, sector119 wrote:
> > ok I've added instance=object!
>
> > is it ok, that when I change PK value and call form.save() it create
> > new item, and not just update PK value o
On Thu, 2008-04-24 at 04:21 -0700, sector119 wrote:
> ok I've added instance=object!
>
> is it ok, that when I change PK value and call form.save() it create
> new item, and not just update PK value on already existen item if PK
> is _not_ AutoField?
The primary key identifies which row in the
ok I've added instance=object!
is it ok, that when I change PK value and call form.save() it create
new item, and not just update PK value on already existen item if PK
is _not_ AutoField? if it is ok, then how to change value of PK field
if it is not AutoField? :)
if request.method == 'POS
On Thu, 2008-04-24 at 03:31 -0700, dimrub wrote:
> I don't think having a function with such a profound side effect (such
> as making clean_data available) is a good idea. Very counter-
> intuitive, IMHO.
It's just a name. Changing it now would impact a lot of existing code
(and, as I explain be
OK I made some progress on this already.
class MyForm(forms.Form):
def __init__(self, user, data=None):
forms.Form.__init__(self, data)
self.fields['my_options'] =
ModelChoiceField(queryset=SomeModel.objects.get_users_objects(user))
Seems to do what I want.
Is this the most
On Thu, 2008-04-24 at 03:03 -0700, sector119 wrote:
> Why this code allways create new objects and never update them!? How
> to update objetcs, not create them using form.save()
>
> Model PK is AutoField. When it not autoincrement field everything
> works fine!
At no point in your code are you
I don't think having a function with such a profound side effect (such
as making clean_data available) is a good idea. Very counter-
intuitive, IMHO. Why not split it into two:
- validate() - that performs the validation and makes clean_data
available
- is_valid() - that calls the above validate(
Hi there
I want to provide a multi-choice field which filters its results
according to some external criteria, e.g. the object belongs to a
user.
I tried something like this:
class MyForm(forms.Form):
def __init__(self, user):
self._user = user
my_options =
ModelChoiceField(queryset=So
Why this code allways create new objects and never update them!? How
to update objetcs, not create them using form.save()
Model PK is AutoField. When it not autoincrement field everything
works fine!
class ModelFormClass(ModelForm):
class Meta:
model = MyModel
if req
Hi,
I'm really sorry for the flood with my blog posts on django community
aggregator. I just switch (eventually!) to a django powered blog and
totally missed to add an item_pubdate() function to my feeds (silly
me). That's fixed now and I hope it'll be updated soon on the planet.
I do apol
I post about photo management application for Django.
You can put your comment here.
http://meledictas.bashell.com/blog/2008/apr/24/reviewing-django-photo-album/
Regards
Chatchai
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
bcurtu napisał(a):
> May you enumerate the largest django sites (apart from WSJ)? Do you
> know traffic stats of these sites? I'm building a big site, with
> potentially lots of traffic and I'm a bit afraid what I can expect...
Grono.net (http://grono.net/) is largest Polish community site and i
Rodrigo Culagovski napisał(a):
> I am implementing an academic publications database, and am looking
> for a search solution.
> I need at the very least Stemming and Accented Characters support
> (i.e.: searching for "alvarez" returns "álvarez" and v.v.).
> Some of the fields have a tinymce edito
Yeah! I found the solution. Instead of:
'XXX.cms.middleware.session.ThreadLocals',
I need to do:
'cms.middleware.session.ThreadLocals',
So, specify the middleware class without the project name.
The strange thing is that the middleware itself works when the project
is specified, however t
On 24-Apr-08, at 12:48 PM, Kevin L wrote:
> Thanks everyone for the responses, I'm very impressed by the quick
> response of the community here ;-)
if you want extra-fast responses come to #django on freenode
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/code/
--~
Matias Surdi escribió:
> Hi.
>
> Which is the correct way to zero-pad an integer in templates? is there
> any filter?
>
> Thanks a lot.
>
>
> >
>
Found it: variable|stringformat:"04i"
--~--~-~--~~~---~--~~
You received this message because you are subscri
Hi,
On Thu, 2008-04-24 at 09:13 +0200, Matias Surdi wrote:
> Hi.
>
> Which is the correct way to zero-pad an integer in templates? is there
> any filter?
>
Yes:
http://www.djangoproject.com/documentation/templates/#stringformat
--
http://spinlock.ch/blog/
--~--~-~--~~-
Thanks! This extra nested query is working, although intuitively it
seems inefficient when combined with a limit. (I'm not an sql expert
though, and in my app it is doing ok for now.)
Thanks everyone for the responses, I'm very impressed by the quick
response of the community here ;-)
On Apr 23,
Hi.
Which is the correct way to zero-pad an integer in templates? is there
any filter?
Thanks a lot.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djan
88 matches
Mail list logo