Thank in advance for the advices.
On Mon, Oct 12, 2009 at 8:55 AM, Russell Keith-Magee wrote:
>
> On Mon, Oct 12, 2009 at 1:44 PM, Kenneth Gonsalves
> wrote:
> >
> > On Monday 12 Oct 2009 11:05:38 am Denis Bahati wrote:
> >> class Poll(models.Model):
> >> question = models.CharField(max_len
On Monday 12 Oct 2009 11:25:27 am Russell Keith-Magee wrote:
> On Mon, Oct 12, 2009 at 1:44 PM, Kenneth Gonsalves
>
> wrote:
> > On Monday 12 Oct 2009 11:05:38 am Denis Bahati wrote:
> >> class Poll(models.Model):
> >> question = models.CharField(max_length=200)
> >> pub_date = models.Dat
Got the following while testing latest trunk and haven't touched
this file (runtests.py).
t...@rubbish:~/code/django/trunk/tests$ python runtests.py
--settings=settings
==
ERROR: runTest (__main__.InvalidModelTestCase)
On Fri, 2009-10-09 at 12:21 -0700, davisd wrote:
> Sorry for the public disclosure... I did email django security after
> I posted. I'm just getting into this open source goodness and I'm not
> really sure how it's supposed to operate yet.
>
> I did consult the documentation:
> http://docs.dja
On Oct 12, 1:32 am, sleepyjames wrote:
> you need to set FORCE_SCRIPT_NAME in your settings.
>
> http://docs.djangoproject.com/en/dev/ref/settings/#force-script-name
Missed that - thanks!
Almad
--~--~-~--~~~---~--~~
You received this message because you are subs
I did change my encoding to utf-8. As its showing character very well
in flatpages. I would like extend this flatpage view code. so I have
lookup from database which render foreign string which not displaying
as it should be.
Thanks,
On 11 Oct, 11:59, Joshua Russo wrote:
> You may want to check
Tim Chase wrote:
> Is there something obvious I missed?
Hi Tim,
I do wonder if you might get more help with these problems on the Django
developers list?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--~--~-
Very simple:
1.Once you are in login page you need to store url to which you need
to go.
How should you do that?
protected view
===
def protected_view(request) :
if user is not authenticated :
url = request.getpath() # method which actually
It is quite common to have templates with lists traversing reverse
foreignkey relationships or m2m relationships, which generate a lot of
queries, for example:
{% for building in buildinglist %}
Building: {{ building }}
Appartments:
{% for appart
On Mon, Oct 12, 2009 at 4:14 PM, Tim Chase
wrote:
>
> Got the following while testing latest trunk and haven't touched
> this file (runtests.py).
>
> t...@rubbish:~/code/django/trunk/tests$ python runtests.py
> --settings=settings
>
I've been working on a reusable app to easily serialize my Django
models into JSON data that can be used in Dojo data stores.
The result is a set of classes that allow you to define a Store nearly
the same as you define a Model or a Form. It also includes a JSON-RPC
v1.1 service method dispatche
Are there any django apps suitable for a events photographer who wants
to sell their photos online?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-u
I'm new in django and i try to do what tutorial says about activating
the admin site but i take the following error:
IndentationError at /admin/
('unexpected indent', ('/home/sotathan/mysite/../mysite/urls.py', 4,
1, ' from django.contrib import admin\n'))
Request Method: GET
Request URL:http
On Oct 12, 11:28 am, A_Swtos wrote:
> I'm new in django and i try to do what tutorial says about activating
> the admin site but i take the following error:
>
> IndentationError at /admin/
> ('unexpected indent', ('/home/sotathan/mysite/../mysite/urls.py', 4,
> 1, ' from django.contrib import adm
Thank you DR for your useful help :)
On Oct 12, 2:40 pm, Daniel Roseman wrote:
> On Oct 12, 11:28 am, A_Swtos wrote:
>
>
>
>
>
> > I'm new in django and i try to do what tutorial says about activating
> > the admin site but i take the following error:
>
> > IndentationError at /admin/
> > ('une
On Oct 12, 10:33 am, phoebebright wrote:
> Are there any django apps suitable for a events photographer who wants
> to sell their photos online?
I believe Satchmo has the facility to sell downloads as well as
physical products.
--
DR.
--~--~-~--~~~---~--~~
You rec
On Mon, Oct 12, 2009 at 2:19 AM, Denis Bahati wrote:
> if i change the code like the one shown below it gives me the traceback
> about indents, i also included below.
> from django.db import models
> import datetime
> class Poll(models.Model):
> question = models.CharField(max_length=200)
>
Daniel,
Was hoping more for a good photo app that had a checkout rather than a
shop that could sell photos.
They will take 100s of photos at each event, so handling the photos -
tagging, viewing etc. is important.
Phoebe.
On 12 Oct 2009, at 12:52, Daniel Roseman wrote:
>
> On Oct 12, 10:33
If you're running standalone WSGI you could pipe output to Apache's
rotatelogs or to cronolog. There may be other generic log rotation
subprocesses you can use. They're very reliable.
For a straight WSGI server I wrote a logging handler to synchronize
logging between threads & processes, wh
I second Graeme's suggestion. It should make your life easier
regarding translations.
On Oct 11, 1:54 pm, Graeme Glass wrote:
> On Oct 11, 12:24 am, Caisys wrote:
>
> > Hi,
> > I would like visitors to my site homepagewww.example.comtobe
> > redirected towww.example.com/en/inorder to allow for
On Sat, Oct 10, 2009 at 6:43 PM, Rizwan wrote:
>
> I am trying to extend flatpage view...I have added custom code
> here..you can see navigation showing question mark here
> http://beta.rmansuri.net/homepage/
>
>
> [snip]
>#custom code start
>db = MySQLdb.connect
> (user='rmansuri_gq',db=
I have a slug field(let's call A) which is prepopulated from another
charfield(let's call B) and unique. On the admin page, when I want to
edit B, at the same time A, A would not be changed. I try manually, it
doesn't let me to edit it.
How can I edit unique, prepopulated slug fields on admin pa
Hi,
I have a question regarding the admin interface of django.
My models
class Team(models.Model):
name = models.CharField(max_length=10)
class Player(models.Model):
lastname = models.CharField(max_length=60)
class Goal(models.Model):
game = models.ForeignKey(Game)
goal_scorer
> I just ran the full suite usine SQLite on r11603, and got 100% pass on
> 917 tests.
>
> I can't think of an obvious cause, but the fact that you're getting
> errors in runtests.py is mighty suspicious. The fact that you've got
> 50 less tests than you should is also suspicious.
>
> My first gu
I need a simple sitemap for 5 URLs. The django sitemaps app seams a
bit overkill for such a simple xml file.
What's the best way of doing this?
Can i simply upload a sitemaps.xml and point to it?
Or should i use the django.contrib.sitemaps?
Thanks,
--~--~-~--~~~---~--~
Seems odd to connect Player to Team via Goal and GameRoster (only for
hometeam, presumably you have away team as well) - what about players
that don't score, don't you want those details as well? Maybe you show
an edited version of your models.
Why not have
class Player(models.Model):
las
I've been looking all day yesterday to find a complete django open
source project that is non trivial. Using it as a base for my app
would greatly speed up my learning and give me a fast start. To give
you an example, for kohana framework in php you can find
http://www.argentuminvoice.com/ as a fu
2009/10/12 shreko :
>
> I've been looking all day yesterday to find a complete django open
> source project that is non trivial. Using it as a base for my app
> would greatly speed up my learning and give me a fast start. To give
> you an example, for kohana framework in php you can find
> http://
On Mon, Oct 12, 2009 at 11:50 AM, Daniel Hilton wrote:
>
> 2009/10/12 shreko :
>>
>> I've been looking all day yesterday to find a complete django open
>> source project that is non trivial. Using it as a base for my app
>> would greatly speed up my learning and give me a fast start. To give
>> y
Hi Peter,
I forgot to post some important relations in the models.
GameRoster is a table in a m2m relation between Player and Game. I
need some extra attributes on the relationship between player and game
(which position they played).
class GameRoster(models.Model):
player = models.ForeignKey
Might as well pile on with Satchmo: http://www.satchmoproject.com
-Chris
On Mon, Oct 12, 2009 at 10:52 AM, Ben Rousch wrote:
>
> On Mon, Oct 12, 2009 at 11:50 AM, Daniel Hilton
> wrote:
> >
> > 2009/10/12 shreko :
> >>
> >> I've been looking all day yesterday to find a complete django open
> >
It might not help your immediate problem but since players and teams
are the fundamental entities involved in team sports I'm sure you'll
need an easy way of linking them at some point.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
Hi everyone,
Is is possible to render unescaped HTML in admin pages?
(say) A model has a field "text" which contains HTML markup. Is this
something that can be changed on the model (ie __unicode__ method) or
do I have to change the admin templates?
Thanks
--~--~-~--~~~-
Ok, I found a way, but it's still not perfect.
class GoalForm(forms.ModelForm):
class Meta:
model = Goal
def __init__(self, *args, **kwargs):
super(GoalForm, self).__init__(*args, **kwargs)
self.fields['goal_scorer'].queryset =
Player.objects.filter(gameroster__g
On Oct 12, 11:15 am, "ruidevie...@googlemail.com"
wrote:
> Hi everyone,
>
> Is is possible to render unescaped HTML in admin pages?
>
Does this help? Start here:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display
and then search for allow_tags.
On Mon, Oct 12, 2009 at 12:15 PM, ruidevie...@googlemail.com <
ruidevie...@googlemail.com> wrote:
>
> Hi everyone,
>
> Is is possible to render unescaped HTML in admin pages?
>
> (say) A model has a field "text" which contains HTML markup. Is this
> something that can be changed on the model (ie _
Very good solution, works perfectly!
Thanks.
On Oct 12, 5:53 pm, Brian Neal wrote:
> On Oct 12, 11:15 am, "ruidevie...@googlemail.com"
> wrote:
> > Hi everyone,
>
> > Is is possible to render unescaped HTML in admin pages?
>
> Does this help? Start here:
>
> http://docs.djangoproject.com/en/de
> Is is possible to render unescaped HTML in admin pages?
>
> (say) A model has a field "text" which contains HTML markup. Is this
> something that can be changed on the model (ie __unicode__ method) or
> do I have to change the admin templates?
If you're only going to render html for lists it's
Thanks for the suggestions everyone.
I went for the "allow_tags = True" solution has it is (possibly?) the
simplest and it's enough for what I need.
Thanks again.
On Oct 12, 5:59 pm, Rui Vieira wrote:
> Very good solution, works perfectly!
>
> Thanks.
>
> On Oct 12, 5:53 pm, Brian Neal wrote:
On Sun, Oct 11, 2009 at 7:40 PM, Tim Chase
wrote:
>
> > On my oldest slowest machine (7 year old WinXP box with 384M of memory),
>
> Then you're not far off -- my home work-horse is an 8-year-old
> Celeron laptop clocked at 800MHz with 384M of memory running
> Debian off a fairly slow HDD.
My 8
Hi All,
I am completely lost. I *think* that I have read most of the doc that
i can find and I must be pretty dense, because I cannot figure this
one out ...
Let me outline what i have and where i want to go!
model:
# an X
class X(db.Model):
user = models.ForeignKey(User, unique=True)
nam
The easy way is to just check that the owner of X is the user logged
in.
I don't know that you can pass an argument to the decorator, but you
could certainly just use an if statement.
http://docs.djangoproject.com/en/dev/topics/auth/#limiting-access-to-logged-in-users-that-pass-a-test
On Oct 12,
Hi,
On a user login, the session key changes. This makes the data stored in the
session before user logging in, inaccessible.
But the session data before user login is required in so many cases, say for
instance, a shopping cart.
How to pass the session data of the anonymous user to the logged in
Hi,
I was wondering if there is a project based on Django for schools that
manages enrollment, grades, billing, etc.
JHM
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
Thank you all for your suggestions. I think I'll go with satchmo as it
comes closest to what I'm looking for. In my earlier search I found
satchmo, but I was under impression that it's not based on django 1.1.
Looks like current development release will be, which is great.
Thanks
On Oct 12, 10:1
You should carefully look at the code of django template loaders.
What do you mean? Dou you want template paths to be stored in the database
and dinamically change? Or do you want to use 3rd-party app but change
template dirs it is looking for?
2009/10/12 ringemup
>
> I need to find a way to pro
2009/10/12 Denis Bahati
> Hi there i have the problem with unicode function it doesn't give me any
> changes. the poll list is displayed as Poll object and does doesn't give me
> error if i write the models.py like this:from django.db import models
> import datetime
>
> class Poll(models.Model):
That works for retrieving information, but how can I save information too?
Thanks for your patience,
Eddie
-Original Message-
From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com]
On Behalf Of Brian McKeever
Sent: October-12-09 11:52 AM
To: Django users
Subject: Re:
You might as well use django.contrib.sitemaps.
It's not difficult to use that app so there's no more efficient way to
do this unless you happen to have the sitemaps.xml file already.
On Oct 12, 11:32 am, Timbadu wrote:
> I need a simple sitemap for 5 URLs. The django sitemaps app seams a
> bit
as for me, @login_required decorator redirects to
http://localhost/accounts/login/?next=/path/
if you use generic view to display login page it will automatically redirect
user to /path/ after login.
2009/10/12 Sergio A.
>
> I've three views each with different URL. They are visible to logged
>
It's the same thing.
Lets say this is your view:
def x_edit(request, x_id):
x = X.objects.get(id = x_id)
if x.user != request.user:
return HttpResponseRedirect('/you cant edit that/')
if request.method == 'POST':
form = XForm(request.POST)
if form.is_valid():
Ah, so there is no way to use 'create_object' when doing this, right?
Thank you,
Eddie
-Original Message-
From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com]
On Behalf Of Brian McKeever
Sent: October-12-09 12:50 PM
To: Django users
Subject: Re: showing user data i
You could write a wrapper around it if you wanted.
def x_edit(request, x_id):
x = X.objects.get(id = x_id)
if x.user != request.user:
return HttpResponseRedirect('/you cant edit that/')
return update_object(request, model = X, object_id = x_id,)
On Oct 12, 1:51 pm, "Ed Kawas
I'd like to let new users to do certain things, like submitting a
forum post as an anonymous user.
And then if the new user decides to sign up after submitting the post,
I'd like to convert the data submitted while the user was till
anonymous (like the forum post in this example) so that it now b
>>> ls.srs.name
'WGS 84'
>>> srs.units
(0.017453292519943282, 'degree')
>>>ls.length
0.88329271346608429
So how do I go from degrees to miles? According to the docs, Distance
does not handle 'degrees' as a unit. Should I somehow convert to
another srs before I calculate distance? Or is there a be
Well, I'm using a theming system -- each user can choose a theme to
use, and that choice is attached to their account. Not just the base
template but the inner templates for some parts of the site can vary
from theme to theme, so I want to run something to the following
effect:
def my_r2r(reque
Hi, i'm switching an installation over from mod_python to mod_wsgi and
all seems to have gone well except for one bit. I have a redirect page
that takes the new url as part of the url, but for some reason the
slashes are getting squashed. for example
/redirect/http://www.google.com
results in a
I have a DateTimeField called "created_on" on a model called
"Documents". It serves as a timestamp for when the record was added.
I'm trying to write a query that will return all Documents created_on
a particular date, say today. I can make it work if I look for a
record within a range of dates..
On Mon, Oct 12, 2009 at 5:07 PM, aa56280 wrote:
>
> I have a DateTimeField called "created_on" on a model called
> "Documents". It serves as a timestamp for when the record was added.
>
> I'm trying to write a query that will return all Documents created_on
> a particular date, say today. I can m
Try this:
from datetime import date
today = date.today()
todays_stuff = Stuff.objects.filter(created_on = today)
On Oct 12, 10:07 pm, aa56280 wrote:
> I have a DateTimeField called "created_on" on a model called
> "Documents". It serves as a timestamp for when the record was added.
>
> I'm
On Mon, Oct 12, 2009 at 6:00 PM, phoebebright wrote:
>
> Try this:
>
> from datetime import date
>
> today = date.today()
>
> todays_stuff = Stuff.objects.filter(created_on = today)
>
>
Looking at the SQL that generates for a model that contains a DateTimeField,
not a DateField, I don't believe th
Currently seeking to hire three programmers for a Boston area stealth
web startup:
(1) Python and Django Programmer: Must be comfortable enough to
customize Django. Responsibilities include building the framework
for a social network and interfacing with cloud applications.
(2) Amazon Web Se
Answered in:
http://groups.google.com/group/modwsgi/browse_frm/thread/46bbc449ca69a659
Graham
On Oct 13, 6:26 am, JSL wrote:
> Hi, i'm switching an installation over from mod_python to mod_wsgi and
> all seems to have gone well except for one bit. I have a redirect page
> that takes the new
Karen,
I'm aware that my 30-days-ago version of the query is current time/
date specific. Good catch :-)
Thanks for the solution. I also found this one:
today = datetime.datetime.today()
Document.objects.filter(created_on__month=today.month,
created_on__day=today.day, created_on__year=today.year
>> On my oldest slowest machine (7 year old WinXP box with 384M of memory),
>> Then you're not far off -- my home work-horse is an 8-year-old
>> Celeron laptop clocked at 800MHz with 384M of memory running
>> Debian off a fairly slow HDD.
>
> My 800MHz Celeron laptop got retired about a year ago
Thanks Adam.
I've had a look at the django.contrib.sitemaps process but all
examples I've found relate to dynamic sitemaps created for ever
changing blogs etc.
Most of the info gives an example of a file to create but not what to
call it or where to put it.
So, using my limited knowledge of djang
My first guess would be to just use the IP of the user in place of a
user instance when saving objects as anonymous. Once they signup, give
the user owneship of all objects with the user's IP.
On Oct 12, 4:55 pm, Continuation wrote:
> I'd like to let new users to do certain things, like submitti
On Mon, Oct 12, 2009 at 6:24 PM, Tim Chase
wrote:
>
> Last year, the wifey finally convinced me to let go of the even
> older machine (133MHz with 96 megs of memory and a 800x600 CRT :)
> running OpenBSD.
>
>
Yeah, you've got me beat. I do still have the IBM AT I had in college, with
its roomy 10
On Mon, Oct 12, 2009 at 11:18 PM, Tim Chase
wrote:
>
> I'm not sure why I
> still only get 866 tests (my patch adds one test, bringing it to
> 867) where you get 917, but at least the core passes now.
This isn't necessarily an issue to be concerned about - there are some
conditional tests in the
hi,
I had 4 legacy sites running on pre-MR django, written back in 2005. Since
feature requests were minimal once the apps were complete, there was no reason
to upgrade them. Recently however, after I started using virtualenv for my
trunk apps, I was having problem with admin log in on the old
Model:
class X(models.Model):
user = models.ForeignKey(User, blank=True, null=True)
x= other()
# I want to add current user when add X
Form:
class xForm(forms.ModelForm):
class Meta:
model = X
exclude = ('marker')
View:
def add_X(request):
print request.user
Hi!!!
I am having some trouble trying to output a database record to a
form
**My form:
class ClientesFIForm(forms.Form):
ClienteCodigo = forms.IntegerField(label='Codigo Cliente')
ClienteNombre = forms.CharField(label='Nombre Cliente')
ClienteFechaCreacion = forms.DateField(widge
The error chows /imageupload/ as directory, but it's the name of the
url which run upload view.
On Oct 11, 8:58 am, andreas schmid wrote:
> i had the same issue a few days ago and i solved it by simply adding
> write permission to all for the given directory, not for the whole
> /media/ or even
Hi Arthur.
I'm not so experience with linux.
I can get to the directories and files of apparmor, but how do I
stopped.
Thank you.
On Oct 11, 12:04 pm, Arthur Metasov wrote:
> If you use distribution with apparmor try to stop it (/etc/init.d/apparmor).
>
> If the problem disappears, find apparmor
Hm.. Using IP for this doesn't seem to be a good idea. What about
proxy users who will have proxy's IP or users of one subnetwork behind
the NAT?
I'd store some kind of id in user's cookies and then use it to detect
posts made by user anonymously
--~--~-~--~~~---~--~--
I am trying to figure out a pythonic way of passing data between the
forms of a formwizard.
I can do it with inital data but I need to access the data in the
clean method of the form.
The only ways I can get working are really messy and wont scale
easily.
Any suggestions out there?
--~--~---
here is my apache config file for wsgi,
import os, sys
apache_configuration= os.path.dirname(__file__)
project = os.path.dirname(apache_configuration)
sys.path.append('/var/www')
sys.path.append('/var/www/myproj/cms')
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproj.settings'
import django.core.hand
I have a django.po file containing:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE
package.
# FIRST AUTHOR , YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bu
78 matches
Mail list logo