On Sat, Jul 18, 2009 at 1:54 PM, Alex Gaynor wrote:
>
>
> You can provide verbose name, and verbose name plural to control that:
> http://docs.djangoproject.com/en/dev/ref/models/options/#verbose-name
>
> Alex
>
>
It works! Thanks a lot!
--
There are seven words in this sentence.
--~--~---
I tried to start the development server with the same ip address and
port number twice.
I supposed to see the second one fail with an error message like port
number already in use.
But I didn't see it and there is no error message.
Can someone tell me what's the reason behind this?
Thanks a lot.
Hello,
I have posted the message at the pinax users group without any luck
thought I will have better luck here. I would like to integrate pinax
with the apps listed below. End result will be open source and hosted
in github, here are the apps :
http://github.com/CrowdSense/django-subscription/t
On Sat, Jul 18, 2009 at 12:52 AM, Earl Lapus wrote:
> hi,
>
> I have a model named 'Services'. I added it to the admin page and an extra
> 's' was appended to the name (see attached file).
> I grep'd through my project directory and I'm pretty sure that there are no
> text that matches 'Servicess'
hi,
I have a model named 'Services'. I added it to the admin page and an extra
's' was appended to the name (see attached file).
I grep'd through my project directory and I'm pretty sure that there are no
text that matches 'Servicess'.
So, is django the one altering the model name? If so, is there
Answering myself.
I knew it was something pathetic and I found it:
This is what I was doing wrong
(r'^weblog/'$, include('coltrane.urls.entries')),
This is what I should have been doing right
(r'^weblog/', include('coltrane.urls.entries')),
The dollar sign cuts of anything that
"Beginning Python Visualization" was recently published to fit exactly
this need. (No disclaimer -- I have no association with the book other
than having purchased it.)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
This isn't ideal, but it should work (or prompt someone to propose
something better).
Add a one-to-one table for the user, with a field containing the
initial password (encrypted, of course, so it looks like the password
in the auth_user table).
When the user logs in, have the login page c
I think you still have to pass the user, but you can tell if the item
is modified or new by whether its id has a value. If it's brand new
and has never been saved, then it won't have one.
--~--~-~--~~~---~--~~
You received this message because you are subscribe
Look at south or evolution. I use south, personally. It does exactly
this very easily.
http://south.aeracode.org/wiki/Tutorial1
To add a column to the database with south, you add it to the model,
then:
./manage.py startmigration appname migration_name --add-field
model.field
So, if your
On Jul 17, 2009, at 8:08 AM, Rune Bromer wrote:
>
> Hello.
>
> For a small webshop I have the following models: Product, Category,
> Country and UserProfile. Each user have a country set with a FK, and
> should only be allowed to see content in the administration assigned
> to the same Country.
On Jul 16, 2009, at 11:11 PM, Rubens Altimari wrote:
>
> Hello,
>
> Is there a way to show model fields in admin, but prevent them from
> being edited? Using 'editable=False' in the model won't do, since then
> the field simply is not displayed.
>
> Also, on a related topic: is there a simple wa
Russell Keith-Magee wrote:
> > 1. In the Python code, how can I access various Meta properties of a
> > model (e.g. verbose_name, etc). At the moment, I do it via
> > model._meta.verbose_name, but I always get chills down my spine when I
> > access properties beginning with a single underscore. Is
And as a brief aside, I've found it helpful to have a
local_settings.py, which lives outside version control.
If you put your database stuff and DEBUG flag there, you never have to
fix it when you move to production.
--~--~-~--~~~---~--~~
You received this mes
Try using form.data.initial to get the text only.
--~--~-~--~~~---~--~~
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 grou
On Jul 16, 2009, at 5:16 AM, Viacheslav Chumushuk wrote:
>
> class Book(models.Model):
>author = models.ForeignKey(Author)
>title = models.CharField(max_length=100)
>
> All that I need is edit some book by primary key.
Just make a forms.ModelForm for your Book model. The class Meta will
It would also be worth pointing out Jacob's django-googlecharts
template tags. I've used them before and they work solidly, as long
as google charts are what you need.
http://github.com/jacobian/django-googlecharts/tree/master
-justin
On Thu, 16 Jul 2009, Keith Pettit wrote:
> What is the bes
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Joshua Russo escribió:
> I second that. In my experience they are inherently very context
> specific, with very unique databases and code bases. With that said, you
> can definitely develop an expert system using django. It's more about
> the algorith
On Fri, Jul 17, 2009 at 9:53 PM, Beetle B. wrote:
>
> Hi,
>
> 1. In the Python code, how can I access various Meta properties of a
> model (e.g. verbose_name, etc). At the moment, I do it via
> model._meta.verbose_name, but I always get chills down my spine when I
> access properties beginning wit
>
> Apart from django-evolution, also take a look at http://south.aeracode.org/
I second that -- I use South and it's really handy. I couldn't get
Evolution to work (maybe I didn't wait long enough ^_^), but South
does everything I need. The nice thing about it is that it's easily
reversib
On Fri, Jul 17, 2009 at 11:06 PM, Miriam wrote:
>
> There currently is no way in Django to pre-fetch one-to-many and/or
> many-to-many relationships, right?
Correct.
> There's select_related, which will pre-fetch FK or one-to-one, which
> is great, but not sufficient.
>
> Suppose I am fetching a
On Sat, Jul 18, 2009 at 6:21 AM, Andrew Fong wrote:
>
> I'm playing around with some low-level caching of model instances.
> During testing, it's necessary for me to flush out the cache so cached
> whatnot from one test doesn't pollute another.
>
> To my knowledge, Django's currently doesn't offer
On Sat, Jul 18, 2009 at 7:27 AM, Vasil
Vangelovski wrote:
>
> Looking at the code for the ModelAdmin class in
> django.contrib.admin.options I've come accross this:
> context_instance = template.RequestContext(request,
> current_app=self.admin_site.name)
> in a few places. What is this current_app
I second that. In my experience they are inherently very context specific,
with very unique databases and code bases. With that said, you
can definitely develop an expert system using django. It's more about
the algorithms you produce than the environment you produce them in.
On Fri, Jul 17, 2009
What kind of expert system do you want to know. I think expert system is a
very broad topic.
On Sat, Jul 18, 2009 at 10:05 AM, Carlos Eduardo Sotelo Pinto <
csot...@aqpglug.org.pe> wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi peolple
>
> some one knows somthing about works ab
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi peolple
some one knows somthing about works about expert system maden on python with
django
thanks a lot
- --
. ''`. Carlos Eduardo Sotelo Pinto ( KrLoS ) ,= ,-_-. =.
: :' : Free and OpenSource Software Developer((_/)o o(\_))
`. `'` GNULin
Looking at the code for the ModelAdmin class in
django.contrib.admin.options I've come accross this:
context_instance = template.RequestContext(request,
current_app=self.admin_site.name)
in a few places. What is this current_app argument?
When I try to init a RequestContext with the current_app ar
It's not clear to me how I can execute a statement on the newly
created connection when the sender is the wrapper class, not the
connection I want to initialize. I reopened
http://code.djangoproject.com/ticket/6064
since the final implementation doesn't seem to address the original
problem, but w
i am working on a project where i need to create a number of users
(standard django User objects who will login to the site using the
vanilla django auth framework) along with random passwords (rather
than allowing the users to sign up and supply their own passwords).
after the site launches, staf
I'm playing around with some low-level caching of model instances.
During testing, it's necessary for me to flush out the cache so cached
whatnot from one test doesn't pollute another.
To my knowledge, Django's currently doesn't offer support for
resetting the cache after each testcase in the sam
Try fetching the data via Django's shell. What do you get then?
Also, how did you configure MySQL to work with UTF-8? Did you modify
your my.cnf file so UTF-8 is the default? Or did you change your
database's settings manually? Or something else?
-- Andrew
On Jul 17, 5:33 pm, Larry wrote:
> Hi
Hi,
I have a database with messages stored and utf-8 encoded. The messages
look OK in the database, i.e, when I am in MySQL client the messages
with special characters (e.g., Korean) are correctly displayed.
However, in the web page, the special characters become
irrecognizable, like this
グーã
Yeah, I was confused mostly about the stuff with the colon because I
didn't pay much attention when reading about namespaced urls the new
docs.
Thanks
On Fri, Jul 17, 2009 at 10:49 PM, Michael wrote:
> On Fri, Jul 17, 2009 at 4:27 PM, Vasil Vangelovski
> wrote:
>>
>> Sorry, it was probably my m
don't forget Flot: http://code.google.com/p/flot/ why do it in the
server when you can use your user's machine?
--
Javier
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gro
On Jul 17, 3:06 pm, cornjuliox wrote:
> Hi everyone. I'm new to Django, learning things mostly through trial
> and error, but this time I can't seem to figure out what went wrong. I
> overrode the admin change_form.html for my model so that I could add a
> Javascript RTE that I found, but not onl
On Fri, Jul 17, 2009 at 4:27 PM, Vasil Vangelovski
wrote:
>
> Sorry, it was probably my missunderstanding of some details in the
> docs. I changed the initialization of my admin site so it doesn't have
> a name and what I was trying to do works now. But anyway, if my admin
> site was initialized l
On Fri, Jul 17, 2009 at 3:23 PM, Dudley Fox wrote:
>
> Should I have posted this to the developer's list? I ask because I
> have received no responses yet. Not even a "...you shouldn't do that."
> :)
I can help you with that - you shouldn't do that. Instead you should
create a new model for f
Sorry, it was probably my missunderstanding of some details in the
docs. I changed the initialization of my admin site so it doesn't have
a name and what I was trying to do works now. But anyway, if my admin
site was initialized like so site = MyAdminSite('admin') what code is
supposed to give me
Extend a Django Web site currently on PostgreSQL by adding GeoDjango
mapping features. The application tracks large whale rescues and is
based out of the U.S. National Marine Fisheries Service office in
Gloucester, Massachusetts.
You can email me for more information or contact the contracting
c
Yes it does work, I've tried this with a brand new project in the same
virtualenv. Reverese resolution of urls for the AdminSite in
django.contrib.admin does work with the latest trunk revision.
Here's simplest situation where I'm having a problem:
I have an app called admin in my project which c
Should I have posted this to the developer's list? I ask because I
have received no responses yet. Not even a "...you shouldn't do that."
:)
Sincerely,
Dudley
On Wed, Jul 15, 2009 at 11:38 AM, Dudley Fox wrote:
> I want to create a new type of field for django models that is
> basically a ListOf
Thanks for the replies!
Happily I have managed to avoid the issue. We will just make one
Django site per database. Using a web page to post all the different
sites, thus making it "look" like its accessing multiple dbs..
Cheap shot I know, but I'm very lazy.
Plus I figure by the time I really
2009/7/17 Michael :
> On Fri, Jul 17, 2009 at 1:30 PM, Lic. José M. Rodriguez Bacallao
> wrote:
>>
>> anyone?
>>
>>
>> On 7/17/09, Lic. José M. Rodriguez Bacallao wrote:
>> > hi folks, it's be a long time without writing to the list but now I'm
>> > back with a simple question, I need to know ho
has anyone had luck getting past this?
I am using a recent 1.1 beta release have checked the folder
permissions and set the FILE_UPLOAD_TEMP_DIR all 777
code is at http://pastebin.com/m4332fdb2
On Jun 24, 2:06 pm, alecs wrote:
> If to be honest I can't google this posts ... Most of the links a
On Fri, Jul 17, 2009 at 1:30 PM, Lic. José M. Rodriguez Bacallao <
jmr...@gmail.com> wrote:
>
> anyone?
>
>
> On 7/17/09, Lic. José M. Rodriguez Bacallao wrote:
> > hi folks, it's be a long time without writing to the list but now I'm
> > back with a simple question, I need to know how much can c
anyone?
On 7/17/09, Lic. José M. Rodriguez Bacallao wrote:
> hi folks, it's be a long time without writing to the list but now I'm
> back with a simple question, I need to know how much can cost to make
> a site like this: www.juegon.com
>
> --
> Lic. José M. Rodriguez Bacallao
> Centro de Bio
Hello
I have this form with username and other user information. Since user
needs to set his own username and it has to be unique, i was going to
add some button to the form that does some ajax magic and checks if
the username is already in use.
What i wanted to know is that if there is some way
Thanks for your help, Ian. Two awesome solutions; I'll try and check
'em out today if I get the chance.
Ben
On Jul 15, 1:26 pm, Ian Clelland wrote:
> On Jul 14, 8:23 am,BenjaminKreeger
> wrote:
>
> > I was using PostgreSQL at first, but then I found information about
> > reading data across da
On Fri, Jul 17, 2009 at 11:19 AM, Ronghui Yu wrote:
>
>
> Michael 写道:
>
> 2009/7/17 Ronghui Yu
>
>> Hi, All,
>>
>> I have a project that have CsrfMiddleware enable, all forms work fine, but
>> the login form doesn't, for all browsers(IE,Chrome,Firefox,Safari).
>> Most of the time, it throws 403,
Michael ??:
> 2009/7/17 Ronghui Yu mailto:stone...@gmail.com>>
>
> Hi, All,
>
> I have a project that have CsrfMiddleware enable, all forms work
> fine, but the login form doesn't, for all
> browsers(IE,Chrome,Firefox,Safari).
> Most of the time, it throws 403, which is thrown
There currently is no way in Django to pre-fetch one-to-many and/or
many-to-many relationships, right?
There's select_related, which will pre-fetch FK or one-to-one, which
is great, but not sufficient.
Suppose I am fetching a list of Blog posts and I want to pre-fetch the
Comments for each of th
how can i access ForeignKey model attribute value in save() or
__unicode__ method?
some hint will help.
here is my model.py:
class PhotoSetPhotoItem(models.Model):
photo_item = models.ForeignKey('Photo', related_name='photoitem')
slug = models.SlugField(blank = True, null = True)
de
On Fri, Jul 17, 2009 at 10:28 AM, Vasil Vangelovski
wrote:
>
> I'm using svn trunk version of django (rev. #11263). In my project I
> have only one admin site registered in the urlconf. This admin site is
> a subcalss of django.contrib.admin.sites.AdminSite and is instantiated
> with the name 'adm
2009/7/17 Ronghui Yu
> Hi, All,
>
> I have a project that have CsrfMiddleware enable, all forms work fine, but
> the login form doesn't, for all browsers(IE,Chrome,Firefox,Safari).
> Most of the time, it throws 403, which is thrown by CsrfMiddleware. That's
> because the browser cache the login
I'm using svn trunk version of django (rev. #11263). In my project I
have only one admin site registered in the urlconf. This admin site is
a subcalss of django.contrib.admin.sites.AdminSite and is instantiated
with the name 'admin'. I'm trying to use reverse url lookups for the
admin site as desc
Phil wrote:
> Hi Josh,
>
> unfortunately it seems that there is no way to do so. As you've
> noticed that correctly you can use request (request.user) in any place
> but model save.
Yes, I bumped into the same problem and came to the same conclusion. No
way. Unless you hack out something along t
Hi, All,
I have a project that have CsrfMiddleware enable, all forms work fine,
but the login form doesn't, for all browsers(IE,Chrome,Firefox,Safari).
Most of the time, it throws 403, which is thrown by CsrfMiddleware.
That's because the browser cache the login page, so each time the login
page i
2009/7/17 Lokesh :
>
> Hi,
>
> Initially the table created with the following code
> Class user_privileges(models.Model):
> user_id = models.ForeignKey(User)
> is_deleted= models.CharField(null=False, blank=False,
> max_length=1)
> is_email_active = models.CharField(null=False, blank=Fals
Hi everyone. I'm new to Django, learning things mostly through trial
and error, but this time I can't seem to figure out what went wrong. I
overrode the admin change_form.html for my model so that I could add a
Javascript RTE that I found, but not only does the text area look
broken (it's split in
Hi,
Initially the table created with the following code
Class user_privileges(models.Model):
user_id = models.ForeignKey(User)
is_deleted= models.CharField(null=False, blank=False,
max_length=1)
is_email_active = models.CharField(null=False, blank=False,
max_length=1)
Now I would lik
Hi,
1. In the Python code, how can I access various Meta properties of a
model (e.g. verbose_name, etc). At the moment, I do it via
model._meta.verbose_name, but I always get chills down my spine when I
access properties beginning with a single underscore. Is there a
"proper" way?
2. Can someone
Yes and also on windows. I use tee in order to have print on stdout and also
on a log file. The problem is that I don't see django web server messages on
log file (I see only my logging messages). Maybe I've found the problem
checking
Django source. Server log message are send to stderr (stdout is
Heya,
If I wanted to get the Average of all ratings (in a Rating table) for
a single record.
Would I use something like this:
ratings_avg = Rating.objects.aggregate(Avg('rating'))
And where does this live? In models.py or views.py and how is it
called.
I've been reading a lot about it, but some
That would depend on the OS you use.
If you use linux: "python manage.py runserver >> example.log"
That will save the output in a file, instead of showing it on screen,
allowing you to have another webserver serve it.
Luke
On Jul 17, 6:38 am, Andrew wrote:
> Hi,
> I run Django light web serve
hi folks, it's be a long time without writing to the list but now I'm
back with a simple question, I need to know how much can cost to make
a site like this: www.juegon.com
--
Lic. José M. Rodriguez Bacallao
Centro de Biofisica Medica
I'm working on a django project right now that uses the Amazon Product
Advertising API. I was using pyaws, but it is quite outdated and won't
be useful for the changes coming in the next month.
My first question is whether you know of any other python library for
it.
Second question, is there any
to make it simple, i have this in models.py
class Photo(models.Model):
title_hr = models.CharField('(hr)', max_length=255)
title_en = models.CharField('(en)', max_length=255)
img = FileBrowseField(max_length=200, initial_directory="",...)
class PhotoSetPhotoItem(models.Model):
or
Hello
I'm writing a library of helper classes/functions to ease creation of
custom template tags. So a natural doctest (or an example in the
documentation) goes like this: define a compiler function and Node
class with my helpers, register them with a tag library, define a
bunch of template str
Hello.
For a small webshop I have the following models: Product, Category,
Country and UserProfile. Each user have a country set with a FK, and
should only be allowed to see content in the administration assigned
to the same Country. The Product and Category have FKs to the Country
model so I can
On Fri, Jul 17, 2009 at 6:55 AM, Oleg Oltar wrote:
> I want to create an object that contains 2 links to users. For example
>
> class GameClaim(models.Model):
> target = models.ForeignKey(User)
> claimer = models.ForeignKey(User)
> isAccepted = models.BooleanField()
>
> but I am getti
Hi,
I run Django light web server with command line "python manage.py
runserver".
I must redirect to another stream web server output messages, the ones
like "[17/Jul/2009 12:35:58] "GET /home/foo/ HTTP/1.1" 200 1061".
Any help?
Tnx,
Andrew
--~--~-~--~~~---~--~~
Yo
Hi!
I want to create an object that contains 2 links to users. For example
class GameClaim(models.Model):
target = models.ForeignKey(User)
claimer = models.ForeignKey(User)
isAccepted = models.BooleanField()
but I am getting an error when running server:
Accessor for field 'target'
Hi,
I'm going through James Bennet's Practical Django projects.
When I de-couple the urls to "urls folder" + "url category" I
get_absolute_url doesn't work.
If I put the urls back into the main urls.py file get_absolute_urls
works again.
I must be missing something very basic, but I'm pret
Examples and code can be found at http://code.google.com/p/django-nav/
Goals:
Create a extensible, non intrusive, fast system for generation
navigation groupings.
Reason:
While there are several systems already out there for crating
navigation menus, tabs, etc, they all (That I have found) fai
Hi,
On Fri, Jul 17, 2009 at 9:14 AM, Adrián Ribao wrote:
>
> Hello everybody,
>
> I have an multi language site with a form in the home. If I change the
> language of the site everything changes but the form takes a few
> minutes before I see it in the right language.
>
> If I reload the server t
Hi Joshua,
whenever I override some of the Form methods, I make sure I have tests
that cover the code I wrote. In particular, when I override the save()
method on a ModelForm, I make sure that
- the Model save() gets called from the Form save() if the form is
valid
- my Form save() returns th
Hello everybody,
I have an multi language site with a form in the home. If I change the
language of the site everything changes but the form takes a few
minutes before I see it in the right language.
If I reload the server the form is visualized ok, but this is not the
right behaviour.
The code
On Jul 16, 11:11 pm, Russell Keith-Magee
wrote:
> On Thu, Jul 16, 2009 at 10:46 PM, Joshua Russo wrote:
>
> > I want to test my forms but I'm not sure the best way to go about it.
> > It seems like it might be similar to views but I can't find much
> > discussion of form testing in any of the dis
I've a generic model to save the user preference with a key and value
However the view would change depending upon the key.
Example,
key : newsletter
view : radio button, yes and no
key : template type
value: drop down box [blue, white, brown]
Is anything like this possible in Django, I am kin
Hello,
I'm trying to build a photo upload path which corresponds to the
selected user i.e., when the user is selected from the drop down the
username gets appended to the file upload path dynamically. If you
have any ideas I would like to hear them:
class Listing(models.Model):
user = mo
80 matches
Mail list logo