Am Freitag, 24. August 2007 00:50 schrieb Nathaniel Martin:
> I'm hoping that some of the django experts on this list can help me with a
> problem I'm working on designing the architecture of a site I'm working on.
> I want to have many objects that each belong to a category. Each category
> has a
Hi!
Sorry if my question is nonsense, I'm not experienced with Django,
this is my first real app.
I'm trying to reproduce the admin interfase in a form that I build
with form_for_model(), well, not *all* the admin interfase, but the
editing part, in particular, the widgets that it shows with Fore
SonomaSunshine runs well on Django now...
http://samfeltus.com/django/DjangoSummer.html
(Use flowers to navigate to 10 scenes, no preloader, ~6mb)
SonomaSunshine, the Redneck Riviera's Best Python Powered Folk Art
Server, makes it easy to generate Cartoonish backdrops for Flash
movies in Django
I recently setup mod_scgi and found some configuration examples on a
RoR site to get it working. It seems pretty nice so far, much easier
to setup then FastCGI, but the configuration is non existant. I was
able to find 1 Directive for Apache, and 4 parameters with manage.py.
My question is, are th
You can probably skip the StringIO. HttpResponses support a file-like
interface, so you can write directly to them. Try passing the
HttpResponse directly to the SimpleDocTemplate constructor instead.
--Ned.
http://nedbatchelder.com/blog
abrightwell wrote:
> Nevermind, the main problem I seeme
Will there be an issue using the django ORM in twisted, being an
asynchronous framework? Is there going to be threading issues i need
to be aware of?
On Aug 22, 1:07 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 8/22/07, Lee Connell <[EMAIL PROTECTED]> wrote:
>
> > Thanks for response, how
On 8/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Then, I am have exported data in all various formats, with hope that
> one of them would work:
>
> ./manage.py dumpdata --format=python > data.python
Python fixtures aren't really intended for use by end users - its an
internal format t
Hi Alex, might be worth including the data.json output for people to
take a look at.
-Michael
On Aug 24, 5:15 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I have quite complex application and want to make test suite for it.
> Since its complex, I need some data being populated first, so
## data.csv ##
"name","symbol","value","change","mktcap","volume","open","high","low"
"Google Inc. ","GOOG ","512.19","-0.56 (-0.11%) ","159.87B ","3.08M ",
516.13,516.13,507
"Novell, Inc. ","NOVL ","6.84","-0.05 (-0.73%) ","2.39B ","4.49M ",
6.95,6.96,6.76
"Intl Business Machines Corp. ","IBM ","
On 8/23/07, *San* <[EMAIL PROTECTED]> wrote:
>
> So now, I passed in as dictionary data = { a: a_stuff, b:
> b_stuff, ... }
> where a_stuff and b_stuff is also a dictionary, a_stuff {a_max:9,
> a_min:0, .. etc}
>
> when i use
> {% for key,value in data.items %}
> {{key}}, {{value}}
> {%endfor%
I'm hoping that some of the django experts on this list can help me with a
problem I'm working on designing the architecture of a site I'm working on.
I want to have many objects that each belong to a category. Each category
has a bunch of attributes. Each object would set values for each of those
You should be able to say something like
project = Project.objects.get(project_id = some_id)
if project.item_set.all():
# there are items
else:
# there are no items
On Aug 23, 5:41 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Sorry, but I could not get a decent short subject.
>
> I
> Tim, in your code:
>
>filename = 'foo.tab'
>for i, line in enumerate(open(filename)):
> if i == 0: continue # skip the header row
> (fieldname1, fieldname2, fieldname3 ...
> ) = line.rstrip('\n').split('\t')
> cursor.execute("""
>INSERT INTO app_foo
>
Sorry, but I could not get a decent short subject.
I have two models. Model A defines a "project", model B defines
related items. I need to have a method in Model A that queries the
related Model B items and returns T/F depending on what it finds. For
example, if this were a project with tasks, t
**Ben Ford, can you explain a bit more about your code?:
for row in reader:
obj = MyDjangoModel()
obj.__dict__ = row
obj.save()
Correct my interpretation if it's wrong. If my CSV file has columns
"first", "last", "phone", and "email", then MyDjangoModel would
contain those 4 fields. The
On Aug 24, 6:23 am, George Vilches <[EMAIL PROTECTED]> wrote:
> James Bennett wrote:
> > On 8/23/07, John Menerick <[EMAIL PROTECTED]> wrote:
> >> Yeah, I was thinking of running a script in daemon mode, but I would prefer
> >> to keep the code inside the django instance to keep everything simpler
Hi all,
I'd like to clear values of some fields in the bound form before I'll
render a page again, by I'm not able achieve this.
Please, could anybody advice how to do it?
Thank in advance
Peter
--~--~-~--~~~---~--~~
You received this message because you are s
James Bennett wrote:
> On 8/23/07, John Menerick <[EMAIL PROTECTED]> wrote:
>> Yeah, I was thinking of running a script in daemon mode, but I would prefer
>> to keep the code inside the django instance to keep everything simpler.
>> simpler as in the same settings for deployment, less hassle deplo
> But at the same time, this is *not* something Django is designed to
> do. On the other hand, it *is* something cron is both designed to do
> and quite good at. Django is not a replacement for the operating
> system ;)
"uh, yeah...I was trying to rewrite Emacs in Django..."
:)
-tim
--~--~--
On 8/23/07, John Menerick <[EMAIL PROTECTED]> wrote:
> Yeah, I was thinking of running a script in daemon mode, but I would prefer
> to keep the code inside the django instance to keep everything simpler.
> simpler as in the same settings for deployment, less hassle deploying on
> machines, etc...
That clarifies much. Thank you.
On 23 Sie, 13:52, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
> On Aug 23, 9:17 pm, eXt <[EMAIL PROTECTED]> wrote:
>
> > Yes very familiar. I also experienced this kind of strange behaviour
> > from my app behind apache. Two things to do:
> > 1. restart apache afte
Yeah, I was thinking of running a script in daemon mode, but I would prefer
to keep the code inside the django instance to keep everything simpler.
simpler as in the same settings for deployment, less hassle deploying on
machines, etc
John
On 8/23/07, Sean Perry <[EMAIL PROTECTED]> wrote:
>
On Aug 23, 2007, at 12:12 PM, John Menerick wrote:
> Inside my django app, regardless of the events of my django-
> application, I would like to call a method every minute. Since
> Django is heavily event driven, I'm at a loss as how to make this
> work. I'm looking for a way to make this
common problem, but a pretty straightforward solution. You can run a
script via cron that imports and uses Django bits as you like - we do
that quite often. Just make sure you have your environment set up
appropriately when you invoke the script - adding in the proper
PYTHONPATH and such.
-joe
O
I have quite complex application and want to make test suite for it.
Since its complex, I need some data being populated first, so trying
to find out how to make fixtures working.
I think I am doing something absolutely wrong way. Since yesterday
trying to make fixtures working and get one proble
Inside my django app, regardless of the events of my django-application, I
would like to call a method every minute. Since Django is heavily event
driven, I'm at a loss as how to make this work. I'm looking for a way to
make this happen. Any ideas?
John Menerick
--~--~-~--~~-
Hi,
What's the best way to preload values into an admin form when using
newforms-admin?
I've managed to patch django to load form fields with default values
from my model fields. But, this doesn't really allow for the
arbitrary code based on the request that I would like. In particular,
I'd li
I'll give it a shot.
One alternative I think could work for me is to use just one model for
each of the (current) models I'm trying to merge in the view, with a
bunch of fields that are flagged with "blank=True." This makes
ordering them in generic views very easy, but I don't like the
prospects
Hello,
I'm having a problem when I try to create thumbnails for a class that
is has edit_inline. Here are my two models:
class Collection(models.Model):
name = models.CharField(maxlength=200)
collectionslug = models.SlugField(prepopulate_from=["name"])
photo = models.ImageField(uploa
On Aug 23, 7:13 am, "Ramdas S" <[EMAIL PROTECTED]> wrote:
> Is there a code/plugin/ available similar to Wordpress Count Views ( display
> the number of views on a post/article or a blog) plugin in django?
>
> Or can someone advise how I can write one?
You may use middleware, but some may argue
http://www.djangosites.org/with-source/
--~--~-~--~~~---~--~~
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 e
Nevermind - I think I fixed it. I don't know what I did differently
but it works now. =)
Thanks Gabe!
Gabe
On Aug 23, 9:44 am, mynameisgabe <[EMAIL PROTECTED]> wrote:
> Hello All -
>
> I've recently converted my text columns over to UTF8 to support
> international characters. Everything work
Nevermind, the main problem I seemed to be having was "associating"
the pdf with the HttpResponse. Instead of writing the PDF to a file,
I found through some more research that all you need to is use a
StringIO buffer and then write the value of the buffer to the
HttpResponse. I found this infor
On 8/23/07, DrMarco <[EMAIL PROTECTED]> wrote:
> after searching in this group and on google, I am a bit lost about the
> exact state of the newforms library in the 0.96 release. Is it usable
> or is a merely a preview that I should not use for production ? In
> particular can it do filefield and
What I gave you should work, I have no idea about the error your
getting. Here is a complete example, maybe that will help.
In [15]: ls1=cm.Listing.objects.all()[:2]
In [16]: ls2=cm.Listing.objects.all()[10:13]
In [17]: fs3=cm.Field.objects.all()[:2]
In [18]: q=list(ls1) + list(ls2) + list(fs3)
Hi all,
after searching in this group and on google, I am a bit lost about the
exact state of the newforms library in the 0.96 release. Is it usable
or is a merely a preview that I should not use for production ? In
particular can it do filefield and imagefield or not?
I compared carefully the d
So, I have been playing around with reportlab and django in order to
generate pdf's of information from my application. I have played with
the example of using reportlab found in the django documentation but
it seems a bit tedious for my purposes (painting everyline). Being
able to use SimpleDoc
On Aug 22, 5:26 pm, George Vilches <[EMAIL PROTECTED]> wrote:
> Kai Kuehne wrote:
> > Hi,
>
> > On 8/22/07, perrito666 <[EMAIL PROTECTED]> wrote:
> >> Hello people, i have found a situation where AutidTrail comes very
> >> handy, but it does not work out of the box on my model, it says here
> >>ht
Hello All -
I've recently converted my text columns over to UTF8 to support
international characters. Everything works wonderfully except some
template code that I used to fix a javascript error. Some of the UTF8
content is outputted to the browser via Javascript functions so I use
the escape a
Cool, thanks.
--
Filipe
On Aug 23, 2:02 pm, "Aidas Bendoraitis" <[EMAIL PROTECTED]>
wrote:
> Write your own context_processor for that reason. This is a quick example:
>
> #!/usr/bin/python
> # -*- coding: UTF-8 -*-
> # this is a file yourproject/yourapp/context_processors.py
> import re
> from
I get an AttributeError: 'list' object has no attribute 'model'
Is there a way to circumvent this, or should I try to do something
involving a generic relationship for the models (i.e., a model with
almost nothing to it, to which all the other models have a generic
relationship)? Will that kind o
Good to know! Since all the models have a DateTimeField "date"
operator should work. I'll let you know if it works.
On Aug 22, 4:23 pm, Doug B <[EMAIL PROTECTED]> wrote:
> q = list(a) + list(b) + list(c)
> q.sort('-date')
>
> The problem you have here is the q.sort() method doesn't understand
> h
On 23 Aug 2007, at 5:06 pm, Christian Joergensen wrote:
> Great, thanks. :)
>
> Regards,
Don't thank me, thank Chris ;)
Thanks,
--
David Reynolds
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
And there is also this
http://www.amazon.com/Sams-Teach-Yourself-Django-Hours/dp/067232959X/ref=sr_1_11/105-8154652-1682855?ie=UTF8&s=books&qid=1187885714&sr=1-11
Yeah, for Django :-)
Dave.
Derek Lee-Wo wrote:
> Amazon shows it as being released on Oct 22:
>
> http://www.amazon.com/Professio
David Reynolds wrote:
> Christian,
>
> SmileyChris has a rather cunning application that does just that:
>
> http://smileychris.tactful.co.nz/ramblings/django-documentation/
>
Great, thanks. :)
Regards,
--
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk
Christian,
SmileyChris has a rather cunning application that does just that:
http://smileychris.tactful.co.nz/ramblings/django-documentation/
Cheers,
David
On 23 Aug 2007, at 4:29 pm, Christian Joergensen wrote:
> Hello
>
> I was wondering if the idea of including the ./docs part of
Hello
I was wondering if the idea of including the ./docs part of the django
source in the installed django module has ever come up before? This way
you could get the documentation part of the admin to render the django
documentation together with your application documentation.
This would be gre
So now, I passed in as dictionary data = { a: a_stuff, b:
b_stuff, ... }
where a_stuff and b_stuff is also a dictionary, a_stuff {a_max:9,
a_min:0, .. etc}
when i use
{% for key,value in data.items %}
{{key}}, {{value}}
{%endfor%}
it doesn't print anything, but when i do
{% for key in data.i
That solved the problem.
Thank you.
Jørn Borup
On Aug 23, 8:21 am, Paul Rauch <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> jborup schrieb:
>
> > HI Django users,
> > New to python and django. I'm following thewww.djangobook.com, and
> > chapter 6 talks about
On 8/23/07, *San* <[EMAIL PROTECTED]> wrote:
>
> How to add suffix/prefix in a template? So if i passed in a list name-
> [a,b,c,d] and a_max, b_max, etc from views.py. and I do something like
>
> {% for i in name %}
> {{ i_max}}
> {% endfor %}
>
> so I actually wants to print the value of a_m
How to add suffix/prefix in a template? So if i passed in a list name-
[a,b,c,d] and a_max, b_max, etc from views.py. and I do something like
{% for i in name %}
{{ i_max}}
{% endfor %}
so I actually wants to print the value of a_max, b_max, etc. Is there
a way to do this? or I have to hardc
I'm having a problem when printing the template. I want something
like:
{% i in item %}
{{ form.{{i}}.error }}
{{ {{i}}_max }}
{{ {{i}}_min }}
{% endfor %}
-- which obviously doesn't work
so, from my views.py I passed in a dictionary containing, a list of
items - [a, b, c,
On 8/23/07, altahay <[EMAIL PROTECTED]> wrote:
>
> Hello to all,
>
> I know my question could be a bit silly but... I dont know how to do
> it. Do anybody know how to do arithmetic operations in a templete?
Generally speaking - you don't.
This is by design. Django tries very hard to prevent you
On 8/23/07, Wiley <[EMAIL PROTECTED]> wrote:
>
> I'm new to web programming and open source communities. In a
> situation where I believe I've found a bug, should I first post it
> here and confirm? Should I post it on the http://code.djangoproject.com
> trac page?
If you're certain you have fo
Sorry about that. The deluge of traffic caused my budget vps to have
problems (memory). I'm back up now.
-Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send emai
Have a look at the CSS file the admin pages use. You can include it in
your projects.
For a login see other threads - this is already documented.
On Aug 23, 1:03 pm, eyscooby <[EMAIL PROTECTED]> wrote:
> Hello
> I was wondering, if it is possible to have the look/feel of the django
> admin page
Write your own context_processor for that reason. This is a quick example:
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# this is a file yourproject/yourapp/context_processors.py
import re
from django.conf import settings
def general(request=None):
return {
'root_dir': settings.ROOT_DIR,
> I know my question could be a bit silly but... I dont know how to do
> it. Do anybody know how to do arithmetic operations in a templete?
>
> {{elem}}
>
> what I want to do is something like {{ elem }} + 100
There's an "add" filter...
http://www.djangoproject.com/documentation/templates/#
Hi all,
Regarding template inheritance and the use of {% extends %}, in the
Django book[1] says that:
"In most cases, the argument to {% extends %} will be a string, but it
can also be a variable, if you don't know the name of the parent
template until runtime. This lets you do some cool, dynami
So just to update on this, I think I might have found a bug in the SVN
release of django. I've created a brand new postgres database and a
simple test application (aka no dumping or loading data, and no
database backup and restore). When I try and enter Chinese characters
through the admin backe
Amazon shows it as being released on Oct 22:
http://www.amazon.com/Professional-Python-Frameworks-Programming-Turbogears/dp/0470138092/ref=pd_bbs_12/104-9039171-6407132?ie=UTF8&s=books&qid=1187871082&sr=8-12
On 8/23/07, Ramdas S <[EMAIL PROTECTED]> wrote:
> Has someone seen this book?
>
> http:
Hello
I was wondering, if it is possible to have the look/feel of the django
admin page as part of the main application page. I like the colors
and style used for the admin page and would like to have the app page
look something like that.
Also, is it possible to use/create a login page, similar
On 8/22/07, sean <[EMAIL PROTECTED]> wrote:
> for i in requested_forms:
> form=mediaform(data, auto_id="some_generated_id")
> # assign the queryset to the choices
> form.base_fields['somefield'].queryset = qs
Try adding:
form.base_fields['somefield'].widget.choices =
form.base_
On Aug 23, 9:17 pm, eXt <[EMAIL PROTECTED]> wrote:
> Yes very familiar. I also experienced this kind of strange behaviour
> from my app behind apache. Two things to do:
> 1. restart apache after changes to your files (there is a directive to
> autoreload described somewhere in the docs - useful fo
Hello,
I defined my form with a comboField like:
class addressForm (forms.Form):
...
language = forms.ComboField()
...
and I fill in like that:
languages = Language.objects.all()
data = {
...
'language': languages,
... }
but what I see in the navigator is a t
Do you also have it. When nothing comes to my mind i ask for help and
after a minute i have what i want without any help :)
djando.db.loaders - get_model
Thank you for cooperation :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
Sorry I wrote "templete" instead of "template" ...
On 23 ago, 12:31, altahay <[EMAIL PROTECTED]> wrote:
> Hello to all,
>
> I know my question could be a bit silly but... I dont know how to do
> it. Do anybody know how to do arithmetic operations in a templete?
>
> {{elem}}
>
> what I want to d
Hello to all,
I know my question could be a bit silly but... I dont know how to do
it. Do anybody know how to do arithmetic operations in a templete?
{{elem}}
what I want to do is something like {{ elem }} + 100
thank you in advance.
--~--~-~--~~~---~--~~
Yo
Thanks for your replies, overwriting the choices seems to work, but is
making the code somewhat unreadable, because i need to do this for a
number of form fields. The drop down list that worries me the most has
approx. 600 entries, but there 2 or 3 other fields that have a lot of
entries too. I kn
Hi.
I have some problem i cant figure out.
I have two separate apps in separate projects. I want to write script
that uses both apps. Problem is that in models i have two different
classes with same name (call it C).
So to make it short i have something like this:
from projA.appA.models import C
Yes very familiar. I also experienced this kind of strange behaviour
from my app behind apache. Two things to do:
1. restart apache after changes to your files (there is a directive to
autoreload described somewhere in the docs - useful for development)
2. if it doesn't help you then manually remo
On 8/23/07, James Tauber <[EMAIL PROTECTED]> wrote:
>
> Looking at previous discussions, I think what I need is much simpler
> than others.
>
> I just have
>
> class Friendship(models.Model):
> to_user = models.ForeignKey(User, related_name="friends")
> from_user = models.ForeignKey(User
Cheers,
The junction thing works well!
re: *nix
I'll get around to it someday. I've been thinking about it a lot
recently. I may go for a dual-boot or maybe even virtualisation.
And my DOS-prompt terminal DOES have colours! :p
--~--~-~--~~~---~--~~
You receive
Hey,
I've got django installed on a webserver with apache / mod_python /
mysql (on debian). I've got the latest svn version of django
installed.
I'm runinng through the tutorials but I'm getting some strange results.
Tutorial 1 went fine, so I've got the Poll / Choice models and I can
work with
or maybe manage.py/django-admin.py could take an new option for an
additional directory to search for commands (as well as the core dir,
and application dir when it gets checked in again). Then the one off
scripts could be written in the style of commands.
Graham
--~--~-~--~~---
http://www.satchmoproject.com/shop/ is giving me a "500 - Internal Error"
--~--~-~--~~~---~--~~
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 uns
I started with the .96 version locally and then backed up and restored
the postgres DB on my live server, which is running the SVN version.
The import worked fine, the front end works fine, but there is a
problem with the backend. It seems to be having a problem dealing
with some of the unicode c
Thanks! That was it, for anyone else who might encounter this, here's
the code that goes in your template:
{% regroup book_list by name as name_list %}
{% for name in name_list %}
Am Mittwoch, 22. August 2007 19:25 schrieb Sandro Fernandes:
> Hi all ,
>
> I runing Django from the trunk and getting the error bellow , this
> happens when a data has accents like á é or ã
>
>
> UnicodeDecodeError at /admin/frete/frete/
>
If you use the current SVN version with includes this
79 matches
Mail list logo