Hi ppl,
Im working on a small web-app using django. The problem is.. the
database operations are too slow. I think it may be because django
makes a new connection and authenticates etc.. to the db everytime it
wants something..Is there some way i can make django use a single
connection throughout
Look at /etc/ld.so.conf and "man ldconfig".
> When I reinstall psycopg 1 or 2 (properly configured with my lib path /
> usr/local/pgsql/lib/),
> it works (no error at the install of psycopg)
>
> but then it can't find this damn lib !
>
> --
On 7/9/07, Santhosh <[EMAIL PROTECTED]> wrote:
> Im working on a small web-app using django. The problem is.. the
> database operations are too slow. I think it may be because django
> makes a new connection and authenticates etc.. to the db everytime it
> wants something..Is there some way i can
On 7/9/07, Santhosh <[EMAIL PROTECTED]> wrote:
> I think it may be because django
> makes a new connection and authenticates etc..
Django uses one database connection per request.
> terminate the connection only when i
> want it to..
Not easily, no.
Turn on debug, and check how many queries are
On 7/6/07, uxmal <[EMAIL PROTECTED]> wrote:
> using psycopg :
> Error loading psycopg module: libpq.so.5: cannot open shared object
> file: No such file or directory
PostgreSQL's libraries often install into a location where the default
ld configuration won't find them; locate the PostgreSQL 'li
AroundWord_ is a free and open Blog Publishing System built on Python
using the most advanced technologies:
* Framework: Tesla upon Pylons
* Database Engine: SQLAlchemy + Elixir + SAContext
* Templates: Mako
* Widgets and Forms: ToscaWidgets + twForms + FormEncode
* Authorization and Authenticati
Hi!
I have to show two identical forms in a page, so I used form_for_model
and I created two form objects.
I don't need to show a particular field, so i tried to remove it this
way:
def showtwoforms(request):
PreventivoForm = form_for_model(Preventivo) #'Preventivo' is the
model
f = Prev
Do this instead:
PreventivoForm = form_for_model(Preventivo)
del PreventivoForm.base_fields['codice']
f = PreventivoForm()
f2 = PreventivoForm(auto_id='id_%s2')
Nathan Ostgard
On Jul 9, 2:33 am, ilDave <[EMAIL PROTECTED]> wrote:
> Hi!
> I have to show two identical forms in a page, so I us
I have to remove the field from the object class and not from the
class instance...
Thanks!
On Jul 9, 12:52 pm, Nathan Ostgard <[EMAIL PROTECTED]> wrote:
> Do this instead:
>
> PreventivoForm = form_for_model(Preventivo)
> del PreventivoForm.base_fields['codice']
> f = PreventivoForm()
> f2 = Pr
On 7/9/07, ilDave <[EMAIL PROTECTED]> wrote:
>
> Hi!
> I have to show two identical forms in a page, so I used form_for_model
> and I created two form objects.
...
> What am I missing?
Try form_for_model(MyModel, fields=('field1','field2')). That will
generate a form for MyModel that only contain
Thanks Leif! I'll try to play around with the radio widget today. The
question about defaults was more simple. Formerly I had a model class
with default="0.0" or default=datetime.date.today() How do I reproduce
that with newforms-admin? Is there any easier way to provide initial
values (that's wha
Jeremy Dunck wrote:
> On 7/8/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
>> Right look, wrong source. My {{object}} is the results of a calendar display
>> with a bunch of these: http://dell29:8000/eventcal/detail/600/
>
> I seriously doubt "dell29:8000" is resolvable for me. :)
actually it wa
I read this on the documentation, but I'm usinge the 0.96 versione,
non the development one, so I can't use it...
But Nathan's method worls well :)
On Jul 9, 1:04 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 7/9/07, ilDave <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi!
> > I have to show
Hi,
You can specify a custom css class in fields attribute in admin
options:
http://www.djangoproject.com/documentation/model-api/#admin-options
Eg.:
fields = (
('Advanced', {
'classes': 'mycustomcssclass',
'fields': ('url', 'title', 'content', 'sites'),
})...
(this also wor
On 5 Jul., 17:39, "Emanuele Pucciarelli <[EMAIL PROTECTED]>"
<[EMAIL PROTECTED]> wrote:
> My guess is that if you import ugettext, then you should supply a
> Unicode string as an argument:
>
> def index(request):
> teststring = _(u"Lösung")
> [...]
>
> (notice the 'u' before the string).
>
The World's First,Free & Largest Collection of the Applications &
Softwares, Audio,Video & Miscellaneous Conerters , Audio,Video &
Miscellaneous Splitters, Games, Themes, Screen Savers, Wallpapers,
Secret Codes, Video+Audio+MP3+AMR+MIDI+MMF+Polyphonic+Monophonic+True
Ringtones, 3GP+AVI+MP4+Funny
The World's First,Free & Largest Collection of the Applications &
Softwares, Audio,Video & Miscellaneous Conerters , Audio,Video &
Miscellaneous Splitters, Games, Themes, Screen Savers, Wallpapers,
Secret Codes, Video+Audio+MP3+AMR+MIDI+MMF+Polyphonic+Monophonic+True
Ringtones, 3GP+AVI+MP4+Funny
Hello all!
Is there an easy way to fake the request path in django and/or pyton?
I'm looking for something like this:
a django page which is called with this URL:
http://www.test.ch/test1/test2/test3
should thinks it is run in the top-folder that means: http://www.test.ch
I need that because I
Hi.
I am using apache 2.0 + fastcgi
When I used method=prefork in fastcgi method, i found a strange
bahviour - sometimes application response with untranslanted string
(especially from models.py). On method threaded everything is ok -
without stability - server hangs during heavy load.
Any idea
Ok, I upgraded to the development version of django and that didn't
help. I then started to try and trim out the code so it was of a more
manageable size to post here. It's still rather large but if it helps
anyone visualize what I'm talking about, here it is:
## test_indexs.html
Take the Test
Hi all, this is my second help request in the ML, sorry i i'm wrong
with something!
I have a question:
Suppose i need a db table named "users".
Now, this table should be used by 2 aplication of my site: "forum" and
"Manage".
How can i do it? I mean, where i define the table in "Forum" or in
"Man
Hi Folks.
I've looked through the docs (which are pretty godd by the way) and
the source code, but it look as it's not easy to customize the
tag that goes along with a widget.
When instantiating a widget I can pass the attrs dict and those
properties will be rendered as html attributes. But th
Hello everyone, using newest django trunk as of today
I've written a save overide in my models file to textile the entries,
here's the bit of that code I'm having trouble with.
def __unicode__(self):
return self.title
def save(self):
if self.summary:
example:
apps/manage/models.py
from django.db import models
from your_project.apps.models import Forum
class ForumManager(models.Model):
forum models.ForeignKey(Forum)
... and so on
but model Forum will be in
apps/forum/models.py
Haku writes:
> Hi all, this is my second help request in
mistype
from your_project.apps.forum.models import Forum
KpoH пишет:
> example:
>
> apps/manage/models.py
>
> from django.db import models
> from your_project.apps.models import Forum
>
> class ForumManager(models.Model):
> forum models.ForeignKey(Forum)
> ... and so on
>
> but model Foru
[EMAIL PROTECTED] wrote:
> Hello all!
>
> Is there an easy way to fake the request path in django and/or pyton?
> I'm looking for something like this:
> a django page which is called with this URL:
> http://www.test.ch/test1/test2/test3
> should thinks it is run in the top-folder that means: htt
Ok, thank you KpoH!
This is cool!
Haku
On 9 Lug, 17:15, KpoH <[EMAIL PROTECTED]> wrote:
> mistype
>
> from your_project.apps.forum.models import Forum
>
> KpoH пишет:
>
>
>
> > example:
>
> > apps/manage/models.py
>
> > from django.db import models
> > from your_project.apps.models import Forum
ok, I've done a bit more troubleshooting and it seems the problem isn't in
the models.py, it's in the edit_event function.
in there I'm defining things like this
e.summary = cleaned_data['summary']
If I encode that bit like this now
e.summary = cleaned_data['summary'].encode('utf-8')
the probl
I am looking to attach a profile to the Django user object based on
the b-list article, and had a question regarding saving models.
Does/ should the profile be automatically saved at the same time the
User model is saved? e.g. if I call a save on the user object, and
i've got the AUTH_PROFILE_MOD
On 7/9/07, Chris Kelly <[EMAIL PROTECTED]> wrote:
> Or do I have to manually manage saving both objects when making a
> change? If so, what's the preferred way to do this? by managing the
> profile via the user object, or by managing the user object via the
> profile (overriding the profile save m
I think I need some way of asking what the current stream I'm getting is
formatted in.
I've found a way around it now, with a combination of
if isinstance(self.summary,basestring):
and
if isinstance(self.summary,unicode):
I'm sure I must be doing something wrong here, it seems I'm switc
I'm trying to use unique_for_year but it seems the Admin simply
ignores this constraint:
i'm using this model for testing and I'm able to add two entry with
the same date:
class MyModel(models.Model):
class Admin:
pass
mydata = models.DateField()
myfield =
Ok. That's what I thought, but just wanted to make sure I wasn't
missing something somewhere. Wasn't sure if this was a special case,
as the AUTH_PROFILE_MODULE is used for get_profile, perhaps it was
used to save/ sync the models.
Thanks again!
-C
On Jul 9, 11:58 am, "James Bennett" <[EMAIL PR
Hi Allen,
The RadioSelect widget is actually one of the more complicated ones in
newforms. Its render method returns a RadioFieldRenderer object, which
in turn utilizes the RadioInput widget. The problem with using a
RadioSelect widget in newforms-admin is that the template is expecting
each widg
Hey all --
I've run into an unexpected situation, but feel it may be due more to
my inexperience than any innate weirdness. Perhaps someone can
explain?
I'm running Django 0.95 on Apache 2.0, using mod_python 3.3.1, and I
use SSH to connect to my server. After a few days of shuffling and
cursi
Hi Allen,
The RadioSelect widget is actually one of the more complicated ones in
newforms. Its render method returns a RadioFieldRenderer object, which
in turn utilizes the RadioInput widget. The problem with using a
RadioSelect widget in newforms-admin is that the template is expecting
each widg
> I'm running Django 0.95 on Apache 2.0, using mod_python 3.3.1,
> and I use SSH to connect to my server. After a few days of
> shuffling and cursing and fiddling, I've got everything
> running nicely: apps work, dbs work, templates work, css
> works. But, I've found that when I make CSS changes
Even with generic views, you have custom templates. For anything in
the template, first {% load i18n %} and then follow the instructions
for internationalizing the text on the template.
If it's something coming from your inside model, there's really no
option for internationalizing that data asid
Where are you getting stuck? I assume you it works - it's just a
matter of getting the pieces/parts installed.
-joe
On 7/8/07, surfwizz <[EMAIL PROTECTED]> wrote:
>
> I am having trouble installing Django on Mac OSX 10.4.10. Any help
> would be welcome. Thanks!
>
>
> >
>
--~--~-~--~--
> The results of the above telnet
> *should* (on a compliant proxy) leak a little info about the
> proxy server in the HTTP headers.
Got it! Thanks -- I looked at the HTTP header for the CSS file, and
'Vary' was set to 'cookie'. Cleared cookies in my browser (not a
default when clearing cache
Hi, I am using ajax tabbed browsing to load up pages. When a user
uploads a file, I want a new tab to open up, which can normally be
done by calling a javascript function. The problem is I don't know how
to return a javascript command in my view.
Right now I am trying;
return
render_to_response(
Filippo Santovito wrote:
> I'm trying to use unique_for_year but it seems the Admin simply
> ignores this constraint:
> i'm using this model for testing and I'm able to add two entry with
> the same date:
>
> class MyModel(models.Model):
> class Admin:
> pass
> myd
Hello,
I am currently in the process of porting one of my oldforms-based app
to use newforms. I have some blocks of code that use
AddManipulator/ChangeManipulator methods. My question is, when
oldforms is eventually removed, will AddManipulator/ChangeManipulator
get removed too?
Thanks in advanc
I think you meant to escape those single-quotes in your js call:
return
render_to_response('javascript:AjaxTabs.OpenTab(getUniqueId("tab_page"),"Success","html/
test.html",true,\'\')', {'generic': file })
Rishtastic wrote:
> Right now I am trying;
> ...
> return
> render_to_response('javascript
Jeremy Dunck wrote:
> On 7/8/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
>> Right look, wrong source. My {{object}} is the results of a calendar display
>> with a bunch of these: http://dell29:8000/eventcal/detail/600/
>
> I seriously doubt "dell29:8000" is resolvable for me. :)
http://calenda
Thanks for the code, I'll give it a shot.
As for initial values, I'm thinking about the add form. I'm sorry, I
should have said.
On Jul 9, 1:23 pm, leifbyron <[EMAIL PROTECTED]> wrote:
> Hi Allen,
>
> The RadioSelect widget is actually one of the more complicated ones in
> newforms. Its render m
Hi Guys
I am a relative newcommer to the Django world (a couple of months), so this
is my first post to the list. Let me first say how quickly I fell in love
with the power and flexibility of Django. Keep up the good work.
I have a question however. While trying to interface with an existing S
I had trouble running the install as per the instructions (using
terminal), so I just ran setup.py in IDLE as a module. Is there a way
to fix this, or get this install running properly?
On Jul 8, 10:27 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 7/9/07, surfwizz <[EMAIL PROTECTED]>
Hi Djangees,
I'm trying to use Genshi templating system with Django but I'm stuck
with unicode.
I have a db in MySQL 5.0.38 (MySQLdb 1.2.2), the db has encoding
utf8_unicode_ci, the table I'm reading data from has the same encoding
and even the appropriate fields are in utf8_unicode_ci.
The adm
On 7/9/07, Daniel Kvasnicka jr. <[EMAIL PROTECTED]> wrote:
>
...
> Django dies with:
>
Dies with... what?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to d
Hi Djangees,
I'm trying to use Genshi templating system with Django 0.96 but I'm
stuck with unicode.
I have a db in MySQL 5.0.38 (MySQLdb 1.2.2), the db has encoding
utf8_unicode_ci, the table I'm reading data from has the same encoding
and even the appropriate fields are in utf8_unicode_ci.
Th
On Jul 9, 11:14 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On 7/9/07, Daniel Kvasnicka jr. <[EMAIL PROTECTED]> wrote:
>
>
>
> ...
> > Django dies with:
>
> Dies with... what?
Sorry, accidentally pressed Enter ;-)
--~--~-~--~~~---~--~~
You received this messa
Hi all,
Quick question. Is there any way to add a verbose name for one of
my apps? I have an app named my_transfers and in the admin index view
it displays it as
My_Transfers
---
-model 1
-model 2
-blah blah blah... etc
A minor point =).
Thanks in advance.
Chris
On 7/9/07, Daniel Kvasnicka jr. ...
> stream = loader.load('index.xml').generate(
> types =
> AdSpaceType.objects.all(),
...
> UnicodeDecodeError at /
> 'ascii' codec can't decode byte 0xc5 in position 1: ordinal not in
> range(1
On Jul 9, 11:25 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On 7/9/07, Daniel Kvasnicka jr. ...
>
> > stream = loader.load('index.xml').generate(
> > types =
> > AdSpaceType.objects.all(),
> ...
> > UnicodeDecodeError at /
> >
> Quick question. Is there any way to add a verbose name for
> one of my apps? I have an app named my_transfers and in the
http://www.djangoproject.com/documentation/model-api/#verbose-name
Use the verbose_name of the Meta class:
class MyModel(Model):
...
class Meta:
verbose_na
Mentioned this on IRC, but just for the record here as well: It's
likely that the patch wouldn't be applied so long as it affects only
one backend - fields have to be consistent across all of them (partial
is /not/ better in cases like that). :)
On Jul 9, 1:47 pm, Peter Nixon <[EMAIL PROTECTED]>
Hello all,
I just sync my django with the latest SVN version to try the Unicode
branch. Previously I was running Django 0.96pre.
I have now an issue with reverse url.
Here is for exemple my urls.py
urlpatterns = patterns('',
(r'member/status(?P\d+)/(?P\d+)/$',
'app.views_admin.member_li
> Quick question. Is there any way to add a verbose name for
> one of my apps? I have an app named my_transfers and in the
> admin index view
Ah...I missed that it was the *app* not the Model that you were
looking for.
According to django/contrib/admin/templates/admin/index.html
you want to
OK. Agreed. By partial, I meant support for "standard" BIGINT and not the
MySQL specific unsigned extension.
I will have a stab at implementing for Postgresql and sqllite and see how it
goes.
Cheers
On Tue 10 Jul 2007, Collin Grady wrote:
> Mentioned this on IRC, but just for the record here
I'm using an activex control that loads data with xml via javascript.
I have no problem using django to build my xml file when I'm testing
examples with static information. The problem comes in when I want to
pass dynamic information to the xml generated view. For example, here
is a template cal
Unless the object supports post params, that's not possible. You have
to submit the data through the XML request, you can't just hijack it
from the other.
The only other option I can see is if you do something like shoving
everything in request.session and reading that in the other page.
On Jul
It sounds like you're barking up the wrong tree ;) "faking" a request
path on django's side would not alter your template links one iota, so
they'd still be bad :)
On Jul 9, 7:03 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hello all!
>
> Is there an easy way to fake the request path in
Cool thanks,
Yeah I was didn't think there was a meta class for the app names.
I'll go fiddle around with it.
Chris
On Jul 9, 3:23 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
> > Quick question. Is there any way to add a verbose name for
> > one of my apps? I have an app named my_transfers and
On 7/9/07, Daniel Kvasnicka jr. <[EMAIL PROTECTED]> wrote:
> >>> x[0].name.__class__
>
>
> I'll probably try SVN, but dunno about my hosting provider...
It looks like you could prepend your python path to force a local
Django to be used:
http://modpython.org/live/current/doc-html/dir-other-pp.ht
Since you haven't got an answer yet...
I'm not a project developer, so I can't say what their intentions are,
but having worked extensively using oldforms and recently using
newforms, I doubt very much that the Manipulator framework will hang
around for anything other than temporary backward compa
Arthur,
You'll probably find this of interest:
http://groups.google.com/group/django-developers/browse_thread/thread/38dd8e4e11f055e8
Cheers,
Leif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
Hi,
Actually this project has already been refactored to use newforms and
as I was reviewing it lately I spotted several methods in my views
where AddManipulator was called. I remember I paid no mind to those
calls since I figured these "magic" methods were part of the model
spec and not part of
> It would be good if the a Django core developer could confirm its
> removal in 1.0 though. There are quite a lot of methods calling
> AddManipulator for slightly different purposes and rewriting them.
"django.newforms is new in Django's 0.96 release, but, as it won't be
new forever, we plan to
進入參觀-XYZ軟體小站
http://xyz22.com
CQC0103 Sisulizer Enterprise v1.5.12 繁體中文正式版(視化編輯工具翻譯文本)
CQC0102 Compuware DevPartner for Visual C Plus Plus BoundsChecker
Suite v8.2 英文正式版(程
式調試工具)
CQC0101 TestLog v3.0.1008 英文正式版(綜合測試案例的關係系統軟體)
CQC0100 NuSphere PhpED v5.0 英文正式版(編程開發軟體)
CQC0099 Heaventools PE Explor
進入參觀-XYZ軟體小站
http://xyz22.com
CQC0103 Sisulizer Enterprise v1.5.12 繁體中文正式版(視化編輯工具翻譯文本)
CQC0102 Compuware DevPartner for Visual C Plus Plus BoundsChecker
Suite v8.2 英文正式版(程
式調試工具)
CQC0101 TestLog v3.0.1008 英文正式版(綜合測試案例的關係系統軟體)
CQC0100 NuSphere PhpED v5.0 英文正式版(編程開發軟體)
CQC0099 Heaventools PE Explor
進入參觀-XYZ軟體小站
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For
進入參觀-XYZ軟體小站
http://xyz22.com
CQC0103 Sisulizer Enterprise v1.5.12 繁體中文正式版(視化編輯工具翻譯文本)
CQC0102 Compuware DevPartner for Visual C Plus Plus BoundsChecker
Suite v8.2 英文正式版(程
式調試工具)
CQC0101 TestLog v3.0.1008 英文正式版(綜合測試案例的關係系統軟體)
CQC0100 NuSphere PhpED v5.0 英文正式版(編程開發軟體)
CQC0099 Heaventools PE Explor
進入參觀-XYZ軟體小站
http://xyz22.com
CQC0103 Sisulizer Enterprise v1.5.12 繁體中文正式版(視化編輯工具翻譯文本)
CQC0102 Compuware DevPartner for Visual C Plus Plus BoundsChecker
Suite v8.2 英文正式版(程
式調試工具)
CQC0101 TestLog v3.0.1008 英文正式版(綜合測試案例的關係系統軟體)
CQC0100 NuSphere PhpED v5.0 英文正式版(編程開發軟體)
CQC0099 Heaventools PE Explor
Rebuilding apache doesn't help
# python
Python 2.5.1 (r251:54863, Jun 28 2007, 13:12:40)
[GCC 3.4.6 [FreeBSD] 20060305] on freebsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> import md5
>>> import _md5
Traceback (most recent call last):
File "", line 1, in
Impor
On Jul 9, 11:25 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On 7/9/07, Daniel Kvasnicka jr. ...
>
> > stream = loader.load('index.xml').generate(
> > types =
> > AdSpaceType.objects.all(),
> ...
> > UnicodeDecodeError at /
> >
On 7/10/07, surfwizz <[EMAIL PROTECTED]> wrote:
>
> I had trouble running the install as per the instructions (using
> terminal), so I just ran setup.py in IDLE as a module. Is there a way
> to fix this, or get this install running properly?
I don't know how to put this more clearly.
Django wor
Every time I think I understand string encoding I get reminded that I
don't.
I have a simple form where I can cut and paste in a value with an
"interesting" character in it (e.g. "Foo(r)" - in case that doesn't come
thru that's "F" "o" "o" followed by a registered trademark symbol).
It gets store
Are You Struggling To Make Money Online?
Do you wish there was an easier way to make money online? Of course we
all do. But while there are dozens of ways to make money online, still
95% of those starting up internet businesses fail.
One of the easiest ways to make money online is selling digita
Hi,
I am Sreelatha I have struck up at one place please help me out.
The problem is I want to send a single message to multiple users but I
dont want to save the message to all the users which is a hectic work.
I s there any way to solve this problem.
--~--~-~--~~~---
I hope someone can help me. I'm getting the following AttributeError
when I try to do the 'current_datetime' example in the Django Book,
chapter 3. I'm using the SVN (0.97) version of Django. It's driving me
crazy that I can't get such a simple thing to work!
--- BEGIN ERROR PAGE ---
AttributeEr
Hmmm. As a last resort I replaced the SVN (0.97) version of Django
with the 0.96 version and now it seems to work fine. Very strange, but
I'm relieved to have 'fixed' it.
On Jul 9, 11:20 pm, SM <[EMAIL PROTECTED]> wrote:
> I hope someone can help me. I'm getting the following AttributeError
> wh
82 matches
Mail list logo