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:
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
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
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
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
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
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
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
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
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:
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
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
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 =
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
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
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
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
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
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
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
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
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
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
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
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.
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,
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.
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] =
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
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
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
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
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
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
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'
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
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
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".
--
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
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
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
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
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
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
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()
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
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
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
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
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
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 ==
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
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
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
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 =
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
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
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
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
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
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
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
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
Hello!
I indicate of your attention a building site in Pazardjik town
Bulgaria with solicitation to admit it in your offers for sale. The
building site is with area 12. 681 dka, is located at the entrance to
Pazardjik in bild frontiers in the city and there is a face-106
reciprocal ohms.
On 24-Apr-08, at 11:47 AM, Kevin L wrote:
> Hello Django users, I'm having trouble with an exclude statement and
> was hoping some kind soul could help me out. My models are simple,
> it's basically just two models with a ForeignKey relationship.
>
> class Parent(models.Model):
> pass
> class
[EMAIL PROTECTED] wrote on 04/23/08 13:40:
> Hello All,
>
> I've been working on a quality control portal that uses some features
> of django. The application is now completely running but the upload of
> large data files is quit slow. I've been looking around how to speed
> things up and the
On Wed, 2008-04-23 at 23:23 -0700, [EMAIL PROTECTED] wrote:
> If you are getting the correct resultset, just with parents multiple
> times, add .distinct() to your queryset.
It sounded more like the case of a parent having children called Anna
and Bob. The parent was still being selected, since
On Wed, 2008-04-23 at 23:17 -0700, Kevin L wrote:
[...]
> I want to get every parent who does not have a child named "Bob". I
> initially thought this would just be one exclude statement -
>
> Parent.objects.exclude(child__name="Bob")[:100]
>
> However, this gives me a list that includes many
If you are getting the correct resultset, just with parents multiple
times, add .distinct() to your queryset.
On Apr 24, 1:17 am, Kevin L <[EMAIL PROTECTED]> wrote:
> Hello Django users, I'm having trouble with an exclude statement and
> was hoping some kind soul could help me out. My models are
Hello Django users, I'm having trouble with an exclude statement and
was hoping some kind soul could help me out. My models are simple,
it's basically just two models with a ForeignKey relationship.
class Parent(models.Model):
pass
class Child(models.Model):
name =
88 matches
Mail list logo