Hi,
On top of the package found on mysql, you have to check that mysql_config is in
the path (it is provided by the package).
In a shell just run the command.
If you just installed the mysql package for osx, you will want to open a new
shell to get an updated path.
Regards,
Xavier.
Le 16 août
Thx both for helping, I guess there isn't a straight forward solution,
I'll prob add the missing fields manually.
However I still don't get why contract_form.is_valid() doesn't return
true since contract_form still contains the correct data when viewing
in browser.
--
You received this message b
I did something similar by subclassing AdminSite and overriding the
index method. Copy the original method from contrib.admin and modify
app_list before you render the template.
It does break breadcrumbs and intermediate app pages (/admin/someapp/)
but with some shameless hackery I fixed this too:
Thanks Andy,
It might be a solution and maybe the only one as you said. I'll maybe try it
or somebody propose me this other solution:
Create a subclass of the models classes i would like to move by creating
proxy objects. It force you create sometime a large number of object but it
might less dan
Dear all,
Recently, I have developed a plugin system for my app, and I want to
register those plugins when my app boot up, this need to execute some
user defined codes (functions) in app boot procedure, I don't know
where insert my registering codes to, anyone can help?
Thank you.
--
You receiv
Dear all,
I have developed a CMS, which containing a dynamic menu. Because menu
should be displayed on every page of my site, I need to write the menu
variable into every view function against every page template, this is
very boring...
So is there some method to implement applying custom variabl
Hi,
I'm coming to django from grails, in which which I used an in-memory
hsql database for development and in my startup script I initialized
the in-memory database with some stub values/users that were inserted
everytime I started the server. This setup was really helpful in early
stage devel
Hey,
Ive a problem referencing to my "THROUGH" m2m model extra fields. I
can reference the linked model (User), but not the extra detail on the
"through-model" (listuser)
My Model definition---
User model is the built in User model.
class joblist(models.Model):
userdetail = models.ManyTo
On Aug 17, 2:36 am, Tang Daogang wrote:
> Dear all,
>
> I have developed a CMS, which containing a dynamic menu. Because menu
> should be displayed on every page of my site, I need to write the menu
> variable into every view function against every page template, this is
> very boring...
>
> So is
On 8/16/2010 9:36 PM, Tang Daogang wrote:
> Dear all,
>
> I have developed a CMS, which containing a dynamic menu. Because menu
> should be displayed on every page of my site, I need to write the menu
> variable into every view function against every page template, this is
> very boring...
>
> So
On Aug 17, 2:26 am, Tang Daogang wrote:
> Dear all,
>
> Recently, I have developed a plugin system for my app, and I want to
> register those plugins when my app boot up, this need to execute some
> user defined codes (functions) in app boot procedure, I don't know
> where insert my registering co
For an internal application, I constantly receive CSRF verification
failed" errors... most of the times when using the admin interface
It doesn't happen with the local dev version (dev http server) but
happens with the deployment version (custom port, cherokee web server)
I can only use the admin
But that filter will just give me a list of tuples with
RaidPhysicalDrive's values. I want to understand how I can include
in the list I send to my template, the *additional* values for system
name, storage name, and array name, so I can display/dump
all the info in a table. I don't want to put i
I remedied this problem by actually doing all of my work in the
save_model() method. It has all the initial data set on the model
which allowed me to check which values changed (date and/or user) and
set audits as needed.
On Aug 12, 4:06 pm, vjimw wrote:
> We have a model object (Offer) which has
Tang,
do you mean :
"How to execute some pieces of code when you launch the "runserver" command
by example" ? If this is what you mean, it's not a easy thing to do right
now. Then only way i found it possible is by using: twod.wsgi
With twod.wsgi you can use the entry points system of python and
On Aug 17, 1:57 pm, Cindy wrote:
> But that filter will just give me a list of tuples with
> RaidPhysicalDrive's values. I want to understand how I can include
> in the list I send to my template, the *additional* values for system
> name, storage name, and array name, so I can display/dump
> all
A Django Theoritical discussion point. Re-post from Webfaction forum -
more a django question than webfaction specific).
Over the weekend I had a huge number of pages/hits from one IP address
(logged via awstats). Assuming some kind of funny business I decided
to block that IP address. Two approac
Hi all,
I've just used a proxy model in my own custom application and i've just
found a small problem. Right now, to be able to create a Proxy model, i'm
force to redefine a Meta options like that:
class NewDiscount(Discount):
class Meta:
proxy = True
The problem i have is that the o
contract_form.is_valid() looks at the data that was bound to the form.
This is normally the data in request.POST. It doesn't matter what a
form's initial data happened to be. It only matters what data you POST
back to it. If someone doesn't modify the form, then the initial and
the POSTed data are
Have you done any admin template customization? If you copied a
template from django before 1.2, then upgraded, your admin template
might be missing the csrf_token template tag.
Alex
On Aug 17, 7:55 am, PieterB wrote:
> For an internal application, I constantly receive CSRF verification
> failed
This is exactly the sort of issue that celery was created to solve. It
is a task queue management system.
http://celeryproject.org/
Alex
On Aug 14, 1:28 pm, ydjango wrote:
> I have a online user initiated synchronous process which runs anywhere
> between 1-5 minutes and gives user status messag
Thanks, Steve. I'll implement this today and see what happens.
On Aug 16, 9:46 pm, Steve Holden wrote:
> On 8/16/2010 10:30 PM, Nick Tankersley wrote:> Thank you again for your
> replies. They've been full of usefull
> > information about how to clean up an otherwise pretty sloppy bit of code.
>
Maybe the ChoiceField should just be a CharField that just uses the
Select widget class? That way it won't have choices hardcoded into the
field validation. Your clean method could check that the domain is
valid.
Alex
On Aug 16, 1:39 pm, ringemup wrote:
> I have a domain search form with two fiel
Hey,
Given the models below, I want to display all jobs, but mark those of
the User that is logged in?
My Model definition---
User model is the built in User model.
class joblist(models.Model):
name=models.CharField(...)
userdetail = models.ManyToManyField(User,through='userextra
If you want the job offer of the current logged user it should be pretty
simple using a filter like that:
jobsfound.filter(userdetail__user=request.user)
But if i was you i would invert the order of these two filter like that:
jobsfound = joblist.objects.filter(userdetail__user=request.user)
job
Middleware executes with each request, so it's probably not the best
place for such a thing.
It seems like it would be a lot easier to use a normal sqlite3
database and just delete it after each run.
Also, if you have test data you'd like to reload regularly, I
recommend using a regular database,
Seems to me that "on boot up" doesn't mean anything in a shared-
nothing architecture like Django's. For example if you deploy on eg.
mod_wsgi.
You have no idea how long any particular thread or process is going to
live,
and no idea how often this "boot" code would get run.
But assuming that's OK
Ok I managed to get that working, when I start the server I get :
Django version 1.1.1, using settings 'mysite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Creating table django_admin_log
Creating table auth_permission
Creating table auth_group
Oh, that sounds like a great way to handle it. Thank you!
On Aug 17, 10:10 am, Alex Robbins
wrote:
> Maybe the ChoiceField should just be a CharField that just uses the
> Select widget class? That way it won't have choices hardcoded into the
> field validation. Your clean method could check that
Hi!
I need a model to complete a combo in my app. The models have only code and
name, but I need to translate this name.
I think about do something similar to this:
class ComboFill(models.Model):
code = models.CharField...
language = models.CharField...
name = models.CharField...
An
Paul, no it's not exactly the point. When you said some code on the boot up
it means really a piece of code shared by everyone and executed just one
time, by example, for mod_wsgi it would be when apache is starting.
That's exactly what's done in the Pylons world to be able to load some piece
of c
I have a Django App with a list of our Customer's as Models. I'm
trying to find a good way to show a list of links on one of my
templates of the 10 most recently accessed customer's. Is there any
easy django way to do this. I thought about creating a new table in my
DB, but dont really want to do t
This appears to be working. Thanks a lot Steve, I really appreciate
the help.
On Aug 17, 9:07 am, Nick wrote:
> Thanks, Steve. I'll implement this today and see what happens.
>
> On Aug 16, 9:46 pm, Steve Holden wrote:
>
> > On 8/16/2010 10:30 PM, Nick Tankersley wrote:> Thank you again for your
Hi,
What's the default transaction mode for django management commands?
Thanks
Dmitry
--
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...@googlegroups.com.
To unsubscribe from this group, send ema
Thanks Nick,
I guess I'll be passing that value, that makes sense.
I'm using a generic view to write the list page, I'll read up more on
the queries, thanks for all your help,
Wendy
On Aug 16, 9:55 pm, Nick Serra wrote:
> The_film was just sudo code. I was assuming you wanted to show
> filmmaker
Try --NOINPUT
http://docs.djangoproject.com/en/1.2/ref/django-admin/#syncdb
Shawn
--
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...@googlegroups.com.
To unsubscribe from this group, send email to
Hi,
(I also mailed the mapnik user list with this problem, not sure what the
best place is)
I have to install my geodjango app on a windows server for a specific
customer. After one day, I've almost got it working.
Remaining problem: the geo database is oracle, so apparently I need the
"g
Ah *geez* not the "bug due to typo which you can't see b/c you've been
looking at the code nonstop for way to long" problem
*headdesk* That's what I get for looking at the django tables
directly in mysql to recall the columns.
Thanks, guys. Dammit, I hate it when I do that.
So, I'm thinking
hi all and tank in advance for wasting your time; i'm very newby in
django framework
I have the following:
#views.py
...
def lista_diario(request, comm_id):
comm_list =
Commessa.objects.all().annotate(oretot=Sum('diario__ore'))
return render_to_response('commesse/lista_diario.html',
dic
I'm new to django. CSRF let me crazy!
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-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegrou
Hi guy's i want to know how pass request.user to my Form Wizard?, any
idea?
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-us...@googlegroups.com.
To unsubscribe from this group, send email to
On 8/17/2010 1:53 PM, djnubbio wrote:
> hi all and tank in advance for wasting your time; i'm very newby in
> django framework
>
> I have the following:
>
>
>
> #views.py
> ...
> def lista_diario(request, comm_id):
> comm_list =
> Commessa.objects.all().annotate(oretot=Sum('diario__ore'))
>
Hi!
I'm trying to install django-easymode, I get a version conflict, so I remove
my django from /usr/local/lib/python2.6/dist-packages as [1] says. And after
it reinstall my django from sources with python setup.py install.
When I run python -c "import django; print django.VERSION" I get the corr
Hi,
My application has both stateful and stateless (REST) views. Stateful
views primarily back browser-based GUI, while stateless are for
RESTful service requests. Is there a way to disable session
management for the stateless requests?
Thanks
Dmitry
--
You received this message because you
In addition to what Steve said, I'd recommend putting something like
this in your template as a test:
zxc is: '{{ zxc }}'
comm.id is: '{{ comm.id }}'
This may save you some time if something you don't expect is happening.
Shawn
--
You received this message because you are subscribed to the Goo
tank for your response. I try your suggestion, but it wont work!
I try to output zxc writing:
{{ comm.id }}#{{ zxc }}
and I get the following:
...
171#
140#
30#
90#
...
thus I think zxc was empty, but i may be wrong...
waiting again for suggestions. tanks.
On 17 Ago, 20:22, Steve
tank you, too. I did in advance what you suggest, and was for that
reason i said zxc was empty...
On 17 Ago, 20:39, Shawn Milochik wrote:
> In addition to what Steve said, I'd recommend putting something like
> this in your template as a test:
>
> zxc is: '{{ zxc }}'
> comm.id is: '{{ comm.id }}'
On 8/17/2010 2:49 PM, djnubbio wrote:
> tank for your response. I try your suggestion, but it wont work!
>
> I try to output zxc writing:
>
>{{ comm.id }}#{{ zxc }}
>
>
>
> and I get the following:
>
> ...
> 171#
> 140#
> 30#
> 90#
> ...
>
>
> thus I think zxc was empty, but i may b
ok it work, tank to your previous suggestion...
I didn't pay enough attention and was invoking that page from a wrong
URL
tank again for your preciouse time.
On 17 Ago, 21:10, Steve Holden wrote:
> On 8/17/2010 2:49 PM, djnubbio wrote:
>
> > tank for your response. I try your suggestion, but i
I've been trying to add the django-lean app to my project.
I have not been able to get the tests to pass. It took me a few days
with a debugger to determine what the problem was.
It seems that all the URL template tags fail in Test mode, but not in
Production nor Developement.
Failure happens is
hi all... there have been posts in the past about project management
apps but all of the threads seem dated by quite a bit. I am wondering
if there is any project management (ie like basecamp) app out there
that can be easily installed in the django /admin. Please let me know
if you know of anyth
Without help, a feature-complete first release would probably be in
January. I might push some code to svn by the end of the month. Like I
said, though, if there is interest in contributing, something can be
worked out. It's a simple GTD type of app, but could certainly be
extended to include other
On Tue, Aug 17, 2010 at 8:01 AM, chenge wrote:
> I'm new to django. CSRF let me crazy!
Can't use {% csrf_token %} tag inside your 's?
See csrf_exempt decorator:
http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#exceptions
Regards,
Rolando Espinoza La fuente
www.insophia.com
--
You rece
I was unable to get the code working. I'm developing a project
management application for Django if you're interested in
contributing.
On Aug 16, 2:27 pm, Bobby Roberts wrote:
> hi all.
>
> I've foundhttp://code.google.com/p/django-project-management/out
> there as a project management app but ha
yeah i couldn't get it installed either. I'm wondering if the project
was abandoned or something. I don't have time to contribute anything in
regard to programming at the moment due to starting up a web design
firm. However, i'd love to help you flesh out ideas or be a beta tester
for you...
I guess the problem is that I need to use raw queries to provide "hints" to
Oracle.
The class RawQuerySet does not have the "extra" method, as it appears.
Ian Kelly-2 wrote:
>
> On Aug 13, 11:04 am, buddhasystem wrote:
>> Friends,
>>
>> I'm in need of an implementation which calls for using b
On Tue, Aug 17, 2010 at 23:29, Rolando Espinoza La Fuente
wrote:
> See csrf_exempt decorator:
> http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#exceptions
I had problems too, but the decorator is a good patch for the moment :-)
Thanks!
--
Karim Gojux
www.karimblog.net
--
You received
Runing on Windows 7
First time user of Django and Python. Got python installed at f:
\python27, downloaded DJango tar file. Used WInRAR to extract.
Copied all of DJANGO into Python27
Ran python setup.py install
Tutorial one says:
>From the command line, cd into a directory where you’d like to
django-admin.py is usually located in the bin directory of the django
source. You can use it from there but you need to also say:
python django-admin.py startproject mysite
You must use the python interpreter in order to run a .py file. Hope
that helps.
On Aug 17, 10:29 pm, Marty wrote:
> Ru
On 8/17/2010 5:29 PM, Marty wrote:
> Runing on Windows 7
> First time user of Django and Python. Got python installed at f:
> \python27, downloaded DJango tar file. Used WInRAR to extract.
> Copied all of DJANGO into Python27
>
> Ran python setup.py install
>
> Tutorial one says:
>
>>From the
On 8/17/2010 5:29 PM, Marty wrote:
> Runing on Windows 7
> First time user of Django and Python. Got python installed at f:
> \python27, downloaded DJango tar file. Used WInRAR to extract.
> Copied all of DJANGO into Python27
>
> Ran python setup.py install
>
> Tutorial one says:
>
>>From the
When I connect directly to mysql using the mysql client program, I see
that my table contains utf-8 data. Here are the environment settings:
mysql> SHOW VARIABLES LIKE '%character%';
+--
+-+
| Variable_name|
Value
Hello,
I need to auto-fill currently logged in user in admin after saving a
model, but can not find a solution :( In save method of a model is no
access to the HttpRequest object, so I don't know how to get the User.
I found a "solution" with Modelform
(http://stackoverflow.com/questions/
I have a Django application.
One of my models looks like this:
class MyModel(models.Model):
def house_cleaning(self):
// cleaning up data of the model instance
Every time when I update an instance of MyModel, I'd need to clean up
the data N days later. So I'd like to schedul
Hi People
What does "/path/to/project" means ?
Thanks
Alex
--
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...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr
I am trying to migrate from one server to another: I tarred it up on the
Linux server, untarred on a Mac, got one or two complaints about missing
packages, and when I had resolved them, got the error below.
Entity is the name of one of my models. What does this mean, and how is this
issue addresse
On Tue, 2010-08-17 at 21:48 -0300, Alex s wrote:
> What does "/path/to/project" means ?
if your project is in /home/alex/projects/myproject/
then /path/to/project/ is '/home/alex/projects/'
--
regards
Kenneth Gonsalves
--
You received this message because you are subscribed to the Google Groups
So, this instruction..
"WSGIScriptAlias / /path/to/mysite/apache/django.wsgi"
Using your example '/home/alex/projects/' need to be replaced by:
"WSGIScriptAlias / /home/alex/projects/mysite/apache/django.wsgi"
Rigth?
Thanks
Alex
On Tue, Aug 17, 2010 at 9:59 PM, Kenneth Gonsalves wrote:
> On T
On 18 August 2010 07:29, Marty wrote:
> Runing on Windows 7
> First time user of Django and Python. Got python installed at f:
> \python27, downloaded DJango tar file. Used WInRAR to extract.
> Copied all of DJANGO into Python27
You actually don't need to do that; setup.py automatically copies
It means somehow you're calling this line in an admin.py file twice -
admin.site.register(Entity)
Check the admin.py file for the app that contains the Entity model.
On 18 August 2010 10:57, Christos Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:
> I am trying to migrate from on
Thank you; I'm not seeing how. My admin.py reads:
import django.contrib.admin
import directory.models
import tagging
django.contrib.admin.autodiscover()
django.contrib.admin.site.register(directory.models.Entity)
django.contrib.admin.site.register(directory.models.Location)
tagging.register(direc
2010/8/17 adam
> When I connect directly to mysql using the mysql client program, I see
> that my table contains utf-8 data. Here are the environment settings:
>
> mysql> SHOW VARIABLES LIKE '%character%';
> [snip]
>
> However, when I access my model through the django shell, I have
> problems:
>
I realized there may have been some pre-existing stuff in the directory, so
I renamed it and extracted fresh from tarball. I got an error I had seen
earlier but couldn't reproduce:
AttributeError at /
'module' object has no attribute 'register'
Request Method:GETRequest URL:http://localhost:8000
On Aug 17, 4:59 pm, buddhasystem wrote:
> I guess the problem is that I need to use raw queries to provide "hints" to
> Oracle.
There has been some chatter recently on the developers list about
adding support for optimizer hints, but I don't believe the syntax has
settled yet. For now you're cor
Karen, Thank you very much. Our collation is set to utf8_bin, which
was the source of the problem. Adam
On Aug 17, 9:01 pm, Karen Tracey wrote:
> 2010/8/17 adam
>
>
>
>
>
> > When I connect directly to mysql using the mysql client program, I see
> > that my table contains utf-8 data. Here are th
On Tue, 2010-08-17 at 22:14 -0300, Alex s wrote:
>
> Using your example '/home/alex/projects/' need to be replaced by:
> "WSGIScriptAlias / /home/alex/projects/mysite/apache/django.wsgi"
>
> Rigth?
wrong - /home/alex/projects/mysite/apache/
--
regards
Kenneth Gonsalves
--
You received this m
On Wed, 2010-08-18 at 10:19 +0530, Kenneth Gonsalves wrote:
> On Tue, 2010-08-17 at 22:14 -0300, Alex s wrote:
> >
> > Using your example '/home/alex/projects/' need to be replaced by:
> > "WSGIScriptAlias / /home/alex/projects/mysite/apache/django.wsgi"
> >
> > Rigth?
>
> wrong - /home/alex/pr
i think what you need is http://code.google.com/p/django-cron/
Also you may want to check out http://celeryq.org/ if you want to do
parallel processing,
distribute jobs to other computers to ease the web server load.
On Aug 18, 5:10 am, Andy wrote:
> I have a Django application.
>
> One of my mo
This error looks like an import error in disguise. (
http://code.djangoproject.com/browser/django/tags/releases/1.2.1/django/utils/importlib.py
)
Fire up the python interpreter shell, and trying importing the
django.contrib.admin module manually and see if you get any errors.
Django seems to be i
Mathieu,
What you said prompt me some idea: If I write my plugin registering
codes into a middleware, and load it in django's settings.py, will it
executed when app boot up?
On 8月17日, 下午11时51分, Mathieu Leduc-Hamel wrote:
> Paul, no it's not exactly the point. When you said some code on the boot
hi, Emily,
Let me introduce Scala/Lift as example.
Every lift project has a file named 'Boot.scala', this file will only
be executed once when this project boots up. In this file, we can
write some initial codes to initial project and some userdefined
structures.
Emm, that's it. I want to find o
On Tue, 2010-08-17 at 23:05 -0700, Tang Daogang wrote:
> Emm, that's it. I want to find one file acting like Boot.scala of Lift
> within Django, but failed. If there is one file like that, I will put
> my plugins registering codes into it, thus, when I type "python
> manage.py runserver", it can be
Quick Google tells me that PostGIS contains GEOS 3.2.0. I know you're
not using PostgreSQL, but installing that might do the trick, or if
you don't want to pollute your server, you can probably extract it
from the setup somehow.
http://postgis.refractions.net/download/windows/#windbinaries
On 18
No I did not.
I've only a modified (created) admin.py for each app in the project.
Maybe this is also important: we use a proxy, maybe it's something
with the cache?
What can cause csrf verification to go crazy?
On 17 aug, 15:58, Alex Robbins wrote:
> Have you done any admin template customizat
I've run into a similar situation where I'm getting CSRF errors
inconsistently. I made sure I had the token and that I was using
RequestContext. I haven't found out exactly what's wrong yet...
I have not run into the situation in the admin but I have not tried it much
but I haven't changed any a
hi,
I am using a two post_save signal handlers for two different models. On
certain conditions they have to send emails to me and others. At times
one signal is generated, at other times two or even in one instance 4
signals were generated, which results in duplicate and triplicate
emails. Has any
86 matches
Mail list logo