Play online Backgammon...
The Largest Backgammon Room whole the World...
Try it...
http://www.play65.com/EN/index.html?did=20&tag1=9564
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
Hi,
I like the Admin interface very much. :)
Currently the Admin interface is designed for adding or changing
objects, bot not for *viewing* them. I am thinking to enhance it with
view capabilities.
For example, when you want to change an object you have some nice
features to select the obje
On Aug 23, 2006, at 2:48 PM, Burhan wrote:
> return self.date.strftime("%b %d %Y")
Thanks Burhan, I actually tried that and it didn't work. But now I
try it again and it works great. I guess I must have had some kind of
syntax error last time. Anyway -- that's the stuff. One down, seven
to
On Aug 23, 2006, at 1:59 PM, Bryan Murdock wrote:
>
> On 8/22/06, Sean Schertell <[EMAIL PROTECTED]> wrote:
>> (4) I don't want to use Users/Groups/Sites at all. What's the best
>> way to make it completely go away?
>
> I think if you remove them from your INSTALLED_APPS setting they will
> prob
Finally, something I do know about because I struggled with the same
problem!
> (1) My model includes an Event class. Events should be displayed
> using the date as their name. So the name of the event might be
> "August 25th, 2006". But if I add a def(self): __str__(self.date) to
> the class, I
Thanks Russ. Is there a way to have a multiple select drop down
without using a m2m and a filter?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us
On 8/22/06, Sean Schertell <[EMAIL PROTECTED]> wrote:
> (4) I don't want to use Users/Groups/Sites at all. What's the best
> way to make it completely go away?
I think if you remove them from your INSTALLED_APPS setting they will
probably go away. I haven't tried it yet, you might need to
./mana
{% for photo in object.photo_set.all %}
{% endfor %}
PS: It would be better to call the field 'entry' rather than 'photoid'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gro
Hi Guys,
A few things I'm trying to figure out -- any pointers would be great!
(1) My model includes an Event class. Events should be displayed
using the date as their name. So the name of the event might be
"August 25th, 2006". But if I add a def(self): __str__(self.date) to
the class, I
bayerj wrote:
> As soon as I change my database schema, I have several possibilites to
> get my app up again:
> (a) Change the model. Then drop the current db schema, fire up the new
> one. Drawback: I lose my data.
> (b) Change the model and change the schema manually. Drawback: I am
> repeating
p.s. I'm using generic views
keukaman wrote:
> I wrote a blog application that included a single image. I originally
> wrote my model so that the image was defined in the same class as the
> rest of the blog entries.
>
> I then decided that I wanted to be able to put multiple images into my
> blo
I wrote a blog application that included a single image. I originally
wrote my model so that the image was defined in the same class as the
rest of the blog entries.
I then decided that I wanted to be able to put multiple images into my
blog, so I created a "Photo" class, with a var called "photo
On 8/22/06, Seth Buntin <[EMAIL PROTECTED]> wrote:
> Can you change the displayed name of the app in the Django admin?
That's not possible at the moment -- Django just uses the name of the
app's Python module. But you can use a custom admin index template to
call it whatever you'd like (and desig
Can you change the displayed name of the app in the Django admin?
--~--~-~--~~~---~--~~
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 unsubscri
On 8/23/06, richard mendes <[EMAIL PROTECTED]> wrote:
>
> Barry,
>
> Actually what i was thinking is to get a list with the keywords and
> then go with a forloop threw all keywords and get the values from a
> dictionary where the key's are the same as the keywords only in field
> names.
>
> so wha
Stewart:Take a look at http://www.djangoproject.com/documentation/forms/ for more on creating forms, and simplifying the process.You will need to have to figure out how you want to handle the item listings. You will either have to have a static set of items or use some fancy _javascript_/DHTML to d
This is what you'd do if you wanted to set is_superuser for a
manipulator and not use the 'hidden input' idea.
let's take your view from the point where you check if the for has been
posted:
manipulator = users.ChangeManipulator(user_id) # Let's get the
manipulator for a user
if request.POST:
OK, I removed the admin from my Text table, did an edit_line=True and a
core and it works exactly as I pictured. Awesome. :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gr
On 8/23/06, Burhan <[EMAIL PROTECTED]> wrote:
I would appreciate if you could tell me a better way to get the m2mrelationship pulled in -- as the rest of the comments regarding thetemplate are something that I am well aware of. Also, by better design
-- I didn't mean better design for the database
Just wanted to add that I got hit by that too, just now. Hoping for a
quick fix here or in django...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
Hi Rob,
You have the ForeignKey reference in the correct place.
Check out the documentation about edit_inline on the ForeignKey field.
You most likely don't actually need to use the class Admin: on your
Text class.
--~--~-~--~~~---~--~~
You received this message
Hi Cary,
Try the stringformat filter
{{ r.hourly_rate|stringformat:".2f" }}
--~--~-~--~~~---~--~~
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
T
On 8/22/06, cyberco <[EMAIL PROTECTED]> wrote:
>
> Max, I'm not sure I fully understand your reply. Currently I got things
> working by passing the user object to the template and returning its
> attribute values:
>
>
> value="{{user.is_superuser}}" />
>
>
> Is t
It's not a security hole if you are writing a user management
application. And this information is being made avaliable to a trusted
"administrative user".
However, if you are using this data to re-populate a user object or
edit user info, or for any purpose not administrative, and not
validating
On 8/22/06, cyberco <[EMAIL PROTECTED]> wrote:
>
> In my form I want to enable users to change an image (ImageField), but
> although I can fill fields of other types with their existing values,
> this is not the case with an ImageField. How can I accomplish that?
If I understand what you're asking
Try either:
def __str__(self):
return '%s - %s' % (self.name, str(self.category))
or
def __str__(self):
return '%s - %s' % (self.name, self.category.name)
The problem is that it is using __repr__ to print it out, not str. To
force str you have to use the str(). Or you can
On 8/22/06, cyberco <[EMAIL PROTECTED]> wrote:
>
> Max, I'm not sure I fully understand your reply. Currently I got things
> working by passing the user object to the template and returning its
> attribute values:
>
>
> value="{{user.is_superuser}}" />
>
>
> Is t
Hello,
I have some FloatField currency values that I want to display with two
decimal places (regardless of whether there are decimal values or just
".00"), and I can't seem to figure out the "graceful" way to do it. I
have defined the number of decimal places in the model:
hourly_rate = models.
This is a major security hole. Just because a field is hidden doesn't
mean it cannot be changed. Use the request.user object for
authentication purposes. The authentication docs should give you an idea
what to do.
cyberco wrote:
> Max, I'm not sure I fully understand your reply. Currently I got
Hi,
I'd appreciate some help on how to set this up in Django. The idea: A
page has many text entries (positions on the page). Simple enough.
Here's how I was approaching the models (trimmed to remove extra info):
class Template(models.Model):
name = models.CharField(maxlength=64)
cla
Max, I'm not sure I fully understand your reply. Currently I got things
working by passing the user object to the template and returning its
attribute values:
Is this a security hole?
--~--~-~--~~~---~--~~
You received this mes
Once permissions are added to the auth_permission table it doesn't
matter how often I invoke 'manage.py syncdb app' or 'manage.py reset
app', stale records are never deleted. Is this normal behaviour?
--~--~-~--~~~---~--~~
You received this message because you are
Barry,
Actually what i was thinking is to get a list with the keywords and
then go with a forloop threw all keywords and get the values from a
dictionary where the key's are the same as the keywords only in field
names.
so what i thought was get the keywords and do the following
keywords = [ all
In my model:
=
image = models.ImageField(upload_to='pics',
validator_list=[validators.isValidImage], blank=True)
=
I am able to upload an image once using an appropriate form:
=
Image: {{form.image}}{{form.image_file}}
On 8/22/06, cyberco <[EMAIL PROTECTED]> wrote:
>
> I want to pass the user.is_superuser attribute through a form without
> enabling the user to edit it, so I use a hidden field. Like this:
>
> TEMPLATE=
> value="{{userWrapperForm.is_superuser}}" />
> =
>
> Weird en
I apologize in advance if this is a stupid question - I'm new to
Django, and a little over my head (but loving it!)
I'm trying to return a field from a foreign key relationship as part of
my __str__ method. When I do, I get this output in the admin interface:
Product Name -
What am I doing wro
In my form I want to enable users to change an image (ImageField), but
although I can fill fields of other types with their existing values,
this is not the case with an ImageField. How can I accomplish that?
--~--~-~--~~~---~--~~
You received this message because
Hi all,
I've made custom file upload fields with some extra features:
- automatic upload_to path (based on app/model/field names)
- automatic renaming the filename based on the primary key
- maximum width and/or height for images
I've created filters to automatically resize/crop images directly
I want to pass the user.is_superuser attribute through a form without
enabling the user to edit it, so I use a hidden field. Like this:
TEMPLATE=
=
Weird enough this results in the following HTML:
=HTML
" />
=
And when submit
Ok, I fixed it.
I had the following, which used to work, in my models.
date_added = models.DateTimeField(default=models.LazyDate(),
editable=False)
I changed it to the following and it now works.
date_added = models.DateTimeField(default=datetime.now(),
editable=False)
Now everything is fine.
I just rechecked and everything is using DateTimeField.
I'm pretty sure this happened without me making any changes to my
models. From what I can tell it's a problem with the "change list" that
the admin displays for each object. Before I have added and objects I
get the page but of course it's e
On 8/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> Has anybody seen the following exception? It was working till I did an
> svn update sometime in the last couple weeks. (I don't often use the
> admin so I'm not sure when.) I also tried getting it working with a
> clean syncd
I opened a ticket for a similar problem. It's a feature ;)
http://code.djangoproject.com/ticket/1193
On 8/22/06, Enrico <[EMAIL PROTECTED]> wrote:
>
> - or the docs should say that "load" tags doesn't get inherited.
--
Julio Nobrega - http://www.inerciasensorial.com.br
--~--~-~--~--
Hi Ian,
thanks very much, this works fine and it is the OO way, i think.
Having my pictures regarded :)
Regards,
Frank
Am Donnerstag 17 August 2006 22:42 schrieb Ian Clelland:
> On 8/17/06, Frank Stüss <[EMAIL PROTECTED]> wrote:
> > Hi all,
> > is there a best practice to overwrite/extend
> > d
On 8/22/06, Waylan Limberg <[EMAIL PROTECTED]> wrote:
>
> It occurs to me that it may be related to the inability to sort such
> items in the 'list_display'. For example, in FooBar I also have the
> following property defined:
>
After posting that I remembered that those model methods/properties
a
It seems I've been designated the "Django spam maven"; what this means
for you, if you've been getting caught in the Django Trac's spam
filters, is that you need to write me and let me know your IP address
(or the typical range of IP addresses you use) so I can whitelist you.
Once I do this, you
It isn't clear on the docs that custom tags doesn't get inherited from
parent templates.
I can see two paths:
- maybe the template engine should implement this feature (not sure if
this is the best approach, it can end up loading a bunch of useless
stuff).
- or the docs should say that "load" t
Hi all,
Has anybody seen the following exception? It was working till I did an
svn update sometime in the last couple weeks. (I don't often use the
admin so I'm not sure when.) I also tried getting it working with a
clean syncdb but still get the error. I'm using sqlite.
The error mesg is:
Caug
First, here is an example model:
Foo
name
Bar
foo = fk(Foo)
FooBar
bar = fk(Bar)
Given the above (simplified) model, the following works fine:
>>> FooBar.objects.filter(bar__foo__name='blah')
However, if I want to use that for a 'list_filter' in the Ad
thank you for your help!
Luis P. Mendes
Chris Long escreveu:
> To add permissions.
> For user: user.user_permissions.add(perm)
> (I think, don't have the chance to double check) For group:
> group.permissions.add(perm)
>
> For your question, the permission table contains the codename, verbose
>
First, thanks for your opinons.
Tim:
This was what I did the first way I did it, because it didn't make
sense to me to have a table that is just going be used for a lookup.
However, with that option, I didn't get the option to do a multiple
select on the days. If a flight is only on sunday or
On 8/22/06, DD <[EMAIL PROTECTED]> wrote:
> I am using the Django built-in web server. The server's reponse time is
> nomal when connecting to Internet, once it's offline, the speed is
> extremely slow. Does anyone have experience how to fix it?
Hi DD,
A few days (weeks?) ago, we improved the bu
I figured out what my problem was. It was me being stupid.
--~--~-~--~~~---~--~~
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
mxDateTime is installed
- /usr/lib/python2.3/site-packages/mx/DateTime/mxDateTime/
I'm not positive how mxDateTime interacts with Django, but since it
works fine with "./manage.py runserver", that is Django can talk to
PostgreSQL, it seems the problem might having something to do with
mod_python
This might be of use:
http://www.djangoproject.com/documentation/model_api/#list-per-page
Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-use
On Tue, Aug 22, 2006 at 06:20:14AM -0700, Tim Shaffer wrote:
> It looks like some of your views are very simple and could use generic
> views, if you wanted.
>
> def home(request):
> return render_to_response('home.html')
>
> could use django.views.generic.simple.direct_to_template
I was
Hi all,
I have searched the mailing archive about paging the admin interface
but without success.
I have done a small blog application, and when I go to
http://myhost/admin/blog/post/
I see a very huge list of "post" objects.
I have reached 26 posts without paging...I have read it can be done
wi
I thinks its a problem on mysql-client package, I haven't made any
testing with other packages, but probably there are others broken too.
Hopefully will be corrected soon :)
Max
--
-BEGIN GEEK CODE BLOCK-
Version: 3.12
GS/S d- s: a-29 C++(+++) ULAHI+++ P+ L++>+++ E--- W++ N* o-- K- w++
To add permissions.
For user: user.user_permissions.add(perm)
(I think, don't have the chance to double check) For group:
group.permissions.add(perm)
For your question, the permission table contains the codename, verbose
name and content type of the object. In most cases, you could probably
get a
That seems to work, 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-users@googlegroups.com
To unsubscribe from this group, send email to [EMA
It looks like some of your views are very simple and could use generic
views, if you wanted.
def home(request):
return render_to_response('home.html')
could use django.views.generic.simple.direct_to_template
def entry(request, entry_id):
e = get_object_or_404(Entry, pk=entry_id)
Since so many people are developing their own blogs in Django, I thought
it would be good to announce that the source code to mine is now
available. Mine is probably of most interest to people migrating from
COREBlog or other Zope blogging software.
Browse: http://refried.org/viewvc/viewvc.py/re
You can use choices for the Frequency model, if you like. It may
simplify things.
DAY_CHOICES = (
('Sa', 'Saturday'),
('Su', 'Sunday'),
('Mo', 'Monday'),
('Tu', 'Tuesday'),
('We', 'Wednesday'),
('Th', 'Thursday'),
('Fr', 'Friday'),
)
class Frequency(models.Model):
On 8/21/06, Corey Oordt <[EMAIL PROTECTED]> wrote:
>
> I think you need to include django.core.exceptions
>
> And I think that the exception is ObjectDoesNotExist
>
That did the trick. Thanks.
--
Waylan Limberg
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You rec
Seth Buntin wrote:
> So how will I get the queries if more than one word is used to search?
> The only reason I am using the way I am is in case people search
> multiple words. Can I run queries and add them together or something?
Seth,
I do a similar thing using the ORM's Q object:
from d
On 8/22/06, Burhan <[EMAIL PROTECTED]> wrote:
Now this does work, but is there a better way to get the same result?Erm Yes :-). However, it is a little difficult to establish what facet of your application you want to have critiqued. You have presented a very large model and view, without any p
On 8/22/06, cyberco <[EMAIL PROTECTED]> wrote:
This seems quite basic, but still, I'm missing something. What could bethe problem?Is this a direct copy and paste, or a retype? The reason I ask is that the behaviour you are reporting has all the symptoms of a mistyped template variable that is silen
Hi, I have a routine like this in a custom manipulator (which handles
SMS message-sending from a web-page):
def save(self, data):
temp = Message(
contact_type = data['contact_type'],
mobile_number = data['mobile_number'],
message = data['message'],
date_sent =
[EMAIL PROTECTED] wrote:
> thanks,
>
> that worked
>
> richard
Ah, now I see my confusion. What you wanted was the 'field names', not
'keywords', and you said: [result_id,lab_id] when you really meant
['result_id','lab_id'].
Barry
--~--~-~--~~~---~--~~
You rec
There is no MySQLdb-python package in my system. There is a package
named python-mysqldb. I reinstalled it and the problem is still the
same.
My system is debian etch, python-mysqldb is 1.2.1, python 2.3 or
2.4(both have the same problem), django 0.95 or svn(both the same).
On 8/22/06, Spike^ek
On Mon, Aug 21, 2006 at 01:18:03PM -0400, Waylan Limberg wrote:
> In either case, you may want to take a look at the limit_choices_to
> argument of many-to-one fields[1].
Could you give me an example of how to do this? I've tried the
following. The source is in Dutch, but I'd rather copy & paste t
Hi.
I've just started with Django and I'm liking it! A little confused
about one thing though...
I am experimenting with a basic ordering system, the model for which
look like this:
class stock_item(models.Model):
name = models.CharField(maxlength=200)
class order(models.Model):
ordere
Thanks to all of you...I have sorted the problem out...I took a look at
what all of you had to say and worked through the docs again, so a big
hell yeah to you all!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
Hello Everyone:
I am trying my luck with django again, and I found a way to show a
list of related objects in a many-to-many relationship, using the
following model and view:
Model
# Flight Frequency
class Frequency(models.Model):
day_translated = {'Sa': 'Saturday', 'Su': 'Sunday', 'Mo':
With the following model and template:
==MODEL
videoFile = models.FileField (upload_to='videoupload', blank=True)
==TEMPLATE=
Video File:
{{form.videoFile}} {{form.videoFile_file}}
The HTML output rende
Hi, chen.
I got the same problems after updating my system.
Just re-install MySQLdb-python modules.
zhongke chen wrote:
> After upgrade mysql from 5.0.22 to 5.0.24, django cannot work with
> mysql. The error messages as following:
> Traceback (most recent call last):
> File "./manage.py", line
Hi.
Your output has this error message:
"ImproperlyConfigured: Error loading psycopg module: No module named
DateTime "
Did you install the EGenix "mxDatetime" package? And did you specify
the correct location when compiling psycopg?
psycopg seems to require this package.
See http://www.egenix.
Ah! Thanks for the tip. That didn't cross my mind. Learning all the
time, I guess.
--~--~-~--~~~---~--~~
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
On 8/22/06, DD <[EMAIL PROTECTED]> wrote:
Hi,I am using the Django built-in web server. The server's reponse time isnomal when connecting to Internet, once it's offline, the speed isextremely slow. Does anyone have experience how to fix it?
1) The django-developers list is for discussion of the i
79 matches
Mail list logo