Thank you for your help.
I have managed to get the inlineforms to reproduce on my page, however
when I submit the form the extra inlines are ignored. I have printed
the formset when it hits the view and the new lines that I have added
have no values in them, the values that I enter in are not bei
Hi Wendy,
On 20 aug, 20:29, zignorp wrote:
> MEDIA_ROOT = '/Users/...media/'
>
> MEDIA_URL = '/Users/...media/'
> (I had to change this to get it to write the path below, before it was
> looking for tinymce in my project directory)
>
> ADMIN_MEDIA_PREFIX = '/media/'
Your MEDIA_URL looks strang
Thank you for being patient in helping me out.
I checked it /etc/passwd and found this line which I think is the
reference for UID 70
_www:*:70:70:World Wide Web Server:/Library/WebServer:/usr/bin/false
I did "su - _www" (I hope I did this right). It still asked for a
password which I entered m
Nevermind. This one was a trivial one: missing a %
Generally speaking, I think that it would help a lot to get an example
with a block inside a block...
Rom
On Aug 21, 12:07 am, Daniel Roseman wrote:
> On Aug 21, 12:26 am, Rom wrote:
>
>
>
>
>
> > Hi,
>
> > I'm building a website using app en
On Fri, Aug 21, 2009 at 15:18, Daivd wrote:
>
> Hi,all~How can return a nested object from backstage to my flex
> project? For example,
> I have defined an "author" model, and then a "book" model. author is
> the reference key of book.
> after query, I want to return the object of "book" to my fle
2009/8/22 ashish tiwari :
> hi Friends
>
> i heared about the json format
> django provided utility of dumpdata, loaddata which dumps and loads data in
> json format.
>
> but i dont know,how to use it..
>
> i want to dumpdata...from my app
>
> name of iFriends
> name of People
>
> iFrien
On Fri, Aug 21, 2009 at 21:09, Joshua Russo wrote:
> Why does this not work?
> >>> import decimal
> >>> tst = {'myTst': (decimal.Decimal, 0)}
> >>> for k, v in tst:
> ... print('%s: %s' % (k, v))
> ...
> Traceback (most recent call last):
> File "", line 1, in
> ValueError: too
I think this is what you're looking for then...
in your httpd.conf or httpd-vhosts.conf or wherever you set up django
in apache:
SetHandler None
On Aug 21, 3:12 pm, Bins wrote:
> mod_python.
>
> On Aug 21, 6:37 pm, Heather wrote:
>
>
>
> > So are you using mod_wsgi or mod_python?
>
> > O
On Fri, Aug 21, 2009 at 16:35, Alessandro
Ronchi wrote:
>
> 2009/8/21 Alessandro Ronchi :
>>
>> one thing like that :
>> from PROJECT_ROOT.local_settings import *
>>
>> Thanks in advance
>
> I correct myself:
>
> I need PROJECT_NAME to import, not the project root.
>
> I can then import it with
>
I want to expand on the ImageField functionality of django. Mainly, I
want to check the dimensions of the image the user is uploading, and
resize / crop where appropriate. I would also like to set compression
amount, and perhaps even allow for watermarking. I know there are
several libraries out t
Thx very much!
I have fixed this problem^_^
On 8月22日, 上午6时07分, Jan Hülsbergen wrote:
> On Fri, Aug 21, 2009 at 15:18, Daivd wrote:
>
> > Hi,all~How can return a nested object from backstage to my flex
> > project? For example,
> > I have defined an "author" model, and then a "book" model. author
Gotcha, Thanks guys
On Fri, Aug 21, 2009 at 8:28 PM, Randy Barlow wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Joshua Russo declared:
> > Why does this not work?
> > >>> import decimal
> > >>> tst = {'myTst': (decimal.Decimal, 0)}
> > >>> for k, v in tst:
> > ... print(
Hello, i'm having some problems getting the admin templates up and
running. If i have my admin templates at '/home/mysite/media/admin/'
what should my ADMIN_MEDIA_PREFIX be? and is that all i need to
specify where the templates are?
Also do i need to set up a directive along the lines of:
Orde
Hi, i have certain models like Article, Message and Comment. I want to
be able to track changes to instances of these models. Specifically, I
would like to store the date of creation and date of last
modification. I can do this within each model separately, but that is
just depressing. How should
let's see those options!!!
On Fri, Aug 21, 2009 at 8:26 AM, Sid wrote:
>
> look at justin.tv as well. I think you can embed your live feed, onto
> a webpage.
>
> -Sid
>
>
> >
>
--
Lic. José M. Rodriguez Bacallao
Centro de Biofisica Medica
--
On Fri, Aug 21, 2009 at 2:09 PM, Joshua Russo wrote:
> Why does this not work?
> >>> import decimal
> >>> tst = {'myTst': (decimal.Decimal, 0)}
> >>> for k, v in tst:
> ... print('%s: %s' % (k, v))
use:
for k,v in tst.items():
... print('%s: %s' % (k, v))
--
Javier
--~--~
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Joshua Russo declared:
> Why does this not work?
> >>> import decimal
> >>> tst = {'myTst': (decimal.Decimal, 0)}
> >>> for k, v in tst:
> ... print('%s: %s' % (k, v))
> ...
> Traceback (most recent call last):
> File "", line 1, in
Hi,
I just delved into the comments framework (Django 1.1) and have a
question about the email address field. According to
djang.contrib.comments.model the user_email field is not required
since blank=True. I don't see anything in admin.py or forms.py that
alters this, yet my comment form produc
Hi,
I have a model with an imageField that is working fine when using the
admin interface.
But I'm trying to make a script that load a bunch of image from a flat
file.
I can't make it works, the entry get created with a "valid" link to
the image as configured with the "upload_to" parameters,. Bu
The unpacking doesn't work because it needs a tuple to perform the
unpacking process.
Example:
a, b = ('1','2')
print a, b
this returns:
1 2
For your example you would need to use the items method of a
dictionary which returns a list
with tuple representations of each key, value in the diction
That explanation was perfect. I did run id(setting[0]) multiple times
and it gave me a different instance id every time.
Thanks for the help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To p
Alessandro,
In settings.py:
import os.path
PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
PROJECT_NAME = os.path.basename(PROJECT_ROOT)
Then, in modules where you need it:
from django.conf import settings
PROJECT_NAME = settings.PROJECT_NAME
Bill
On Fri, Aug 21, 2009 at 2:31 PM,
Why does this not work?
>>> import decimal
>>> tst = {'myTst': (decimal.Decimal, 0)}
>>> for k, v in tst:
... print('%s: %s' % (k, v))
...
Traceback (most recent call last):
File "", line 1, in
ValueError: too many values to unpack
>>>
I'm assuming the problem is with the tup
On Aug 21, 2009, at 11:39 AM, ashish tiwari wrote:
> hi Friends
>
> i heared about the json format
> django provided utility of dumpdata, loaddata which dumps and loads
> data in json format.
>
> but i dont know,how to use it..
>
> i want to dumpdata...from my app
>
> name of iFriends
> n
On Aug 21, 2009, at 12:50 PM, Ray wrote:
>
> Hi,
> I'm trying to do this:
>
> send_mail(subject='hey, Ray',
>message='Hey ray, this is an automated message, \n heres a
> link: yahoo.com or yahoo.com',
>from_email='bl...@gmail.co',
>recipient_list=['blan...@gma
mod_python.
On Aug 21, 6:37 pm, Heather wrote:
> So are you using mod_wsgi or mod_python?
>
> On Aug 21, 9:24 am, Bins wrote:
>
>
>
> > Thanks Matthias, Carlos & Heather for your help.
>
> > I tried direct_to_template in url.py in django as suggested by Carlos,
> > but didn't work.
>
> > What M
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Simon Lee declared:
> Hi Thomas,
>
> Ok, I put in the "assert False, os.getuid()". The error log logged the
> following:
>
> [Fri Aug 21 23:37:48 2009] [error] [client 127.0.0.1] assert
> False, os.getuid()
> [Fri Aug 21 23:37:48 2009] [error] [
Is there any way to get the project name that's running in the code?
Now I use a manual setting: PROJECT_NAME = "ambiente"
but it should be useful to avoid that, because I'm working on an
external app and every new unuseful configuration simplify my life a
lot.
--
Alessandro Ronchi
SOASI
Svilu
Yes, I have been learning and using jquery a lot lately. I find it
really makes traversing around in the dom easy. Also, I have found
some excellent plugins such as the cluetip pluging and datepicker
plugins. All good stuff!
Margie
On Aug 20, 3:16 pm, Matthias Kestenholz
wrote:
> On Thu, Aug
Thanks for that example, Steve. I think I have made it past my
problem, but it is always good to see what others are doing. In your
example you have this:
target.innerHTML = (eval(data));
Why do you use eval there? Isn't data just a string, something like
'2009-08-21 11:41'?
Margie
On Aug 2
Hi,
I'm trying to do this:
send_mail(subject='hey, Ray',
message='Hey ray, this is an automated message, \n heres a
link: yahoo.com or yahoo.com',
from_email='bl...@gmail.co',
recipient_list=['blan...@gmail.com'],
fail_silently=False
)
Ah, that sounds perfect -- thank you!
On Aug 21, 10:56 am, Warren wrote:
> On Aug 20, 6:15 am, Thomas Guettler wrote:
>
>
>
> > You could have a look at sys.argv
>
> That's what I do. It works great, though YMMV.
>
> Example:
>
> import sys
>
> DEVSERVER = "runserver" in sys.argv
>
> ...
>
>
It would also presumably have to either re-set or clear the HTTP_HOST
header if the redirect is to a different domain?
On Aug 20, 9:02 pm, Russell Keith-Magee
wrote:
> On Fri, Aug 21, 2009 at 2:23 AM, ringemup wrote:
>
> > I'm writing an application that servers multiple domains with
> > middl
On Aug 21, 3:15 pm, justin jools wrote:
> I'm trying to pass id/key from one list then filter the next.
> If I try:
>
> def show_make(request, key):
> return object_list(request, Product_Model.all(), key)
>
> I get:
>
> invalid literal for float():
> agphZXAtc2FtcGxlchgLEhJteWFwcF9wcm9kdWN0X2
Hi Thomas,
Ok, I put in the "assert False, os.getuid()". The error log logged the
following:
[Fri Aug 21 23:37:48 2009] [error] [client 127.0.0.1] assert
False, os.getuid()
[Fri Aug 21 23:37:48 2009] [error] [client 127.0.0.1] AssertionError:
70
Then, I go the shell and entered "su - 70". I
On Aug 21, 2:49 pm, Glenbot wrote:
> I ran into something weird in Django and i'm completely stumped. I got
> it to work but i'm trying to understand the logic behind it.
>
> I have the following data model:
>
> from django.db import models
>
> class Setting(models.Model):
> name = models.Ch
On Aug 20, 6:15 am, Thomas Guettler wrote:
>
> You could have a look at sys.argv
>
That's what I do. It works great, though YMMV.
Example:
import sys
DEVSERVER = "runserver" in sys.argv
...
if DEVSERVER:
...
else:
...
...
--~--~-~--~~~---~--~~
You r
Hello, me and the Python Users Group GUPy (most form venezuela) are
starting a English-Spanish translation of Django's Documentation, we
where wondering if it was OK!
It will be hosted on a wiki
http://proyectociencia.org/Wiki/index.php/Grupo_de_Usuarios_de_Python/Django
--~--~-~--~~
I need to write a setting in my settings.py that uses my model, but
it's not possible to load models inside settings.py
So I need to import a custom local_settings.py to be loaded by my app.
It should be simple:
from myapp.settings import *
but I want to remove "myapp" to that import, because I
hi Friends
i heared about the json format
django provided utility of dumpdata, loaddata which dumps and loads data in
json format.
but i dont know,how to use it..
i want to dumpdata...from my app
name of iFriends
name of People
iFriends>People>models.py
class Person.
class Item
On Fri, Aug 21, 2009 at 3:50 AM, TiNo wrote:
> On Fri, Aug 21, 2009 at 10:40, Léon Dignòn wrote:
>>
>> Hello,
>>
>> in my ModelForm I try to allow only images (for avatar) smaller than
>> 64*64 pixels. I've done this by overriding clean_avatar(). But how can
>> I check the dimensions? The instanc
On Aug 21, 2009, at 9:54 AM, MIL wrote:
> this works fine but I dont want to repeat it in all my views:
> def my_profile(request):
> gotta_go_through = request.user.get_profile
> ().gotta_go_through_this_url()
> if gotta_go_through and gotta_go_through != request.path:
>
2009/8/21 Alessandro Ronchi :
>
> one thing like that :
> from PROJECT_ROOT.local_settings import *
>
> Thanks in advance
I correct myself:
I need PROJECT_NAME to import, not the project root.
I can then import it with
exec "from " + settings.PROJECT_NAME +".local_cms_settings import *"
is th
On Fri, Aug 21, 2009 at 9:10 PM, Florian
Schweikert wrote:
> In summary:
> * On the server (etch) session flushes by request.user.is_authenticated()
> (e.g session.user switched to anonymous without any findable reason) after a
> while equal if session still marked active in database and cookie.
I'm trying to pass id/key from one list then filter the next.
If I try:
def show_make(request, key):
return object_list(request, Product_Model.all(), key)
I get:
invalid literal for float():
agphZXAtc2FtcGxlchgLEhJteWFwcF9wcm9kdWN0X21ha2UYAQw
N.B. the key is from google app but works the s
ok i'll try :)
On Aug 21, 2:55 pm, Russell Keith-Magee
wrote:
> On Fri, Aug 21, 2009 at 6:38 PM, dmishe wrote:
>
> > Ok, so i've testing my app, everything was ok, when suddenly postgres
> > started to throw errors (in log) like this:
>
> > INSERT INTO "auth_permission" ("name", "content_type_id
Tried to use sqlite, to test if it's a db problem, but django aren't able to
open a sqlite databasefile which has the right permissions. Trying postgres
next.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django us
Hi there. My first django Question here ;)
I am trying to make this work:
def _user_gotta_go_somewhere(request):
gotta_go_through = request.user.get_profile
().gotta_go_through_this_url()
if gotta_go_through and gotta_go_through != request.path:
return HttpRespons
hi there
I'm in dire need of a good idea. django drives me crazy with its
foreignkey-resolver.
class person(models.Model):
name ...
firstname
class participant(models.Model):
group ..
person(foreignkey(person))
funk ...
I want to show 'participant
well, i got something,
http://code.djangoproject.com/ticket/11761
On Aug 21, 5:02 pm, dmishe wrote:
> ok i'll try :)
>
> On Aug 21, 2:55 pm, Russell Keith-Magee
> wrote:
>
> > On Fri, Aug 21, 2009 at 6:38 PM, dmishe wrote:
>
> > > Ok, so i've testing my app, everything was ok, when suddenly pos
Thanks Matthias, Carlos & Heather for your help.
I tried direct_to_template in url.py in django as suggested by Carlos,
but didn't work.
What Matthias suggested, serving static files on the production
server, is little out of my abilities as I ain't no django or python
expert. My site was made b
Hi,all~How can return a nested object from backstage to my flex
project? For example,
I have defined an "author" model, and then a "book" model. author is
the reference key of book.
after query, I want to return the object of "book" to my flex project,
but it always wrong... why? Any idea?
I can s
2009/8/21 Gerard :
>
> Hi All,
>
> I'm working on an invoice system, currently deployed the single user version
> in house. Next one is gonna be a full blown multi user setup. Having
> fairly good knowledge of security, I was wondering what would be best
> practice in Django for data separation.
I ran into something weird in Django and i'm completely stumped. I got
it to work but i'm trying to understand the logic behind it.
I have the following data model:
from django.db import models
class Setting(models.Model):
name = models.CharField(max_length=200)
value = models.TextFiel
I tried it on my notebook with the django server, the cookie wasn't touched,
but request.session.session_key changes every request.
Using the db session backend avoid login, cached_db and cache works
temporally.
In summary:
* On the server (etch) session flushes by request.user.is_authenticated()
So are you using mod_wsgi or mod_python?
On Aug 21, 9:24 am, Bins wrote:
> Thanks Matthias, Carlos & Heather for your help.
>
> I tried direct_to_template in url.py in django as suggested by Carlos,
> but didn't work.
>
> What Matthias suggested, serving static files on the production
> server,
On Fri, Aug 21, 2009 at 4:22 AM, luca72 wrote:
>
> I have solved using :
> Model.object.filter(id=2)values('columnname')
>
Note that it should have a dot:
Model.object.filter(id=2).values('columnname')
and that returns the item you want in a list. The proper way to do that is:
Model.object.ge
On Fri, Aug 21, 2009 at 6:38 PM, dmishe wrote:
>
> Ok, so i've testing my app, everything was ok, when suddenly postgres
> started to throw errors (in log) like this:
>
> INSERT INTO "auth_permission" ("name", "content_type_id", "codename")
> VALUES (E'Can add item_
> deferred_added_by_id_date_add
look at justin.tv as well. I think you can embed your live feed, onto
a webpage.
-Sid
--~--~-~--~~~---~--~~
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@googlegr
Hi All,
I'm working on an invoice system, currently deployed the single user version
in house. Next one is gonna be a full blown multi user setup. Having
fairly good knowledge of security, I was wondering what would be best
practice in Django for data separation. So user A only sees his cust
Dear All,
I have an urgent task about fetching data from DB(MySQL) to the web
using django, the MySQL is 4.0 and charset in Latin-1, and there's
some non-english data inside the DB.
There has two problems when implementing that using Django, first,
when I start the app, it told me "server is too
Ok, so i've testing my app, everything was ok, when suddenly postgres
started to throw errors (in log) like this:
INSERT INTO "auth_permission" ("name", "content_type_id", "codename")
VALUES (E'Can add item_
deferred_added_by_id_date_added_date_updated_item_type_prefix_raw_title_search_data_slug_
I wrote a tiny page which just shows the session_key.
I can refresh this site and the key is the same, but if I open one of the
other pages the request.user.is_authenticated() method opens a new session.
:(
Nevertheless thanks for your ideas.
greets,
florian
--~--~-~--~~~
Hello First of all let me show you my model:
class ChannelStatus(models.Model):
channel = models.ForeignKey(Channel,unique_for_date="date")
date = models.DateField()
platform = models.ManyToManyField(Platform)
Right now, when I want to make an ChannelStatus entry, there
2009/8/21 Russell Keith-Magee
>
> On Fri, Aug 21, 2009 at 12:17 AM, Kelvan
> wrote:
> >
> > I've a big problem with user authentification, my application get an
> > username and a hashkey to verify if the user is logged in. I wrote a
> > function that check this, it worked fine to log in the user
On Fri, Aug 21, 2009 at 10:40, Léon Dignòn wrote:
>
> Hello,
>
> in my ModelForm I try to allow only images (for avatar) smaller than
> 64*64 pixels. I've done this by overriding clean_avatar(). But how can
> I check the dimensions? The instance is an InMemoryUploadedFile which
> has no width or
I have written and tested this short piece of code:
---
from django.db.models import *
from django.utils.translation import ugettext as _
def verbose_names(model):
cvname = _(model._meta.verbose_name)# class verbose name
for
Hello,
in my ModelForm I try to allow only images (for avatar) smaller than
64*64 pixels. I've done this by overriding clean_avatar(). But how can
I check the dimensions? The instance is an InMemoryUploadedFile which
has no width or height. Any help regarding this?
class UserProfileForm(ModelFor
I have solved using :
Model.object.filter(id=2)values('columnname')
Thanks
Luca
On 21 Ago, 10:14, luca72 wrote:
> Thanks for your reply but i get this error:
> Model object has no attribute 'values'
>
> Thanks
>
> On 21 Ago, 09:42, Kenneth Gonsalves wrote:
>
> > On Friday 21 Aug 2009 1:00:32
Thanks for your reply but i get this error:
Model object has no attribute 'values'
Thanks
On 21 Ago, 09:42, Kenneth Gonsalves wrote:
> On Friday 21 Aug 2009 1:00:32 pm luca72 wrote:
>
> > how i can write this with the djago db api:
> > SELECT "column name" from "table_name" where "id"=2
>
> Mod
On Friday 21 Aug 2009 1:00:32 pm luca72 wrote:
> how i can write this with the djago db api:
> SELECT "column name" from "table_name" where "id"=2
Model.objects.get(id=2).values('columnname',)
--
regards
kg
http://lawgon.livejournal.com
--~--~-~--~~~---~--~~
You
how i can write this with the djago db api:
SELECT "column name" from "table_name" where "id"=2
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django
Is it possible to use a different form in the Admin depending on
whether a model instance is being created or edited?
For example I have a form that is used to add a member (django user +
profile), the form has a password and confirm password field. This is
fine for creating the member but when t
On Aug 21, 12:26 am, Rom wrote:
> Hi,
>
> I'm building a website using app engine.
>
> I would like to use multiple inheritance but I'm not allow to put
> block inside a block.
> Here is piece of code which should describe the problem well:
>
> let's assume a .html file called meta_base.html:
>
>
74 matches
Mail list logo