On Tue, 2009-12-01 at 20:54 -0800, Skylar Saveland wrote:
> Wait, this is a better question than I thought on first glance. Not
> entirely sure, sorry for the terse first response.
>
> Skylar Saveland wrote:
> > Former
> >
> > Continuation wrote:
> > > When a ModelForm object calls save(), does
I have a few novice user questions:
1. If I installed apache2 with prefork do I need to uninstall in order
to change to worker?
2. If I add the following lines to my vhost definition does this make
mod_wsgi run in daemon mode?
WSGIDaemonProcess mysite.com processes=1 threads=5 display-name=%
I use USStateField() from localflavor in one of my models:
class MyClass(models.Model):
state = USStateField(blank=True)
Then I made a form from that class:
class MyClassForm(forms.ModelForm):
class Meta:
model = MyClass
When I display the form, the field "State" is a
Wait, this is a better question than I thought on first glance. Not
entirely sure, sorry for the terse first response.
Skylar Saveland wrote:
> Former
>
> Continuation wrote:
> > When a ModelForm object calls save(), does it first clean the form
> > data using form.cleaned_data? Or do I need to
Former
Continuation wrote:
> When a ModelForm object calls save(), does it first clean the form
> data using form.cleaned_data? Or do I need to call form.cleaned_data
> explicitly?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
Also, tried easy_install and this is what happens:
sudo easy_install MySQLdb
Password:
Searching for MySQLdb
Reading http://pypi.python.org/simple/MySQLdb/
Couldn't find index page for 'MySQLdb' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading
Gene,
That link / URL you sent me redirects to the Zope MySQL Adapter (same
one I was using)...
Thanks for the e-mail,
James
On Tue, Dec 1, 2009 at 7:35 PM, Gene wrote:
> You may have the wrong package- ZMySQLDA is an adapter for zope.
>
> I believe you want this
>
You may have the wrong package- ZMySQLDA is an adapter for zope.
I believe you want this
http://sourceforge.net/projects/mysql-python/files/mysql-python-test/1.2.3c1/MySQL-python-1.2.3c1.tar.gz/download
If you run into problems installing it, you may need to grab the
current release from
Okay, figured this one out, too. If anyone comes across the same
problem, read this:
http://2tbsp.com/content/install_and_configure_mysql_5_macports
On Dec 1, 4:47 pm, Dave wrote:
> Okay, I figured out this problem by editing my PYTHONPATH in
> my .bash_profile, but now I
No normally I can use something lie /foo/edit/35/ and I can edit the
record whose pk is 35. Now with this, I have a url pattern like
(r'^edit/(?P\d+)/$', 'edit'), which points to def edit
(request, ssf_id): in my views.py.
For my formwizard, by overriding various methods I have successfully
made
When a ModelForm object calls save(), does it first clean the form
data using form.cleaned_data? Or do I need to call form.cleaned_data
explicitly?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
On Dec 2, 12:02 pm, neridaj wrote:
> During development I had my project apps in the same directory that
> django-admin.py startproject mysite created. I would now like to have
> my apps in a global directory, django-apps, to be used in other
> projects. I thought this was
This is mhy laptop so I'm not bothered about where the code is stored.
If it goes live it'll be correctly located/secured etc.
Thanks
On Dec 1, 5:03 pm, Skylar Saveland wrote:
> I thought that it was best practice to not put python code in /var/www
> and to own the
On Tue, Dec 1, 2009 at 7:56 PM, notcourage wrote:
> Is there a way to force django to show the full traceback? It only
> shows the following though the query is called from the view home(req)
> in my views.py:
>
> Traceback:
> File
During development I had my project apps in the same directory that
django-admin.py startproject mysite created. I would now like to have
my apps in a global directory, django-apps, to be used in other
projects. I thought this was what the PYTHONPATH environment variable
was for, do I need to add
Is there a way to force django to show the full traceback? It only
shows the following though the query is called from the view home(req)
in my views.py:
Traceback:
File "C:\swe\Python25\lib\site-packages\django\core\handlers\base.py"
in get_response
92. response =
Okay, I figured out this problem by editing my PYTHONPATH in
my .bash_profile, but now I have another problem. When I try and run
"python manage.py syncdb" I get this error: "Can't connect to local
MySQL server through socket '/opt/local/var/run/mysql5/
mysqld.sock' (2)"
Mysql is running; I have
Hello there,
I am using Python 2.6.2 on OS X 10.6 ( Snow Leopard ).
Downloaded Django 1.1.1 and installed it by issuing:
sudo python setup.py install
Which placed Django-1.1.1-py2.6.egg-info and django dir inside the
site-packages directory:
On Tue, Dec 1, 2009 at 5:09 PM, Continuation wrote:
> In the doc, F() is used to update a single field atomically in one go.
> Can I use it to update multiple fields and mixed it with non-F() field
> updates?
>
> Using the example from doc
Read Apache documentation on virtual hosts.
http://httpd.apache.org/docs/2.2/vhosts/
Graham
On Dec 2, 3:29 am, knight wrote:
> Hi,
>
> I need my django app to listen to port 80 and port .
>
> I have 2 servers. One is listening to both ports and one is not
> listening
Have a read of:
http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
In particular where it says:
"""
If you have been using the Django development server and have made use
of the fact that it is possible when doing explicit imports, or when
referencing modules in 'urls.py', to leave out
I'm using the same setup I have for another django site running on the
same server. I haven't had to use the python-path arg to WDP before so
I'm not sure how to do that. I'm still pretty new to this so any help
would be much appreciated. I'm using the same wsgi script that works
for the other
Ah, right. I had actually forgotten that the action attribute was
what was setting my url! What you said makes perfect sense, thanks!
Margie
On Dec 1, 12:50 pm, Bill Freeman wrote:
> Filter it off when you create the form action? Or in more detail,
> probably, in your view
In the doc, F() is used to update a single field atomically in one go.
Can I use it to update multiple fields and mixed it with non-F() field
updates?
Using the example from doc (http://docs.djangoproject.com/en/dev/ref/
models/instances/#updating-attributes-based-on-existing-fields)
Can I do
I thought that it was best practice to not put python code in /var/www
and to own the code with an unprivileged user. Doesn't seem like it
is necessarily germane to the present topic but perhaps something to
think about.
Am I wrong? Are there exceptions? I think I have seen some high
profile
Are you using python-path arg to WDP? Also, you might do some
sys.path hacking in the .wsgi script.
neridaj wrote:
> Hello,
>
> I'm trying to deploy my project to my server and I don't understand
> why django isn't finding modules I've added to my pythonpath. When I
> try to access my site I get
Hello,
I'm trying to deploy my project to my server and I don't understand
why django isn't finding modules I've added to my pythonpath. When I
try to access my site I get 500 errors and after looking at the server
log I see a traceback with this:
[error] [client 174.xxx.xxx.xxx] ImportError: No
Filter it off when you create the form action? Or in more detail,
probably, in your view
function, create a copy of the url with such stuff removed, easy to do
with python
string manipulations, or maybe just use reverse on the view function
itself, and pass
that as, say, form_action, and in your
Maybe, but the template seems like a bad place to do that. Why not
create a derived widget with your custom tweaks in it, and use it for
appropriate fields?
Or are you introspecting someone else's code that you don't want
to customize?
On Tue, Dec 1, 2009 at 2:14 PM, Jon
I have a scenario where I have redirected the user to a particular
url, something like:
http://www.example.com/taskmanager/edit_task/5#comment_4
In other words, they are viewing a particular comment associated with
task 5. This comment is say a page or two down (ie, scrolled down)
from the top
John,
Thanks for the response.
I don't think Q objects will work, since I need to do the fullsearch,
and I'm pretty sure that has to go in .extra().
Also, I think Django would create a query with the joins, which are much
slower than the UNION query.
Somebody must have encountered this situation
I'm trying to figure out how to determine a model form field's widget
type from the template.
I would like to loop through the fields as opposed to writing out each
field explicitly in the template, but in order to loop through them, I
need to know the widget type so I can do something special
On Dec 1, 9:29 am, Johan wrote:
> Hi,
>
> I have two oracle schemas created with the same characterset
> (NLS_CHARACTERSET = WE8ISO8859P1).
>
> I get a "DatabaseError: ORA-12704: character set mismatch" when doing
> this:
> 1) dumpdata to export data from a module
On Tue, Dec 1, 2009 at 12:53 PM, Brian Neal wrote:
> On Dec 1, 10:56 am, Bill Freeman wrote:
>> > I then created my own template file in one of my TEMPLATE_DIRS called
>> > 'admin/custom_index.html" that extends 'admin/index.html'. I ended up
>> > copying the
Hi Ken, thanks for your response,
I get the exact same results as you,
.py=Python.File and Python.File="C:\Python25\python.exe" "%1" %*
Thanks,
Rodrigo
On Dec 1, 11:49 am, Ken MacDonald wrote:
> Hi,
> Check this out - on my XP system anyway (understand it hasn't changed
This:
sys.path.append("/var/www/sites/indigo/")
os.environ['DJANGO_SETTINGS_MODULE'] = 'indigo.settings'
from django.core.management import setup_environ
import settings
project_directory = setup_environ(settings)
And here is the Postgresql log file for the same "polls" screens.
Same select as in debug_toolbar
It seems, such thing like a connection pool does not exists by default
(every time connection is initialized)
Is it just a setting in Django or in the psycopg2 ?
On Dec 1, 10:56 am, Bill Freeman wrote:
> > I then created my own template file in one of my TEMPLATE_DIRS called
> > 'admin/custom_index.html" that extends 'admin/index.html'. I ended up
> > copying the {% block content %} from the admin/index.html and
> > inserting my
Argh! Taking this a step further - I'm now trying to access my Django
environment from within a Trac (http://trac.edgewall.org) plugin, but
I'm getting a similar issue.
This works:
sys.path.append("/var/www/sites/indigo/")
os.environ['DJANGO_SETTINGS_MODULE'] =
Thanks Daniel. I am working in the way just as you said.
On Dec 1, 10:21 am, Daniel Roseman wrote:
> On Dec 1, 3:53 pm, David wrote:
>
>
>
>
>
> > Hello John and Daniel, thanks for your replies. Let me tell what I
> > need in more details.
>
> > {% for
On Dec 1, 3:53 pm, David wrote:
> Hello John and Daniel, thanks for your replies. Let me tell what I
> need in more details.
>
> {% for value in data %}
> {% ifequal all_domain 1 %}
> class="odd" id="{{value.publisher}}"
On Tue, Dec 1, 2009 at 4:14 PM, Tom Evans wrote:
> Hi all
>
> We encountered a strange issue today. When a user submits a formset
> that is empty, we call is_valid() on the formset, expecting the
> clean() method to be called. We then subsequently get errors later on,
>
>
> I then created my own template file in one of my TEMPLATE_DIRS called
> 'admin/custom_index.html" that extends 'admin/index.html'. I ended up
> copying the {% block content %} from the admin/index.html and
> inserting my template tag into it.
I, too, think you're going the right way. One
2009/12/1 Tom Evans :
> On Tue, Dec 1, 2009 at 4:13 PM, Steve Howell wrote:
>>
>> On Dec 1, 3:33 am, Tom Evans wrote:
>>> On Tue, Dec 1, 2009 at 7:33 AM, Steve Howell wrote:
>>> > Just following up on
Hi,
I have two oracle schemas created with the same characterset
(NLS_CHARACTERSET = WE8ISO8859P1).
I get a "DatabaseError: ORA-12704: character set mismatch" when doing
this:
1) dumpdata to export data from a module named log in the first schema
and then
2) loaddata to import the result into
Hi,
I need my django app to listen to port 80 and port .
I have 2 servers. One is listening to both ports and one is not
listening to .
The first one's apache conf is:
Listen
WSGIRestrictStdout Off
WSGIPassAuthorization On
LoadModule wsgi_module modules/mod-wsgi.so
WSGIScriptAlias
On Tue, Dec 1, 2009 at 4:13 PM, Steve Howell wrote:
>
> On Dec 1, 3:33 am, Tom Evans wrote:
>> On Tue, Dec 1, 2009 at 7:33 AM, Steve Howell wrote:
>> > Just following up on this a few days later, in case it got lost in the
>> >
Hi all
We encountered a strange issue today. When a user submits a formset
that is empty, we call is_valid() on the formset, expecting the
clean() method to be called. We then subsequently get errors later on,
because the formset did not call self.clean(), and therefore it did
not populate the
On Dec 1, 3:33 am, Tom Evans wrote:
> On Tue, Dec 1, 2009 at 7:33 AM, Steve Howell wrote:
> > Just following up on this a few days later, in case it got lost in the
> > shuffle due to the weekend and U.S. holiday.
>
> > On Nov 27, 2:18 pm, Steve
A not so dirty trick:
{% with inline_admin_formsets.0 as inline_admin_formset %}
{% include inline_admin_formset.opts.template %}
{% endwith %}
> To insert inlines between two form fields I made this dirty trick:
>
>
> {% for inline_admin_formset in inline_admin_formsets %}
>
On Nov 30, 10:38 am, David Zhou wrote:
> On Sun, Nov 29, 2009 at 9:18 PM, digicase
> wrote:
> > I received a good email From Remi at WF which told me all I needed to
> > know. The outage was unacceptable but hopefully lessons have been
> >
Hi all:
I wrote the sources below:
from django.views.debug import ExceptionReporter
def recordErrorPage(R, **kw):
if kw.has_key('exc_info'):
reporter = ExceptionReporter(R, *kw['exc_info'])
bug_html = reporter.get_traceback_html()
# bug_html is
After much digging, I discovered that I cannot iterate over a
forms.ModelMultipleChoiceField.
This explains the template iteration issue.
It seems like I need a FormSet to be able to set these values, and
iterate over them.
This is overly complicated, just for a set of checkboxes, but it looks
Hello John and Daniel, thanks for your replies. Let me tell what I
need in more details.
{% for value in data %}
...
{% endfor %}
Here "showDomain(...)" is ajax. There are many lines of records on the
webpage. If I click a line, then just below this line it shows
> Caching isn't the issue here, it's a matter of writing the queries
> properly. Yes, select_related will help.
Well, I tried select_related but without success.
It would be good to see an example...
--
You received this message because you are subscribed to the Google Groups
"Django users"
Hi DR,
Thank you very much! It works now. I will check the doc about the
difference of the queryset and instance. Anyway, thanks a lot!
2009/12/1 Daniel Roseman
> On Dec 1, 3:24 pm, 邓超 wrote:
> > Hi all,
> > I'm writing a small app, and get an
On Dec 1, 1:57 pm, stargazer wrote:
> Hi all,
>
> I'm trying the famous Django
> tutorial:http://docs.djangoproject.com/en/1.1/intro/
>
> Playing with "polls" and "choices" I see lot of SQL queries this
> application creates. Actually, I just selected a list of polls
>
On Dec 1, 3:24 pm, 邓超 wrote:
> Hi all,
> I'm writing a small app, and get an error when trying to update the
> object, the error message is
>
> 'QuerySet' object has no attribute '_meta'. and It shows that I made
> some mistake on this line:
> form = ProjectForm(instance =
Hi all,
I'm writing a small app, and get an error when trying to update the
object, the error message is
'QuerySet' object has no attribute '_meta'. and It shows that I made
some mistake on this line:
form = ProjectForm(instance = projectInstance). But I don't know where
am I wrong. The below
http://pyamf.org/wiki/DjangoHowto
On Nov 30, 10:55 am, Rafael Vieira wrote:
> Good afternoon people,
>
> I am starting with pyAmf framework, and I have questions about how to
> integrate models of Django with RemoteObjects of FLEX;
--
You received this message because
Hi,
Check this out - on my XP system anyway (understand it hasn't changed much
for W7) use the 'assoc' and 'ftype' commands to find out what ".py" is doing
on your system. It should look something like this, except for file paths
appropriate for your system. If your ftype is messed up (missing the
Hi all,
I'm trying the famous Django tutorial:
http://docs.djangoproject.com/en/1.1/intro/
Playing with "polls" and "choices" I see lot of SQL queries this
application creates. Actually, I just selected a list of polls
than selected the poll with ID=2, than voted for a choice.
Here are details
2009/12/1 rebus_ :
> I hope this casts some light on what i am trying to say.
> Anyway, the best way is to read docs and look in django code. Sorry i
> can't help more.
You helped a lot. Thank you.
Greets,
--
Kai Timmer | http://kaitimmer.de
Email : em...@kaitimmer.de
models.py
=
from django.db import models
class Country(models.Model):
name = CharField(max_length=70)
def __unicode__(self):
return '%s' % (self.name)
admin.py
=
from django.contrib import admin
from your_app.models
On Mon, 2009-11-30 at 16:36 -0800, Nev wrote:
> Hey,
>
> Today I did a bunch of searching and reading to find what is the best
> way to have flatpages presented in multiple languages. Flatpages
> apparently don't support internationalization and I went down several
> avenues looking for the
2009/11/30 Kai Timmer :
> 2009/11/29 rebus_ :
>> I imagine some of core devs or django gurus would maybe have better
>> ideas on how to do this (or can even tell you if this is documented
>> somewhere).
> What i wonder is: Isn't this a fairly common thing? I
Thanks for the response.
Doing some more tests python programs do work, they just seem to not
recieve sys.argv. The results of calling "manage.py runserver" is the
same as calling just "manage.py". Other simple scripts bear this out.
Thanks,
Rodrigo
On Dec 1, 6:32 am, John M
On Tue, Dec 1, 2009 at 7:33 AM, Steve Howell wrote:
> Just following up on this a few days later, in case it got lost in the
> shuffle due to the weekend and U.S. holiday.
>
> On Nov 27, 2:18 pm, Steve Howell wrote:
>> I am wondering if there is a style
Thanks for the many, great answers!
First off I'm not surprised that I'm not the first with the idea, but
I'm surprised that there are so many projects running, trying to clone
SO.
Does anyone have experience with SOclone and Co.? I'll be trying it/
them tonight, and see what they're like...
having a different admin site instance won´t help you much with this
issue. I´d say ... go with what you have. if someday you need to
customize the admin-site, create your own admin site or even subclass
djangos AdminSite.
regards,
patrick
On 1 Dez., 03:52, Brian Neal wrote:
Even though it is outside the scope, I'd say start simple and build
slowly with related tables, those are easy to add to a system. I'd
probably find the attributes you'd like to capture in the 'extra
details' and start putting them in a table. Determine what the
purpose of these attributes are,
On Dec 1, 5:42 am, David wrote:
> Hello,
>
> In my template file I have
>
> {% for value in data %}
> {% ifequal all_domain 1 %}
> class="odd" id="{{value.publisher}}"
> "showDomain('{{value.publisher}}',
Sounds like the .py extension isn't seen as using python, should be an
easy fix. Check your file associations (where they are in Win7) I'll
have to find at work tomorrow, but that should fix your issue.
Or, it could be some new security scheme that MS has come up with to
not allow associations
I think you're confusing Templates and HTML in this one, the for loop
is just a construct while the template is constructing the final HTML
code, not executing the HTML alongside the template? Does that
help?
I think you'll need to look at custom filters
I'm not sure a Manager is what you want, what about Q(http://
docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-
q-objects) objects? I've used them before and I think it's about what
you'd need. As for performance, not sure how they stack up
On Nov 30, 2:45 pm, Info Cascade
I would be easier to see it as a django table, but you'll need to
checkout the distinct() feature of the queryset
http://docs.djangoproject.com/en/dev/ref/models/querysets/#distinct
But yes, I'd say it's possible.
J
On Nov 30, 4:10 pm, Ali Rıza Keleş wrote:
> Hi all,
>
> 1) Is it possible to realize my idea with Django, managing the traffic
load for 2.000+ user?
The precise question you asked is answered by the Django BDFL, right there
on Stackoverflow:
http://stackoverflow.com/questions/886221/does-django-scale/1739974#1739974
In summary, "Yes, it is possible
hi,
i didnt work on that yet but i will in the next weeks because ill need
the content translated on flatpages.
wouldnt it be easier to subclass the flatpages model or to get the
flatpages package and make the modifications there to get a
custom_flatpages app?
im thinkin that because im already
78 matches
Mail list logo