my site is hosted by Dreamhost, Dreamhost can use DATABASE_ENGINE =
'mysql_old' for djngo, my django admin panel broken at /admin/auth/
user/1/ , but /admin/auth/user/1/password/ is fine
and on my local compute I used DATABASE_ENGINE = 'mysql' are works
fine, why??
My django version is the newest
On Fri, 4 Apr 2008, josesoa wrote:
> Something like this should do the trick...
>
> Events.objects.filter(brags__isnull=False)
Thanks!!! That pointed me in the right direction. But, it created a
QuerySet where, for example, if an event had five brags five copies of the
that event were inclu
Something like this should do the trick...
Events.objects.filter(brags__isnull=False)
On Apr 4, 8:01 pm, Kevin Monceaux <[EMAIL PROTECTED]> wrote:
> Django Fans,
>
> I've tinkered around briefly off and on with Django for a while now.
> Finally a few days ago I finally found one of those "Round
Поддерживает живот, стабилизируя положение внутренних органов и матки,
предохраняя кожу животика от чрезмерного растяжения. Сделан из
эластичного сетчатого трикотажного полотна, обеспечивающего
воздухообмен и не вызывающего раздражения кожи. Модельный ряд
представлен следующими моделями: Т-11 (доро
On Fri, 2008-04-04 at 07:53 -0700, Chris wrote:
> Does anyone have some input to this?
Please don't post 3 times in the space of 24 hours (twice within the
first 3 hours!). Your post made it to the list and people read it. They
will respond when they have time and if they have something to say.
Django Fans,
I've tinkered around briefly off and on with Django for a while now.
Finally a few days ago I finally found one of those "Round Tuits" I've
been looking for and started converting one of the web sites I act as
webmaster for from PHP to Django. My goal at this point is just to
co
you could probably store the information in the session after the user
has been validated and in parse_params, move this information onto the
form which would then skip this step when called before done()...
but it may be easier just to do it yourself in a view without the Wizard... ;)
On Sat, Ap
Thanks for the explanation. I think I am trying to misuse FormWizard
and that is why I am having trouble. Basically I have a 2 form
wizard. The first form asks for 4 required fields. Two of those
fields are username and password for another (related) website. What
I was trying to do was to wa
karen,
thnx. what if i want to limit the field by two different fields? i
want to limit it to active = 1 and type = 1
On Mar 28, 1:49 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Fri, Mar 28, 2008 at 1:40 PM, ameriblog <[EMAIL PROTECTED]> wrote:
>
> > i have the following classes:
>
> > NE
El vie, 04-04-2008 a las 14:09 -0700, [EMAIL PROTECTED] escribió:
> def add(request,form_class=PlaceForm):
> if request.method == 'POST':
> form = form_class(request.POST)
> if form.is_valid():
> form.save(request)
> return render_to_response('places/add
I am using mysql ith InooDB.
I have some cutsom sql doing inserts. These inserts are not visible
after the function returns, if I so something like
sql = 'INSERT INTO tbl1 ...'
from django.db import connection
cursor = connection.cursor()
cursor.execute(sql)
return cursor.fetch
I have one view for adding new object for model, for example new
Place for Places Model
def add(request,form_class=PlaceForm):
if request.method == 'POST':
form = form_class(request.POST)
if form.is_valid():
form.save(request)
return render_to_response
Thanks for all of your help, that solved my issue. I gathered the
values then overrode the __init__ function for the form class adding
another paramater containing the values that I passed in. Worked like
a charm.
On Apr 4, 3:50 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 4, 200
Take a look at django-cart, too.
On Apr 4, 2:49 pm, Norbert <[EMAIL PROTECTED]> wrote:
> There is a recipe in
> ASPNhttp://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456361
>
> Not tested by me and not django related but maybe it helps
>
> On 27 Mrz., 05:54, e <[EMAIL PROTECTED]> wrote:
>
Hi,
all the forms are validated before passed to the done() method so that
it can expect cleaned data to be present on all of them.
in every step, only the currently submitted form is validated, just in
the last one, before done() is called, every single form is cleaned so
that done() doesn't hav
On Fri, Apr 4, 2008 at 2:25 PM, AJ <[EMAIL PROTECTED]> wrote:
>
> The actual custom_query is called in forms.py, something similar to
> the following:
>
> //views.py
> from app.forms import CrayonForm
>
> def add_crayon(request):
> if request.method == 'POST':
>form = CrayonForm(request.POST)
There is a recipe in ASPN
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456361
Not tested by me and not django related but maybe it helps
On 27 Mrz., 05:54, e <[EMAIL PROTECTED]> wrote:
> Is there a tutorial or stand-alone django app somewhere that shows how
> to make a PayPal payment
Is there any easy way to apply a custom class to a particular field of
a model in the oldforms admin?
Specifically, I want to mimic the behavior of a newforms TimeField
with a regular Charfield by just using the built-in javascript time
widget. As far as I can tell, all this really requires is fo
I'm using django-voting on a model shared across two sites. I get the
top-rated objects with get_top:
best = Vote.objects.get_top(Foo, limit=50, reversed=False)
But it's bringing up the top-rated from both sites I need to just
get the ones for the current site. Any ideas?
--~--~--
I've done something similar for an e-commerce store. We maintiain the
number of times the product is viewed via search results as well as
the individual product page, as two separate numbers.
I update the fields in the managing views, e.g.:
product.page_view += 1
product.save()
or
for p in re
I think I have narrowed it down even further. I print out the sql on
my development server, so in the terminal window I see whenever that
query is executed. After I add a color, then go to the page with the
form that is supposed to load the colors, the sql is not printed out
to the terminal. Ho
In response to a reply to author, here is the code that worked.
DeliveryItemForm is the parent (representing an OrderItem),
DeliveryForms are the children. The view contains multiple
DeliveryItemForms, each with 3 DeliveryForm children. DeliveryForms
without values are discarded after submissio
You are correct though, I am only seeing the output of the printed
query once, and that is one the server reoloads and everything is
imported. After the inital import there the sql doesn't get printed
out again.
On Apr 4, 2:11 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 4, 2008 a
The actual custom_query is called in forms.py, something similar to
the following:
//views.py
from app.forms import CrayonForm
def add_crayon(request):
if request.method == 'POST':
form = CrayonForm(request.POST)
if form.is_valid():
...
else:
form = CrayonForm()
return r
On Fri, Apr 4, 2008 at 1:19 PM, AJ <[EMAIL PROTECTED]> wrote:
>
> What would be the proper way to make sure the code is run each time
> the manager is called? Here's a example of how I have my code
> currently setup:
>
> //models.py
> from django.db import connection, models
>
> class ColorManage
It worked.
=)
I removed ".core"
And fix the unicode thus:
Def __init__ (self, format_string):
Self.format_string = str (format_string)
Thanks,
Claudio Escudero
=)
On Fri, Apr 4, 2008 at 2:12 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 4, 2008 at 12:35 PM, Claudio
Malcom thanks for the help. I didn't post any more code, 'cause the
inclusion tag is merely a two liner! I try to make my posts short,
trying to make it easier for others to reply. I guess sometimes it
makes things look obscure/out of context :)
Daniel, thanks, that was what I was looking for. I
I am interested in attending a training course in Django or in
advanced-level Python with web-development.
Would anyone know of training courses available in Los Angeles?
Thank you for your time.
--~--~-~--~~~---~--~~
You received this message because you are subscr
What would be the proper way to make sure the code is run each time
the manager is called? Here's a example of how I have my code
currently setup:
//models.py
from django.db import connection, models
class ColorManager(models.Manager):
def custom_query(self):
cursor = connection.cursor()
On Fri, Apr 4, 2008 at 12:35 PM, Claudio Escudero <[EMAIL PROTECTED]>
wrote:
>
>
> On Fri, Apr 4, 2008 at 1:23 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:
>
> > Do you have an __init__.py file in your templatetags directory?
> >
> yes
>
> >
OK, then current_time.py should be found for loading but
On Fri, Apr 4, 2008 at 1:23 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 4, 2008 at 12:07 PM, Claudio Escudero <[EMAIL PROTECTED]>
> wrote:
>
> > Hmmm, I understand
> > Put the {% load current_time%} in the template, but I do not know why,
> > is looking in the wrong place.
> > "djang
Yes
TEMPLATE_DIRS = (
'home/escudero/projects_django/myproject/myapp/templatetags'
)
I have to change something in the TEMPLATE_LOADERS ?
On Fri, Apr 4, 2008 at 1:21 PM, Evert Rol <[EMAIL PROTECTED]> wrote:
>
> > Hmmm, I understand
> > Put the {% load current_time%} in the template, but
On Apr 4, 9:32 am, Matias Surdi <[EMAIL PROTECTED]> wrote:
> Hi,
> Is it possible to pass keyword arguments to a custom inclusion tag?
I'm still back on .96, but as far as I know tags only support
positional arguments. I made some helpers that kind of allow a
combination of keyword and positional
On Fri, Apr 4, 2008 at 12:07 PM, Claudio Escudero <[EMAIL PROTECTED]>
wrote:
> Hmmm, I understand
> Put the {% load current_time%} in the template, but I do not know why, is
> looking in the wrong place.
> "django.templatetags.current_time,"
>
> The right would be:
> "myproject.myapp.templatetags.
> Hmmm, I understand
> Put the {% load current_time%} in the template, but I do not know
> why, is looking in the wrong place.
> "django.templatetags.current_time,"
>
> The right would be:
> "myproject.myapp.templatetags.current_time"
>
> showing that error here:
> TemplateSyntaxError at /myapp/
Hmmm, I understand
Put the {% load current_time%} in the template, but I do not know why, is
looking in the wrong place.
"django.templatetags.current_time,"
The right would be:
"myproject.myapp.templatetags.current_time"
showing that error here:
TemplateSyntaxError at /myapp/
'current_time' is no
On Fri, Apr 4, 2008 at 11:46 AM, AJ <[EMAIL PROTECTED]> wrote:
>
> So I have a manager for an model that executes some custom sql. That
> custom sql on a certain page populates a select dropdown. For an
> example we'll say that the select is a list of colors, and there is
> also a page to add ne
So I have a manager for an model that executes some custom sql. That
custom sql on a certain page populates a select dropdown. For an
example we'll say that the select is a list of colors, and there is
also a page to add new colors. If I add a new color then go to the
page that has the list of
Yes, thanks a lot Jared.
regards,
Jorge Hugo Murillo
- Original Message
From: Jared Dobson <[EMAIL PROTECTED]>
To: django-users@googlegroups.com
Sent: Friday, April 4, 2008 11:05:39 AM
Subject: Re: foreign key question
Hello Jorge,
Are you trying to do this?
def cartuchoFallado(
number of views.
On Apr 4, 11:05 am, "Richard Dahl" <[EMAIL PROTECTED]> wrote:
> I think it depends on exactly what article_count is. Is it the number of
> views of the article? The total number of articles? The number of articles
> related to this article? I am just not sure what you are tryin
On Fri, Apr 4, 2008 at 11:14 AM, Claudio Escudero <[EMAIL PROTECTED]>
wrote:
> Hi,
> I am having a problem creating tag, I do not know what I am forgetting
>
> You are showing that error here:
> TemplateSyntaxError at /home/
> Invalid block tag: 'current_time'
>
> somebody have any idea?
> =/
>
I
Hi,
I am having a problem creating tag, I do not know what I am forgetting
You are showing that error here:
TemplateSyntaxError at /home/
Invalid block tag: 'current_time'
somebody have any idea?
=/
I have the files
##
Template
Yeap,
A google search returned these two howtos:
Using Dojo's Rich Text Editor:
http://code.djangoproject.com/wiki/AddDojoEditor
And using tinymce. :-)
http://www.dehora.net/journal/2006/05/using_tinymce_in_djangos_admin.html
Good luck. :-)
Thanks,
Jared
On Fri, Apr 4, 2008 at 9:00 AM, bcurtu
Hello Jorge,
Are you trying to do this?
def cartuchoFallado(request, informe):
if request.method == 'POST':
form = forms.CartuchoFalladoFrm(request.POST)
#m = models.SolicitudCambio
#inf =models.SolicitudCambio(m.objects.filter(pk = int(informe)))
if form.is_va
I think it depends on exactly what article_count is. Is it the number of
views of the article? The total number of articles? The number of articles
related to this article? I am just not sure what you are trying to
accomplish.
-rfd
On 4/4/08, Chris <[EMAIL PROTECTED]> wrote:
>
>
> If I have an
Is it possible to configure the Admin Interface to use a Rich text
editor to edit texts and add fomatted content?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
Does anyone have some input to this?
On Apr 3, 1:18 pm, Chris <[EMAIL PROTECTED]> wrote:
> Any suggestions? Hope everyone is having a fabulous day! Thanks for
> all the help you all have provided here.
>
> On Apr 3, 10:35 am, Chris <[EMAIL PROTECTED]> wrote:
>
> > Hello, why does populate_xheade
If I have an article model that has an article_count field, would it
be better to increment the article when you grab the article in the
view or increment with middleware? and how about when caching is
involved?
--~--~-~--~~~---~--~~
You received this message becaus
Hi,
Is it possible to pass keyword arguments to a custom inclusion tag?
example:
@register.inclusion_tag('shared/form.html')
def form(form, action="",method="POST"):
return {"form": form,
"action": action,
"method": method}
I'd like to call this from a template
On closer inspection, isn't your alternative inspection taken care of
by the security_hash(...) method ? In which case, all I want is for
revalidation to be skipped ? Can't I simply add a method, which could
be overridden in subclasses which says;
def revalidation():
return True
And wrap t
On Fri, Apr 4, 2008 at 7:25 AM, Simone Cittadini <[EMAIL PROTECTED]>
wrote:
>
> When my app throws some exception I'm no more viewing the nicely
> formatted html.
> Actually I'm no more viewing the trace of the exception, all I see, no
> matter what the error is, is attached below:
> (I haven'
I haven't found any 'best practices' for Python other than PEP-8 or
the older http://www.python.org/doc/essays/styleguide.html.
Django kind of pre-defines a general best practice of project layout,
but anything outside of models, tests & fixtures, templatetags, et.
al. is up to you (views and set
Hello,
I am new to Django, so I apologize if I just don't get something. I'd
appreciate being set straight.
I want to make a table that has as a ForeignKey a field from another
table.
class Languages(models.Model):
iso_code=models.CharField(
maxlength=2,
blank=False,
I had this issue and was able to correct it by adding the following to
my settings.py
import os
os.environ['PYTHON_EGG_CACHE'] = '/tmp'
Hope this helps somebody
On Apr 3, 7:32 am, "Jon Lathem" <[EMAIL PROTECTED]> wrote:
> Graham,
>
> Thanks for your quick response. It was a SELinux problem. A
It's a form that derives from the ModelForm class:
Here's my model class:
class CartuchoFallado(models.Model):
serie = models.CharField(max_length = 15, primary_key = True)
informe = models.ForeignKey(SolicitudCambio, verbose_name = 'Informe de
Falla')
cartucho = models.ForeignKey(Car
On Fri, Apr 4, 2008 at 8:59 AM, Pythoni <[EMAIL PROTECTED]> wrote:
>
> My project directory looks like this
>
> C:\Django\projects\shop\apps\shop\views
>
> I have this simple program
>
> import sys,os
> sys.path += ['C:\\Python23\\Lib\\site-packages\\django\\app']
> sys.path += ['C:\\Django\
Thanks Tim, I'll take your encrypted hash suggestion and go with that.
This will require that I edit django.contrib.formtools.wizard.py
though, won't it ?
As this "check the hidden encrypted hash" should take place instead of
line 86, which just does form.is_valid() again ?
Should I be trying to
When my app throws some exception I'm no more viewing the nicely
formatted html.
Actually I'm no more viewing the trace of the exception, all I see, no
matter what the error is, is attached below:
(I haven't played with settings.py and I don't think is something in my
code, it happens with ev
My project directory looks like this
C:\Django\projects\shop\apps\shop\views
I have this simple program
import sys,os
sys.path += ['C:\\Python23\\Lib\\site-packages\\django\\app']
sys.path += ['C:\\Django\\projects\\','C:\\Django\\projects\\shop\\']
os.environ['DJANGO_SETTINGS_MODULE'] =
Poz wrote:
> Problem is the libjpeg link no longer exists I've also installed
> MacPort and it errored when installing the PIL
>
> Does anyone know another way to install the PIL??
any mac expert here that can check if the pythonmac.org packages work? see:
http://pythonmac.org/packages/py
Magus on IRC told me that multiple django projects with different
timezones serverd by apache / mod_python could be a problem - ie one
changing TZ in a thread that also servers the other project.
So I set timezone-setting to Vienna/Europe for all of them and have
not seen then datetime-problem si
HANDFUL INCOME TO YOUR BANK ACCOUNT .LAST WEEK I EARN $2,00,000
WITHOUT RISK. THE PROGRAMME INVITES YOU TOO.THE LINK
http://winnerin.andreaskir.hop.clickbank.net/?tid=WIN235
WISH YOU ALL THE BEST
--~--~-~--~~~---~--~~
You received this message because you are
http://www.djangoproject.com/documentation/transactions/
On 4 Кві, 13:54, Valery <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> what is the usual Django's way to create many records in a single
> transaction (or in a few transactions)?
>
> I have a list of python dictionaries representing the records t
On 3 Apr 2008, at 1:58 am, Simon Oberhammer wrote:
>
> thanks, i will try fastcgi tomorrow and report back.
>
>> Is the time constantly 8 hours behind or does that vary e.g. does the
>> offset get larger over time?
>
> it's always 8 hours behind, but not reproducable. though it happens
> everyday
> I am using a FormWizard with two simple forms. The first form
> has some complex validation to do on two of the fields, so I
> put that code in clean(). That all works fine.
>
> After the second form has been submitted, it appears that the
> clean() is called on the first form again. This hap
Hey Guys,
I was trying to rewrite parts of the Poll app example described in the
Django docs. Relevant parts of the code can be seen at
http://dpaste.com/43069/. The urls.py can be seen at
http://dpaste.com/43070/ (I forgot to put it into the same one).
The app is running fine (not throwing any
Hi,
I am using a FormWizard with two simple forms. The first form has some
complex validation to do on two of the fields, so I put that code in
clean(). That all works fine.
After the second form has been submitted, it appears that the clean()
is called on the first form again. This happens be
Hi all,
what is the usual Django's way to create many records in a single
transaction (or in a few transactions)?
I have a list of python dictionaries representing the records to be
created in my DB. It would be nice to avoid issuing of many
transactions to DB. Sorry if I missed this in the docs
Thank you for your answer Ian.
Then I dropped the models for which there is no id (in fact I don't
need them).
I also removed these apps to prevent dumpdata from trying to read the
related tables (which does not exists in the source Oracle DB):
'django.contrib.auth',
'django.contrib.cont
On Apr 4, 5:36 pm, "Jared Dobson" <[EMAIL PROTECTED]> wrote:
> Graham,
>
> Thank you so much for helping on this, it has been a nightmare band. And
> thank you for making
>
> Well i just tried the walk thru of django
> mod_wsgi:http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi
>
> An
Thanks Alex, symmetrical argument solved the problem. You saved me a
lot of time!
On 4 апр, 13:28, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> a) It should be related to "self" not 'Task'.
>
> b) Add the kwarg: symmetrical=False, by default this is true and it
> makes it so the relationship
a) It should be related to "self" not 'Task'.
b) Add the kwarg: symmetrical=False, by default this is true and it
makes it so the relationship is assumed to go both ways.
On Apr 4, 2:22 am, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote:
> Hi to all!
>
> I have a model
>
> class Task(models.Model):
Hi to all!
I have a model
class Task(models.Model):
title = models.CharField(max_length = 250)
subtasks = models.ManyToManyField('Task', null=True, blank=True)
The problem is that when I add subtask to task, task is also added to
subtask, look at the following code to see what I mean.
73 matches
Mail list logo