Hi, I have developed a simple application on my desktop computer
successfully using django 1.02, Ubuntu 9.04, python version 2.6.2
I copied my files over to my laptop computer and did the following:
1) ran the django-admin.py startproject projectName
2) cd to projectName folder, and ran the
I have these lines in my template file "base.html", and save the
template file as "utf-8" format as I want to support Chinese
characters.
http://www.w3.org/1999/xhtml;>
My amzing site
.style1 {
COLOR: #ff
}
I type "python manage.py" to start web service.
When I used MS IE6.0
figured it out, it was the = output from the dummy server for the
activation code, thanks guys.
On Jul 13, 10:03 pm, neridaj wrote:
> for some reason the function is returning false. This worked fine on
> Dreamhost but when I run this using the django server with the dummy
>
for some reason the function is returning false. This worked fine on
Dreamhost but when I run this using the django server with the dummy
send mail it returns false. The activation code is in the database so
I don't understand why it would return false, here is the output of
the trace:
-> if
"They" are apparently people who read the documentation and understand
better then "me".
Sigh, and I thought I uncovered somethign, ah well. Simple error and
thanks for clarifying.
On Jul 13, 11:13 pm, Russell Keith-Magee
wrote:
> On Tue, Jul 14, 2009 at 10:31 AM,
On Tue, Jul 14, 2009 at 10:31 AM, Streamweaver wrote:
>> For example I have a model called Project with a ForeignKey to a
>> Django User.
>>
>> class Project(models.Model):
>>...
>> owner = models.ForeignKey(User)
>> ...
>>
>> by the documentation I would expect
Hi list,
I'd like to know if there are any plans to patch [0] the sitemaps
framework to add news sitemaps support in the near future.
Regards,
[0] http://code.djangoproject.com/ticket/10907
--
AlvAro
--~--~-~--~~~---~--~~
You received this message because you
Filed a bug report about this. We'll see if they accept it.
On Jul 10, 5:29 pm, Streamweaver wrote:
> I'm using Django 1.0.2 and having some problems with Related Object
> queries.
>
> For example I have a model called Project with a ForeignKey to a
> Django User.
>
>
On Tuesday 14 Jul 2009 6:01:35 am Karen Tracey wrote:
> > Before I posted my code, I formatted them carefully on wordpad.
> > However, they became so messy after I posted them.
> >
> > Is it possible to do anything to clear such a problem? just wondering
> > this.
>
> For short snippets, as this
Sorry i didnt explain very well. The folder objects are django
objects, not file system paths
On Jul 13, 6:19 pm, Almir Karic wrote:
> For real world deployment you should use your web server to do that.
> For apache that would be an Alias (and make sure the Alias get's
For real world deployment you should use your web server to do that.
For apache that would be an Alias (and make sure the Alias get's to be
served before everything is passed to django).
For development purposes you should have a look at
http://docs.djangoproject.com/en/dev/howto/static-files/
I tried searching but didnt really find much.
Is there a way to set up a url conf to get a url of a folder path?
Basically i have a site that has folder-ish objects that contain
stuff. However i cannot seem to find a way to get a url pattern to
work. how would i get:
On Mon, Jul 13, 2009 at 8:22 PM, David wrote:
>
> Before I posted my code, I formatted them carefully on wordpad.
> However, they became so messy after I posted them.
>
> Is it possible to do anything to clear such a problem? just wondering
> this.
>
For short snippets, as
On Tuesday 14 Jul 2009 5:52:51 am David wrote:
> Before I posted my code, I formatted them carefully on wordpad.
> However, they became so messy after I posted them.
>
> Is it possible to do anything to clear such a problem? just wondering
> this.
I would suggest you use a good editor for
Before I posted my code, I formatted them carefully on wordpad.
However, they became so messy after I posted them.
Is it possible to do anything to clear such a problem? just wondering
this.
On Jul 13, 5:15 pm, David wrote:
> Hi Karen,
>
> Thanks for your long reply.
Hi Karen,
Thanks for your long reply. Though this problem has been solved
(Thanks to all for your replies, especially Sam), let me explain a
little more.
The 2nd for loop is actually an embedded loop in the 1st for loop.
>From the 1st loop I retrieve some values, and use these values (as
"model
hi,
I have encountered a very peculiar problem. I have a local copy of my project
running on FC11, apache2, mod_python and latest django trunk. My production
server is lenny, apache2, mod_python and latest django trunk. I test my code
locally and commit it to the production site. So the code
Hi Sam,
Cool! It works.
Thanks so much!
On Jul 13, 4:49 pm, Sam Lai wrote:
> Try:
>
> getattr(eachalert, criteria1_metric1) or something similar. look up
> the getattr python function.
>
> On 7/14/09, David wrote:
>
>
>
>
>
>
>
> > still no lucky...
>
>
Hi all,
I am trying to add django-tinymce-1.5 in my application.
I downloaded tinymce_3_2_5 and installed it using sudo python setup.py
install.
In my settings I have following:
PROJECT_DIR = os.path.dirname(__file__)
MEDIA_ROOT = os.path.join(PROJECT_DIR, 'static')
MEDIA_URL =
On Mon, Jul 13, 2009 at 5:36 PM, David wrote:
>
> Thanks Amit. Here is the problem that I meet.
>
> alerts = Alert.objects.filter((Q(dataset=dataset1)
>
> for eachalert in alerts:
>e_metric1 = eachalert.criteria1_metric1
>
>
> Django complains that there is no such item
Try:
getattr(eachalert, criteria1_metric1) or something similar. look up
the getattr python function.
On 7/14/09, David wrote:
>
> still no lucky...
>
> Traceback (most recent call last):
> File "", line 1, in
> File "/home/dwang/alert/../alert/message/models.py", line
On Tuesday 14 Jul 2009 12:28:54 am neridaj wrote:
> yeah, from the front end everything looks as though it's working, but
> when I log on to the admin site the user is saved but not activated
> and the user folder is never created.
if the user folder is not created the app should crash with an
still no lucky...
Traceback (most recent call last):
File "", line 1, in
File "/home/dwang/alert/../alert/message/models.py", line 245, in
check_criteria1
metric11 = eachalert.get(criteria1_metric1)
AttributeError: 'Alert' object has no attribute 'get'
>>>
On Jul 13, 3:53 pm,
D'oh! OK, I am an idiot. I did not create the app with `manage.py
startapp`. I simply created the directory on the command line. Django
does in fact complain.
Guess I got what I deserved ;)
On Jul 13, 4:01 pm, David Lindquist wrote:
> Hi Everyone,
>
> I discovered by
Hi Everyone,
I discovered by accident that if you have an app with the same name as
the project, then `python manage.py shell` (and similar commands)
cannot import the settings file. I assume this is due to how Django
updates sys.path.
I would expect Django update sys.path to look in the
I've been asked to find the most appropriate framework with which to
implement the following:
A website with
1. Modules, which separate (partially user-configurable) style, from
user settings, from content. A bit like the igoogle modules.
2. ...which can be inserted in various places in a page,
On Mon, Jul 13, 2009 at 5:48 PM, David wrote:
> TypeError: 'Alert' object is unsubscriptable
sorry, i was mixing languages.
try "e_metric1 = eachalert.get (criteria1_metric1)"
--
Javier
--~--~-~--~~~---~--~~
You received this message because
On Mon, Jul 13, 2009 at 5:29 PM, Sam Tregar wrote:
> I'm a beginner with Django, so I'm curious to hear about Django-specific
> approaches.
the Django-specific approaches start with the doc:
http://docs.djangoproject.com/en/dev/topics/cache/#the-per-view-cache
in short:
1:
Thanks Javier. I got
Traceback (most recent call last):
File "", line 1, in
File "/home/dwang/alert/../alert/message/models.py", line 245, in
check_criteria1
metric11 = eachalert[criteria1_metric1]
TypeError: 'Alert' object is unsubscriptable
>>>
any more ideas? I am also googling
On Mon, Jul 13, 2009 at 3:34 PM, Ramdas S wrote:
> I have a web site where around 15 SQL semi complex queries run on the home
> page. Traffic is increasing and the page loads are getting slower. What is
> the best way to cache just the home page. I have already done standard
>
On Mon, Jul 13, 2009 at 4:36 PM, David wrote:
>
> Thanks Amit. Here is the problem that I meet.
>
> alerts = Alert.objects.filter((Q(dataset=dataset1)
>
> for eachalert in alerts:
> e_metric1 = eachalert.criteria1_metric1
try "e_metric1 = eachalert[criteria1_metric1]"
--
Micheal,
It would be great if you can throw some more light on your solution. Sounds
like a splendid idea and will be helpful for many including me
Ramdas
On Tue, Jul 14, 2009 at 1:42 AM, Michel Thadeu Sabchuk
wrote:
>
> Hi Ramdas,
>
> > I have a web site where around 15
+1
Last year's recording was awesome. Will we have recording like last year
again this year?
Regards,
On Tue, Jul 14, 2009 at 3:27 AM, Fred Chevitarese wrote:
> It apears to be cool!!! I´m in Brazil!
>
> Maybe someone can record and put it on youtube!!
>
> Hugs...
>
>
I'm constructing a query with an extra select subquery that also uses
an order_by and it seems to generate SQL that MySQL doesn't like since
it's generating a GROUP BY with missing parens.
The problem is similar to this doing this:
Blog.objects.extra(select={
'entry_count': 'SELECT
On Mon, Jul 13, 2009 at 2:48 PM, Mihail Lukin
wrote:
>
> Hello, everyone!
>
> django.forms allows me to define form class from model and render
> forms to html with just calling as_table method. Is there some module
> to do same thing with querysets? I guess its usage
Hello, everyone!
django.forms allows me to define form class from model and render
forms to html with just calling as_table method. Is there some module
to do same thing with querysets? I guess its usage could look like
this:
class UserTable (tables.ModelTable):
class Meta:
model =
hi guys, im new with django, but im developing a website ... i hope
that somebody help me with this problem:
how ill generate some code in the django admin and show this code in
input and save in database?
the problem is that i need to generate some code (like a tracking
number) when the user
Thanks Amit. Here is the problem that I meet.
alerts = Alert.objects.filter((Q(dataset=dataset1)
for eachalert in alerts:
e_metric1 = eachalert.criteria1_metric1
Django complains that there is no such item "criteria1_metric1" in
Alert class. This is correct as Alert class does not have
>I've hit http://code.djangoproject.com/ticket/10470 on production
what's the the symptom when you hit this bug?
P.S. I'm wanting to use mod_wsgi in daemon mode with threading to
conserve memory. I guess I'll manually update or wait for v1.1
--~--~-~--~~~---~--~~
I am not sure what you are trying to do. And the code seems almost unreadable .
You could try posting the code to : http://pastebin.com/
Also what might be helpful:
What is the problem statement what is this code trying to solve ?
What value you want and where ?
And what error does django
I do not know why the code gets seperated. Here it is.
alertcriteria1 = Alert_Criteria1.objects.all()
for eachcriterion in alertcriteria1:
dataset1 =
eachcriterion.dataset
criteria1_metric1=
On Mon, Jul 13, 2009 at 3:12 PM, Michel Thadeu
Sabchuk wrote:
> I made a script to generate the homepage every x minutes and serve it
> through nginx, I don't have too much RAM :)
this is a really good solution. some benchmarks have shown NginX
performance when serving static
Hi Ramdas,
> I have a web site where around 15 SQL semi complex queries run on the home
> page. Traffic is increasing and the page loads are getting slower. What is
> the best way to cache just the home page. I have already done standard
> memcached on the server.
I'm still learning about
On Jul 13, 6:07 pm, Daniel Roseman wrote:
> On Jul 13, 4:02 pm, janedenone wrote:
>
>
>
>
>
> > Hi,
>
> > I read the documentation on customizing admin templates, but I still
> > wonder how to access the object attributes in the
On Jul 13, 10:03 am, itodd wrote:
> Greetings,
>
> I'm trying to use a SelectMultiple with a set of static choices. I'm
> experiencing odd behavior when the number of choices exceeds 10. For
> example, take the following Model and ModelForm:
>
> class Project(models.Model):
I have a web site where around 15 SQL semi complex queries run on the home
page. Traffic is increasing and the page loads are getting slower. What is
the best way to cache just the home page. I have already done standard
memcached on the server.
Please suggest the best caching options, where we
Karen,
Sorry about that:-( I just yanked everything from the terminal and pasted it
in the group (not gmail), I will be more cautious next time. As far as my
issues, my workflow consists of:
- modify code
- save
- restart apache
- view in browser (usually ff)
so yes, I always
Hello,
I have following code:
alertcriteria1 = Alert_Criteria1.objects.all
()...(1.)
for eachcriterion in
alertcriteria1:.
(2.)
yeah, from the front end everything looks as though it's working, but
when I log on to the admin site the user is saved but not activated
and the user folder is never created. I'm using django's dummy send
mail and pasting the generated activation key into the address bar,
which displays "account
On Mon, Jul 13, 2009 at 1:51 PM, bsisco wrote:
>
> i double checked all of my admin settings and nothing has changed.
> however, i started commented out items i didn't need anymore
> (list_display_links and list_filter) in the admin class for this model
> and now i get a
It's not very efficient, but it's possible. I just finished up an app
where dynamic urls was an unfortunate requirement, but simple to
implement.
A view is just a function within which can call another view, so it's
easily possible to have a catchall view that captures the url (using
the normal
Recently I've been trying to get answers about the post_save signal
behavior and perhaps have been asking too much of readers without
narrowing down the problem enough myself. So here is my effort to ask
a rather straightforward question:
The code that connects to the post_save signal, according
On Mon, Jul 13, 2009 at 12:56 PM, Maksymus007 wrote:
>
> I recently switched to Django from PHP with Doctrine ORM - there was a
> possibility to make model 'act as' for example NestedSet - which
> automagically added required fields and methods to operate on Tree -
>
Its possible to use dynamic (database based maybe) routing, instead of
static one?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
I recently switched to Django from PHP with Doctrine ORM - there was a
possibility to make model 'act as' for example NestedSet - which
automagically added required fields and methods to operate on Tree -
adding, moving,deleting nodes etc. Is this somehow possible in Django?
i double checked all of my admin settings and nothing has changed.
however, i started commented out items i didn't need anymore
(list_display_links and list_filter) in the admin class for this model
and now i get a 500 error. Below is the traceback from the log file
that I'm getting:
[Mon Jul
Hi,
> Try adding a '^' character to the front of your regular expressions,
> and see if the requests are passed to the proper views.
thanks a lot, it works.
> In your 'bad' situation, a url like "ue/reservations/xyz" gets matched
> by the first regex, and passed to view_list_reservation (your
In tis package, you have the database? If yes, you can setup your
settings.py poiting to this database.
After that, you can run the command python manage.py inspectdb sending the
result to a txt file.
Then, you can "refactory" the models file ;)
Fred Chevitarese - GNU/Linux
It apears to be cool!!! I´m in Brazil!
Maybe someone can record and put it on youtube!!
Hugs...
Fred Chevitarese - GNU/Linux
http://chevitarese.wordpress.com
2009/7/13 Robert Lofthouse
>
> Hi all,
>
> DjangoCon '09 will be in Portland, Oregon at the DoubleTree Green
Greetings,
I'm trying to use a SelectMultiple with a set of static choices. I'm
experiencing odd behavior when the number of choices exceeds 10. For
example, take the following Model and ModelForm:
class Project(models.Model):
RECIPIENTS = (
(1,'Brad'),
(2,'Fred'),
On Mon, Jul 13, 2009 at 10:47 AM, bsisco wrote:
>
> I have a simple application that we use to track incoming warranties
> for my company. The change_list view used to show such items as part
> number, serial number, date entered, control number etc. After a user
>
On Jul 13, 8:48 am, Frédéric Hébert wrote:
> When I declare the outter view after the inner in urls.py she's never
> been called. It's the inner that's got it.
> (She's called when I reverse the order of declaration, eg the outter
> first)
>
> I've pasted the code at
2009/7/13 Frédéric Hébert
>
> Hi there,
>
> first, here is my config:
> python 2.5.2
> django 1.0.2
> plateforme linux debian lenny
>
> I've two nested views, the inner of two using the list_detail.list
> generic view.
> The outter define a QuerySet and passes it to the
Hi all,
DjangoCon '09 will be in Portland, Oregon at the DoubleTree Green
Hotel ( http://www.doubletreegreen ) between 8th and 12th September.
The first 3 days are conference days and the last 2 days are sprint
days. The rate for single/double occupancy rooms at the hotel is $99
per night.
You
On Jul 13, 4:02 pm, janedenone wrote:
> Hi,
>
> I read the documentation on customizing admin templates, but I still
> wonder how to access the object attributes in the change_form.html. I
> am capable of getting the id using {{ object_id }}:
>
> {% if change %}{% if
On Jul 3, 6:36 pm, Emily Rodgers
wrote:
> 2009/7/3 Alex Gaynor :
>
>
>
>
>
> > On Fri, Jul 3, 2009 at 12:25 PM, Emily Rodgers
> > wrote:
>
> >> On Jul 3, 3:29 pm, Emily Rodgers
On Mon, Jul 13, 2009 at 10:38 AM, Shawn Milochik wrote:
>
>
>
> I highly highly recommend that you separate your development, testing,
> and production instances of your DB and web server. You should never
> ever develop or test on a production system!
>
> - --
> Randy
Hi there,
first, here is my config:
python 2.5.2
django 1.0.2
plateforme linux debian lenny
I've two nested views, the inner of two using the list_detail.list
generic view.
The outter define a QuerySet and passes it to the inner view.
When I declare the outter view after the inner in
On Mon, Jul 13, 2009 at 9:53 AM, Russell Keith-Magee wrote:
>
> On Sun, Jul 12, 2009 at 11:01 PM, Mat wrote:
> >
> > I'm trying to replace a convoluted database-specific SQL statement
> > with the new aggregates functionality. As an example, say I
>>
>
> I highly highly recommend that you separate your development, testing,
> and production instances of your DB and web server. You should never
> ever develop or test on a production system!
>
> - --
> Randy Barlow
That's already the case. I guess I wasn't clear enough. All the tests
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Shawn Milochik declared:
> My Django app uses postgres. I've defined TEST_DATABASE_NAME in
> settings and created that database in postgres. However, I haven't
> given my Django DB user permission to create and destroy databases --
> just to
My Django app uses postgres. I've defined TEST_DATABASE_NAME in
settings and created that database in postgres. However, I haven't
given my Django DB user permission to create and destroy databases --
just to own the database. So, I can't run manage.py test, because it
fails to delete the
Hi,
I read the documentation on customizing admin templates, but I still
wonder how to access the object attributes in the change_form.html. I
am capable of getting the id using {{ object_id }}:
{% if change %}{% if not is_popup %}
{% trans "View Calculation" %}
...
but I need to access
On Sun, Jul 12, 2009 at 11:01 PM, Mat wrote:
>
> I'm trying to replace a convoluted database-specific SQL statement
> with the new aggregates functionality. As an example, say I have a
> database structured with tables for blogs running on many domains
> (think .co.uk, .com,
I have a simple application that we use to track incoming warranties
for my company. The change_list view used to show such items as part
number, serial number, date entered, control number etc. After a user
entered an item this morning the view now only shows boolean fields.
I tried going in
Smartif is great, I don't get why it's not a standard part of django
templates.
On Jun 17, 5:02 pm, Steve Howell wrote:
> Another option is to install the snippet below, which supports "in":
>
> http://www.djangosnippets.org/snippets/1350/
>
> On Jun 17, 1:53 pm, Ben Davis
On Jul 11, 2009, at 6:23 PM, adelaide_mike wrote:
>
> Thanks Alex.
>
> A simpler way out would be if the agent field, which is a foreign key
> pick list, could be caused to show only those values I determine
> dynamically.
>
> Is this possible in a ModelForm?
>
> Mke
If I understand
>
>
> The question, how can I return username of user in fields. I want
> the JSON response to contain value user.username instead of id of
> user oject
>
> Thanks,
> Oleg
>
Get everything you want into a dictionary. Then something like this
will give you what you need:
return
On Mon, Jul 13, 2009 at 7:27 AM, Vitaly wrote:
>
> Hi
>
> I have some problem with customizing error pages when application does
> not work at all. One of things is stopping database on production
> server and user should see normal description of problem. But instead
> of
Thanks Karen
I am slightly embarrassed with this one, You are correct that variant
works, the reason I thought it was not working is because the
User.first_name fields were empty and they were showing as blanks.
:)
On Jul 13, 3:54 pm, Karen Tracey wrote:
> On Mon, Jul
On Mon, Jul 13, 2009 at 9:28 AM, wickass wrote:
>
> Hi Django users
>
> I have only been using python& django for about a week, so please
> excuse me if this question sounds stupid.
>
> Basically I have a model which extends the users model via a OneToOne
> relationship like
Ah fantastic many thanks.
All working nicely now much appreciated.
On Jul 10, 4:16 pm, Russell Keith-Magee
wrote:
> On Fri, Jul 10, 2009 at 10:33 PM, huw_at1 wrote:
>
> > So I switched from mod_python to mod_wsgi since I don;t really know
> > what
Hi Django users
I have only been using python& django for about a week, so please
excuse me if this question sounds stupid.
Basically I have a model which extends the users model via a OneToOne
relationship like so:
class AgentProfile(models.Model):
user =
You might try pdb[1]. Drop
"import pdb;pdb.set_trace()"
into your code the line before "if SHA1_RE". Once at the pdb prompt
you can just type n to move forward one line at a time. Any python
code you type will get evaluated so you can check the status of
variables at each step. (Pdb is a little
Hi
I have some problem with customizing error pages when application does
not work at all. One of things is stopping database on production
server and user should see normal description of problem. But instead
of this user see 'Unhandled exception'
Does there method to avoid that and get flup
Hello everybody!
I'm trying to extend the User model with extra fields that I need.
First I tried to inherit the User class and deregister the original
one, but the UserAdmin class, used to create new users, didn't
acknowledge my class and tried to redirect to an id that did not exist
yet. I
Hi all,
I have been using django-logging (http://code.google.com/p/django-
logging/wiki/Overview) and found it very useful. However, I configured
python logging for my project and django-logging does not display
logging messages anymore.
Here is the logging.conf I am using:
[loggers]
keys =
It is working.
When I was creating a link to a page, I was not adding the tailling
'/' explicitely. It seems Django did it for me.
But for some reason, if there was a dot in the url, that trailling '/'
was not added ... no idea why.
Anyway, explicitly adding the '/' does the job and is probably
The other option is to have the hidden "action" field and fill it with
different values on buttons click events.
The other option is to change the form action dynamically with JS so
you can have separate POST handler views for different actions
(like
On Jul 12, 3:22 pm, alecs
There are 3 possible layers of caching that return you the previous
page:
browser
Django
Apache
The 1st is solved by appending the timestamp or random number as
additional fictional GET parameter (jQuery does it automatically when
you pass the cache: false to the ajax call)
The 2nd is solved by
It was a firefox+firebug issue. Firefox 3.0.11+firebug 1.3.3 Opera
opens this page ok :(
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Hi,
I have such form:
class Cremator(forms.Form):
temperature = forms.IntegerField()
description = forms.CharField(widget =
ColoredCrematorDescriptionWidget)
I want following:
If temperature field is greater than 1000C then description must be
rendered in red color (using
92 matches
Mail list logo