Okay. Say something
If you need some files, I will be charmed to give
Regards,
Xan.
On Oct 11, 9:53 pm, Derek Anderson <[EMAIL PROTECTED]> wrote:
> your previous bug was a standard import issue unrelated to deseb.
> however this looks like it may be a real one. let me look into it.
>
> dere
Hi group,
I have a problem with this variable in
django.contrib.admin.templates.admin.change_form.html
{{ original|truncatewords:"18"|escape }}
I'm getting this error:
UnicodeEncodeError at /admin/player/playerprofile/5/
'ascii' codec can't encode characters in position 3-4: ordinal not in range(
On Freitag, 12. Oktober 2007, Michal Konvalinka wrote:
> Hi group,
> I have a problem with this variable in
> django.contrib.admin.templates.admin.change_form.html
> {{ original|truncatewords:"18"|escape }}
>
> I'm getting this error:
>
> UnicodeEncodeError at /admin/player/playerprofile/5/
> 'asc
Hi Dirk,
thanks for your hint, I might use it in future.
I got around my unicode problem by upgrading Python from 2.4 to 2.5
and... it works.
Michal
On 12/10/2007, Dirk Eschler <[EMAIL PROTECTED]> wrote:
>
> On Freitag, 12. Oktober 2007, Michal Konvalinka wrote:
> > Hi group,
> > I have a problem
Hallo ,
In a project I have number of applications. They have been presented
with a head and number of tables of an application in one section. The
head has blue color and the tables have white. Some of these
applications are related to each other, therefor I want to give an
indication that they
Hi.
Is there a way to retrieve all objects, that are currently displayed
on the admin-page?
I have added the list_filter-attribute to the inner Admin-class. Now I
want to add a new function to the automatically generated admin page.
When the user clicks the added link (or button), all objects th
AFAIK there is no possibility to use mulitple column primary keys in
django. But I don't think you need them. If you don't wan't to use
other tables with fks, you could use sth like this:
class Foo(models.Model):
title = models.CharField()
content = models.TextField()
language = model
>
> It's generated from the docstrings, so if you're following good Python
> practice of writing docstrings in your code you'll see them show up in
> the admin as documentation.
>
I read somewhere, that django automatically creates the documentation
for the variables passed to a template. Is the
Hello,
I have an issue with msql...
I am trying to set django on a new machine and I am doing quickly the
"to do list" tutorial of James Bennett to make sure everything wroks
fine before starting my project.
When sync-ing the db I get the following message which puzzles me and
I didn't find anythi
Sorry if this is a stupid question, but why do forms output HTML as
unicode strings? Is this arbitrary or is there some grand convention
we are all supposed to be following? I'm adding bits and pieces to
newforms for my application and am wondering if I should follow this
convention. If I const
I am trying to watch a variable in my app. Setup is fine. I can run
manage.py runserver inside eclipse and view debug window and place
break points. But can't seem to watch the variable values.
I am getting following error:
could not resolve variable
Here is the pic:
http://farm3.static.flic
> I don't think there's a clean solution to this (as far as making the
> Admin work with it). I don't think the admin can make use of a custom
> manipulator without hackish code.
Bummer, I figured the best I could hope for would be to replace the
automatic manipulators to do my bidding after they
> How about something along these lines (a lazy initialization pattern):
Well, the point of saving that boolean was so I could do database
queries on it (MyModel.objects.filter(has_m2m_thing=True)). That
wouldn't really work with this lazy initialization pattern, unless I'm
missing something. Sor
Ok,
I added 'from datetime import datetime' to my views.py and tried the
following code in one of my functions: 'assert False,
datetime.timedelta(days=20)'
but i get the following error:
AttributeError at /plush/newarrivals/
type object 'datetime.datetime' has no attribute 'timedelta'
/
i found solution in djangobook chapter9 at the end
On Oct 12, 6:37 pm, Gigs_ <[EMAIL PROTECTED]> wrote:
> if i wanna update object in django generic
> (django.views.generic.create_update.update_object) im using object_id
> and all work fine if i passwww.myurl.com/books/edit/object_id/.
>
> but wh
if i wanna update object in django generic
(django.views.generic.create_update.update_object) im using object_id
and all work fine if i pass www.myurl.com/books/edit/object_id/.
but what if i want to access my object with object name like book
title?
can i do that too?
--~--~-~--~~-
> then i try to output this via
>
> {% for key, value in debug.debug_msg %}
> {{ key }}: {{ value }}
> {% endfor %}
>
according to http://www.djangoproject.com/documentation/templates/#for try:
{% for key, value in debug.debug_msg.items %}
--~--~-~--~~~---~
On Oct 11, 6:54 pm, Adam Endicott <[EMAIL PROTECTED]> wrote:
> I've got an app where I'd like to set some properties in an object's
> save method based on ManyToMany relationships.
Can you describe generally what you are trying to update in the parent
object when its ManyToMany relationships ar
Hi Hrn,
> I have an issue with msql...
I believe it is MySql and not msql
> raise ImproperlyConfigured, "Error loading MySQLdb module: %s" % e
> django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
> module: /usr/local/lib/mysql/libmysqlclient_r.so.16: Undefined symbol
> "pthr
Thankyou so much don't know how I over looked that :)
On Oct 12, 12:33 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > I have a quick question about saving things. It's probably a rather
> > simple question but I didn't see how to d
class Thing(models.Model):
name = models.CharField(blank=False, null=False, maxlength=30)
photo = models.ImageField(upload_to='images/things/', blank=True,
null=True)
class ThingForm(forms.Form):
name = forms.CharField(max_length=30, required=True, label=_('Name
of the thing'))
ph
On 10/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Now my question. Is there an easy way to change the database settings
> dynamically? Ideally I'd like to parse the url and call a view
> function with the appropriate database settings. This would allow us
> to host one webapp for bo
On 10/12/07, Simone Cittadini <[EMAIL PROTECTED]> wrote:
>
> I was wondering if the limit on one primary key field only was coming
> out of the "encouraging of clean design" or was just a technical limitation.
Search the archives - this has been discussed many times. There is
also a FAQ entry tha
I was wondering if the limit on one primary key field only was coming
out of the "encouraging of clean design" or was just a technical limitation.
I have some classes in my "legacy" app that are uniquely identified by
two or more attributes, and I was just catching db layer exception when
the
> You could use the number like you would like to use your id. The id-
> column itself is of course still added by django as the pk.
I see. Thank you for all the replies, I will use the unique_together
solution.
--~--~-~--~~~---~--~~
You received this message bec
Joesph,
Thanks a lot. I am working on having some sort of ACL for Django, and
thought Generic Authorization and RLP would solve that problem, and I
think they would have. Pity.
Arvind
On Oct 11, 4:15 pm, "Joseph Kocherhans" <[EMAIL PROTECTED]> wrote:
> On 10/11/07, arv43 <[EMAIL PROTECTED]> wrot
Ken wrote:
> Sorry if this is a stupid question, but why do forms output HTML as
> unicode strings? Is this arbitrary or is there some grand convention
> we are all supposed to be following?
The general convention is that all strings inside your project are
supposed to be unicode. They are only
Perhaps you should provide your full models, since day as well as
worker in class WorkingDay refer to a model called Notary. I'm
probably also not sure what you are trying to describe with your
models - but shouldn't worker in WorkingDay refer to your class worker
(btw: call it Worker with big W,
On Oct 12, 1:04 pm, Adam Endicott <[EMAIL PROTECTED]> wrote:
> > How about something along these lines (a lazy initialization pattern):
>
> Well, the point of saving that boolean was so I could do database
> queries on it (MyModel.objects.filter(has_m2m_thing=True)). That
> wouldn't really work
On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I have a quick question about saving things. It's probably a rather
> simple question but I didn't see how to do this in the documentation
> anywhere but maybe I overlooked.
http://www.djangoproject.com/documentation/models/many_to_many/
Hey all,
I have a quick question about saving things. It's probably a rather
simple question but I didn't see how to do this in the documentation
anywhere but maybe I overlooked.
So lets say that I have 2 tables called SodaVendors and another table
called SodaProducts. I have a m2m relation Soda
Ok, so I've done some reading up on this but I'm still unsure how
exactly I can get around this. Right now it seems that I have two
options, I can either manually create my own ManyToMany relationship
table like so:
class Product(models.Model):
name = models.CharField(max_length=255)
clas
hi,
i give to my template a variable like this
messages = ({ 'forum': forum, 'url': request.get_full_path() })
debug_msg = {'view': 'topic', 'messages': messages }
then i try to output this via
{% for key, value in debug.debug_msg %}
{{ key }}: {{ value }}
{% endfor %}
looks l
I solved this.
It seems my models.py was wrong, I got a few FloatField without
max_digits and decimal_places set (it was coming from a 0.97pre
project).
On a remote Apache server I wasn't seeing the nice complaints that
normally Django dev-server shouts.
On 10 Ott, 18:48, Gio <[EMAIL PROTECTED]
>
> The above code is NOT catching the first instance of an NAICS
> description which begins with "A".
The filter on the first parameter there won't work (as you've already
discovered.)
1. If you are using Django SVN trunk, try assigning that filtered
value first to a variable using the 'with' t
> Can you describe generally what you are trying to update in the parent
> object when its ManyToMany relationships are changed. Perhaps there's
> a way to solve your specific problem without requiring more general
> purpose solutions (like Custom Manipulators).
Sure. I'm trying to set a boolean
On 10/12/07, Rufman <[EMAIL PROTECTED]> wrote:
> I read somewhere, that django automatically creates the documentation
> for the variables passed to a template. Is there some function i have
> to activate or is this not possible?
Django doesn't automatically generate _any_ documentation. All it d
> Sure. I'm trying to set a boolean property on the object based on the
> existence (or absence) of a ManyToMany relationship. So I originally
> thought something like:
>
> def save(self):
> self.has_m2m_thing = bool(self.m2m_relation.count())
> super(MyModel, self).save()
>
> This works f
On 10/12/07, Greg <[EMAIL PROTECTED]> wrote:
> I added 'from datetime import datetime' to my views.py and tried the
> following code in one of my functions: 'assert False,
> datetime.timedelta(days=20)'
Read my post again *carefully*.
(hint: "from datetime import datetime" was not in anything I
I appreciate the feedback. I'll take a peek at the multi-db branch.
If anyone is using it and can give a indication of the state, I'm
interested.
Our site is organized exactly as you mention in 1) and it looks like
that's the route we'll be going.
So looks like there is no easy answer to my dyn
hi, I'm using django 0.96
when I log into django admin, select documentation and then my views
(http://localhost:8000/admin/doc/views),
I can see that there is no information about my views (every view
contain only one link - Back to Views Documentation)
anyone know why is that?
thank you for yo
On 10/12/07, lmierzej <[EMAIL PROTECTED]> wrote:
> hi, I'm using django 0.96
> when I log into django admin, select documentation and then my views
> (http://localhost:8000/admin/doc/views),
> I can see that there is no information about my views (every view
> contain only one link - Back to Views
xan,
this is fixed in the latest version of deseb. (v0.2.2)
feel free to pm me if you have any further problems, or join:
http://groups.google.com/group/deseb-discuss
or use the issue tracker at:
http://code.google.com/p/deseb/
thanks,
derek
Xan wrote:
> Okay. Say something
> If you nee
Hello,
I just added the following field to my Style class:
newrugs = models.DateField(auto_now_add=True)
Now, when I try to view my Style objects in the admin I get the
following error:
AttributeError at /admin/plush/style/5/
'unicode' object has no attribute 'strftime'
A
I am using Django stable (0.96).
When I use form_for_model on a model that includes CharFields that
have choices attributes, the resulting form field is not a ChoiceField
as specified in the documentation. Is this simply a bug in 0.96?
Also, if I wish to return a different field type, not based
msoulier wrote:
> I am using Django stable (0.96).
>
> When I use form_for_model on a model that includes CharFields that
> have choices attributes, the resulting form field is not a ChoiceField
> as specified in the documentation. Is this simply a bug in 0.96?
>
>
I think it's this one :
http:
Is there a simple way to recover from interpreter db errors (yeah,
postgres)? I'll often forget a required field and get stuck with this
error for all following db interactions:
ProgrammingError: current transaction is aborted, commands ignored
until end of transaction block.
I'm using the inter
hi,
I have a bunch of sites in production running on python 2.4.x.
Recently I set up a new desktop with mandriva2007 and set up my sites
on the local machine with python 2.5, apache2.2 and mod_python 3.3.1.
The directory setup and files were taken directy from the svn
checkouts of the runn
Hey everyone--
I've got a predominantly static site that I need to serve through
Django, at least until I can convert more of it over properly. Yes, I
know this is discouraged, but it's the only way I'm going to be able
to move forward w/this project
I cribbed this line:
urlpatterns += pat
can you use variables in django's templates?
so like {% for x in y %}
and then something like
{% int x =3; x++ %}
or something like that, would be mighty helpful
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
Simple answer is no. But you can may be try porting mako to to django
On 10/13/07, Goon <[EMAIL PROTECTED]> wrote:
>
>
> can you use variables in django's templates?
>
> so like {% for x in y %}
>
> and then something like
>
> {% int x =3; x++ %}
>
> or something like that, would be mighty helpful
On 10/13/07, Goon <[EMAIL PROTECTED]> wrote:
> can you use variables in django's templates?
Yes.
> and then something like
> {% int x =3; x++ %}
No.
Django's template language is not Python or any other programming
language. Its sole purpose is presentational logic.
--
"Bureaucrat Conrad,
52 matches
Mail list logo