On 1/23/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> yes, but then deadlines dont always allow for that
Then you need a debugger *and* new deadlines.
--
Austin Govella
Thinking & Making: IA, UX, and IxD
http://thinkingandmaking.com
[EMAIL PROTECTED]
--~--~-~--~~
On 23-Jan-07, at 11:13 AM, [EMAIL PROTECTED] wrote:
> Correct way to debug in dev. mode, and when program works fine, put it
> to production.
yes, but then deadlines dont always allow for that
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
--~--~-~--~-
probably if there are 2 forms, must be 2 independent views.
so you define form action='' to point to each form view, and views
are returning this page. since you can not press both buttons
simultaneously this
approach should work well
--~--~-~--~~~---~--~~
You re
Hi Vadim,
> Am I just taking the wrong approach here or something? Considering how
> few questions I found regarding this it would appear that most people
> are either blissfully ignoring db errors or know something I don't :)
Probably. At least I never thought about wrapping save method with
tr
Margaret wrote:
> yup, me too
>
> On 1/23/07, Vadim Macagon <[EMAIL PROTECTED]> wrote:
> >
> > Eclipse + PyDev is working out for me pretty well, PyDev has a graphical
> > debugger.
> >
> > rzimerman wrote:
> > > What's the best way to do debugging in Django? Usually when I program,
> > > I use
Hi all
I'm having problems in getting Part 4 of the tutorial where one uses
generic views to work. The Polls app works fine until then. I have made
the changes in part 4 and the polls/ URL is fine and when I go to say
polls/1/ I get my list of polls with the Vote button but when its
clicked I ge
when I run python manage.py runserver and go to
http://127.0.0.1:8000/admin/
I get an error:
ImproperlyConfigured: Error importing middleware
django.middleware.common: "No module named MIMEText"
Traceback (most recent call last):
File
"H:\xampp\python\lib\site-packages\django\core\servers\bas
Hi,
I am developing a website that contains mainly multilingual content.
There were some questions and ideas on this list on how to achieve
it, so I thought I would share mine and see if anyone else finds it
useful. I have a working prototype, although not ready for production
use yet.
An examp
yup, me too
On 1/23/07, Vadim Macagon <[EMAIL PROTECTED]> wrote:
>
> Eclipse + PyDev is working out for me pretty well, PyDev has a graphical
> debugger.
>
> rzimerman wrote:
> > What's the best way to do debugging in Django? Usually when I program,
> > I use "print" statements to identify probl
On 1/22/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> on this page of the wiki:
> http://code.djangoproject.com/wiki/AJAX
>
> i see something that looks like asp and vb files ... do they belong
> here?
I've removed them. Thanks for the heads-up.
Adrian
--
Adrian Holovaty
holovaty.com | dj
On Jan 23, 8:07 am, "JimR" <[EMAIL PROTECTED]> wrote:
> 1. Can/Should I use multiple forms on one template that will update the
> models? So far, when I've tried this approach the "post" only uses the
> first form on the page.
>
> 2. Should I use one large form containing all of the fields from
hi,
on this page of the wiki:
http://code.djangoproject.com/wiki/AJAX
i see something that looks like asp and vb files ... do they belong
here?
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
--~--~-~--~~~---~--~~
You received thi
There have been some questions in the past about how to catch
IntegrityError(s) thrown by Model.save(), and there were two options
suggested:
1). Don't wrap Model.save() in a try/except, because the data should be
valid before saving.
I validate the data before saving, but if validation occur
Eclipse + PyDev is working out for me pretty well, PyDev has a graphical
debugger.
rzimerman wrote:
> What's the best way to do debugging in Django? Usually when I program,
> I use "print" statements to identify problems. But Django seems to
> surpress all output to stdout.
>
> I read at djang
Okay, I noticed this thread literally seconds after creating my own
describing a very similar approach. I searched the group for
'multilingual',
should also have checked 'translations'. The new thread should appear
shortly.
My library also uses the internal Translation class, but I moved the
de
On 1/23/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> I've looked at the dump code in #2333 and I'm looking forward to this
> being added. I brought up a question before about being able to dump
> data in a database agnostic way. It's interesting how you simply use
> the serializers. And JSON f
Check this thread:
http://groups.google.com/group/django-users/browse_frm/thread/a9ed968d854c634c/3216dec1234ce0ac
I haven't found better ways to debug since then. I find the simplest
way for me has been to use print statements along with the built-in
webserver. I'm still looking forward the next
I have a similar but not the same need. I do use the full Django stack,
but I need to write helper programs that can interact with the database
but have nothing to do with the web. This matters because I already
have a normal Django project and some apps set up, but you may need to
make a dummy pr
Hello everyone,
we are building a web application at work with Django, and one template
has two in it with their own submit button. If I have a
Manipulator for both kind of forms, how would I cleanly write my view?
Thanks,
Vincent.
--~--~-~--~~~---~--~~
You r
On 1/22/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 1/22/07, James Bennett <[EMAIL PROTECTED]> wrote:
> > On 1/22/07, Andy Dustman <[EMAIL PROTECTED]> wrote:
> > > Here's how I made it work:
> > >
> > > Index: django/views/defaults.py
> >
> > That view uses RequestContext, so you could jus
You can't change session lifetime on the fly with the default
SessionMiddleware, but you can write your own middleware that's more
flexible. I just wrote up my solution on the wiki here:
http://code.djangoproject.com/wiki/CookBookDualSessionMiddleware
-+ enlight +-
Rob Hudson wrote:
> It woul
oh. a group just for that :)
thx don.
On Jan 22, 9:37 pm, Don Arbow <[EMAIL PROTECTED]> wrote:
> On Jan 22, 2007, at 12:22 PM, ashwoods wrote:
>
>
>
> > hmm... i guess everybody is tired of translation discussions :)You
> > might have better luck in the Django internationalization group
On 1/22/07, James Bennett <[EMAIL PROTECTED]> wrote:
> On 1/22/07, Andy Dustman <[EMAIL PROTECTED]> wrote:
> > Here's how I made it work:
> >
> > Index: django/views/defaults.py
>
> That view uses RequestContext, so you could just add
> 'django.core.context_processors.request' to your
> TEMPLATE_C
On 1/22/07, Andy Dustman <[EMAIL PROTECTED]> wrote:
> Here's how I made it work:
>
> Index: django/views/defaults.py
That view uses RequestContext, so you could just add
'django.core.context_processors.request' to your
TEMPLATE_CONTEXT_PROCESSORS setting and the full request will be made
availabl
On Jan 22, 2007, at 12:22 PM, ashwoods wrote:
>
> hmm... i guess everybody is tired of translation discussions :)
You might have better luck in the Django internationalization group:
http://groups.google.com/group/django-I18n/
Don
--~--~-~--~~~---~--~~
Y
On 1/22/07, Andy Dustman <[EMAIL PROTECTED]> wrote:
> On 1/22/07, Bo Shi <[EMAIL PROTECTED]> wrote:
> >
> > I think request.META is what you're looking for, i.e.:
> >
> >referrer = request.META.get('HTTP_REFERER', '/')
>
> I know that; I need to have access to it from a template, specifically
the manage.py startapp actually does very little. just a folder and a
"couple" of empty files.
if you want to have an apps folder, just create one. if your main
project folder is MyProject, just go to MyProject and:
mkdir apps (or if you are in windows, just use what you always use)
under MyProj
hmm... can you post the whole error output?
On Jan 21, 11:05 pm, "johnny" <[EMAIL PROTECTED]> wrote:
> what does it mean "No module named Utils" when I run python manage.py
> syncdb?
>
> I have looked into INSTALLED_APPS, there is nothing called "Utils"
> Someone mentioned CONTEXT_PROCESSORS, I d
Trying printing out self.clean_data when using the built-in django
server and you'll see what it looks like. Your fields might be empty
strings instead of None, so you should say:
if self.clean_data.get("city")
instead of making comparisons to None (which is discouraged in Python,
you should use
hmm... i guess everybody is tired of translation discussions :)
On Jan 21, 1:12 am, "ashley" <[EMAIL PROTECTED]> wrote:
> after searching and reading all the posts related to internalization
> and multilanguange, my first question is if there is any active
> development to integrate or make e
the new newforms library pretty much covers form creation. did u
already take a peak?
http://www.djangoproject.com/documentation/newforms/
cheers,
ashley
On Jan 22, 11:57 am, "Giorgio Salluzzo" <[EMAIL PROTECTED]>
wrote:
> Hi all,
> I'm trying to include in my templates django admin calendar an
On 1/22/07, Bo Shi <[EMAIL PROTECTED]> wrote:
>
> I think request.META is what you're looking for, i.e.:
>
>referrer = request.META.get('HTTP_REFERER', '/')
I know that; I need to have access to it from a template, specifically
my 404.html template, in a way that will work with generic views
i would do case 2. you can create a NewForm object with all the fields
you want.
then in the view where you process the post request, you just create
(or edit) the model instances manually.
that means you import all your models, you create a new instance of
each model and assign the request data
Your example is sparse to the point of being a tad obtuse, but I think I get
what you're asking.
Unless you reference modelTemp directly from inside exe1, you don't need to
import it. If exe1 had a foreignKey to modelTemp, you'd need to import
modelTemp. Otherwise, you don't.
-joe
On 1/22/07, as
sorry, i have no idea what you are trying to do. is that python?
plz explain.
On Jan 22, 5:08 pm, "johnny" <[EMAIL PROTECTED]> wrote:
> If I have the following:
>
> model1
> import modelTemp
> class exe
> (class exe uses a foreignKey from modelTemp)
>
> model2
> import model1.exe
> class exe1
>
Download Weather Toolbar - Instant weather reports, forecasts, and
radar images anytime for FREE! - http://surl.in/HLWTD238206SVRAKSX
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
Hello, all. I'm new to Django and Python, and kind of rusty with my
development skills, so please forgive me as I struggle through it all!
I am developing a web site that will eventually have a pretty
significant library of forms in addition to regularly updated content
and other information.
I
> SELECT * FROM camps where id in (SELECT DISTINCT camp_id FROM application);
Computing the DISTINCT portion here may be superfluous, and
possibly (depending on your DB) a premature mis-optimization.
Whether DISTINCT or not, membership via IN will still behave the
same, but DISTINCT will requi
On 1/22/07, Chris Brand <[EMAIL PROTECTED]> wrote:
> I have an app with Applications, each of which is for a single Camp.
> What I want to do is retrieve all the Camps for which there exists an
> Application.
The straightforward way is to retrieve a list of distinct values for
'camp_id' from the
Michael had it right.
I guess I deleted the __init__.py without looking.
--~--~-~--~~~---~--~~
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 have the feeling that this is something that should be straightforward,
but I can't see how to do it.
I have an app with Applications, each of which is for a single Camp.
What I want to do is retrieve all the Camps for which there exists an
Application.
Thanks,
Chris
--~--~-~--~--
"Like FileField, but validates that the uploaded object is a valid
image. Has two extra optional arguments, height_field and width_field,
which, if set, will be auto-populated with the height and width of the
image each time a model instance is saved."
So I made this model:
class Foto(models.Mod
It would be interesting to know, however, how to make this work like
this:
Default case: when the user doesn't check the "remember me" box...
- Remove the cookie on browser close. This is great for sites that
might get used in public places like libraries.
- You can do this with: settings.SESSIO
On 1/21/07, rzimerman <[EMAIL PROTECTED]> wrote:
>
> What's the best way to do debugging in Django? Usually when I program,
> I use "print" statements to identify problems. But Django seems to
> surpress all output to stdout.
>
> I read at djangobook.com that I could put "assert False" statements
I've looked at the dump code in #2333 and I'm looking forward to this
being added. I brought up a question before about being able to dump
data in a database agnostic way. It's interesting how you simply use
the serializers. And JSON for data is an interesting choice too. It
looks like it work
[EMAIL PROTECTED]:
> "/usr/local/lib/python2.4/site-packages/django/utils/translation/trans_real.py",
> line 167, in _fetch
> app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]),
> appname[p+1:])
> AttributeError: 'module' object has no attribute 'blog'
>
>
> I have never seen any
> What's the best way to do debugging in Django? Usually when I program,
> I use "print" statements to identify problems. But Django seems to
> surpress all output to stdout.
Hi Robert,
the best way to do debugging is - as always - using a debugger:
http://docs.python.org/lib/module-pdb.html
J
thanks James.
--~--~-~--~~~---~--~~
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]
On 1/22/07, Michel Thadeu Sabchuk <[EMAIL PROTECTED]> wrote:
> The newforms.CharField class expects a max_length keyword to define the
> max_length, the models.CharField expects a maxlength keyword (without
> the underscore). Shouldn't the newforms.CharField class use maxlength
> too?
Hi Michel,
On 1/22/07, carlwenrich <[EMAIL PROTECTED]> wrote:
> I have a friend who lost his django admin username and password, and
> the programmer who set them up. What can we do to create new ones
> without having to rebuild the whole thing?
If you have shell access to the system it's running on, do the
If I have the following:
model1
import modelTemp
class exe
(class exe uses a foreignKey from modelTemp)
model2
import model1.exe
class exe1
(class exe1 uses a foreignKey from exe)
Question I have is, do I have to import modelTemp for model2 also?
--~--~-~--~~~---~-
Hi guys!
The newforms.CharField class expects a max_length keyword to define the
max_length, the models.CharField expects a maxlength keyword (without
the underscore). Shouldn't the newforms.CharField class use maxlength
too?
Thanks
Michel Thadeu Sabchuk
--~--~-~--~~~-
I have a friend who lost his django admin username and password, and
the programmer who set them up. What can we do to create new ones
without having to rebuild the whole thing?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goog
What exact command did you type?
On Jan 22, 2007, at 5:44 AM, [EMAIL PROTECTED] wrote:
>
> Traceback (most recent call last):
> File "manage.py", line 11, in ?
> execute_manager(settings)
> File
> "/usr/local/lib/python2.4/site-packages/django/core/management.py",
> line 1447, in execute
I think request.META is what you're looking for, i.e.:
referrer = request.META.get('HTTP_REFERER', '/')
On Jan 22, 9:39 am, "Andy Dustman" <[EMAIL PROTECTED]> wrote:
> I have a 404 page that I would like to display some of the HTTP
> headers (particularly HTTP_REFERER) in so that user receivi
Hi,
I am a newbie to Django. As everyone knows, the features that are
provided by Django is loosely coupled and I want to use onlt the
object-relational mapper that is provided by Django. My database is
MySql. Does anyone have used Django only for this? I have my own
httpserver and templating sy
Hi everyone,
This is just a quick post to announce that WebFaction have added
Django-0.95.1 to their control panel.
Remi
http://www.webfaction.com - Hosting for an agile web.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
Traceback (most recent call last):
File "manage.py", line 11, in ?
execute_manager(settings)
File
"/usr/local/lib/python2.4/site-packages/django/core/management.py",
line 1447, in execute_manager
execute_from_command_line(action_mapping, argv)
File
"/usr/local/lib/python2.4/site-pack
What's the best way to do debugging in Django? Usually when I program,
I use "print" statements to identify problems. But Django seems to
surpress all output to stdout.
I read at djangobook.com that I could put "assert False" statements in
problematic parts, and then I would see debugging output
I have a 404 page that I would like to display some of the HTTP
headers (particularly HTTP_REFERER) in so that user receiving the
error can make a usable report. Is there some way at getting at this
information in a template without having to have your view return a
HttpResponseNotFound object? I'
Thanks for the explanation,
i tried the code you provided and it worked so this solves my problem.
thank's
richard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
The clean_XXX methods documented in the regression tests mentioned
above did it for me. I think the new api is much cleaner(!) than the
old.
The only thing is that I think the clean_XXX should be passed the
cleaned value so far since you most likely will be doing:
def clean_XXX(self):
value =
I 'm implementing file upload app. A client can be both web and desktop
application. I have tested using html form and receive file via
request.FILES, it success. For desktop app, I use python urllib which data
can be encoded into python dictionary (urllib.urlencode) and send it to my
django web wi
Hi all,
I'm trying to include in my templates django admin calendar and clock
for date and datetime fields.
I searched the solution here in Django users Group but, to be honest,
I'm still having some problems.
First of all, I have to include in my page .js files, done.
Second, in which way I ge
On 1/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Thanks for your advice,
>
> I tried to use
> try:
> except DoesNotExist:
>
> and this gave a error that DoesNotExist is not defined.
Ok; I was shorthanding a little in my example. I thought the problem
was that you didn't know you could
Thanks for your advice,
I tried to use
try:
except DoesNotExist:
and this gave a error that DoesNotExist is not defined.
DatabaseError i didn't try yet thinking there was another method that
should be used.
if DatabaseError works it's oke the other error i will get will only be
the DoesNotExist
Thanks for reply
There was a CSS file in template which was
import("http://mysite.com/style.css";); instead of importing through
https
I fixed it
Thanks
Amaltas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dja
67 matches
Mail list logo