Hi, I'm converting to the excellent mod_wsgi and wondering if it's
possible to make a single httpd virtual host/wsgi file to manage
wildcard subdomains.
Basically I have an app where i'm creating a new instance for each
client and using subdomains. So client1.example.com and
client2.example.com
Oleg Oltar wrote:
> Hi!
>
> I am trying to setup django to use static files for development purposes.
> I used http://docs.djangoproject.com/en/dev/howto/static-files/
>
> But actually failed to serve anything :(
>
> My urls.py
>
> urlpatterns = patterns('django.views.generic.simple',
>
Sounds good. I will probably work with Twill.
Thanks!
On Dec 8, 10:34 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Mon, 2008-12-08 at 20:16 -0800, Jason Sidabras wrote:
> > Sorry, I guess I missed that part.
>
> > In my template it checks if there is a user logged in or not. If there
Thank you for the reply. I tried going the route of using the below.
Is your way better? Since 'in' needs a list as an argument and
SelectMultiple returns a list:
if request.method == "POST" or request.GET.get('page', ''):
search_form = SearchForm(request.POST)
Hi!
I am trying to setup django to use static files for development purposes.
I used http://docs.djangoproject.com/en/dev/howto/static-files/
But actually failed to serve anything :(
My urls.py
urlpatterns = patterns('django.views.generic.simple',
Hello,
I'm running OpenSuSE-11.0 with the lastest version of django and
sqlite3.
When I enter the admin interface to enter data into my database, I got
the error:
OperationalError at /admin/archive/artist/add/
table archive_artist has no column named salutation
Request Method: POST
On Mon, 2008-12-08 at 20:16 -0800, Jason Sidabras wrote:
> Sorry, I guess I missed that part.
>
> In my template it checks if there is a user logged in or not. If there
> is not a user, it defaults the hidden field to send_id=1 and has a
> form to place an email address. If the user is logged
While that makes sense, and I understand the concerns about keeping
documentation focused on highlighting the most common cases, a small
note with the "suspension" information you described near the section
on foreign keys doesn't seem out of place, and would greatly aid
people who might not be
Sorry, I guess I missed that part.
In my template it checks if there is a user logged in or not. If there
is not a user, it defaults the hidden field to send_id=1 and has a
form to place an email address. If the user is logged in the template
uses the pk_id from the user (in the case of
On Mon, 2008-12-08 at 17:46 -0800, Steven Skoczen wrote:
> Hi everyone,
>
> Have run into either a bug or a lack of documentation, and wanted to
> see the consensus here before posting a ticket.
>
> When using a Model with an string foreign key (ie. for a second model
> that appears after the
On Mon, Dec 8, 2008 at 12:52 PM, cyberjack <[EMAIL PROTECTED]> wrote:
>
> Thanks for the idea Karen,
>
> What's the right mechanism for passing the queryset back into the
> form? I don't see an example in the docs.
>
Just pass the queryset= parm into formset creation during post as you do
Hi everyone,
Have run into either a bug or a lack of documentation, and wanted to
see the consensus here before posting a ticket.
When using a Model with an string foreign key (ie. for a second model
that appears after the referencing model), there's no way to make a
modelform work if it's
On Dec 8, 8:00Â am, chewynougat <[EMAIL PROTECTED]>
wrote:
> Could anyone tell me if I can pass the current user to a form wizard
> step so I can prepopulate their object details in the form? If so,
> how?
It depends on where exactly you need to access the current user. If
you can do it *after*
On Mon, 2008-12-08 at 15:00 -0800, Jason Sidabras wrote:
> Hello,
>
> I am working on adding unit testing to my code and the snag I have
> come across is in regards to unit fields.
>
> When user.is_anonymous() I have a hidden field sender_id = 1 which is
> easy to test by:
>
> from
On Mon, 2008-12-08 at 07:11 -0800, Kresimir Tonkovic wrote:
> Hi!
>
> I'm using templetes to generate the HTML body for some reports I send
> daily by email. I do it like this:
>
> context = Context()
> context["some_var"] = some_value
>
>
> resp =
Here comes the question about the proper usage of queryset's distinct
() method. As i have a queryset model.objects.filter
(column='name').distinct() , the distinct method is applied to whole
objects, but i'd like it to be applied to column. Django makes SQL
query "SELECT DISTINCT column,
Could you post your urls.py file for your blog app? It's very easy to
make a mistake in there that results in confusing time-related errors.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
On Dec 9, 8:50 am, Andrew Fong <[EMAIL PROTECTED]> wrote:
> When I'm poking around in my Django app, my development server
> (manage.py runserver) will sometimes quit without raising an exception
> or leaving any messages. I am not tinkering around with the code or
> doing anything that would
Ah! Of course, why didn't I think of that! Works like a charm.
Thx!
2B
On Dec 8, 7:23 pm, Adi Sieker <[EMAIL PROTECTED]> wrote:
> Couldn't you add a method get_range() (or whatever name makes sense in
> your context)
> to the class the object is an instqnce of.
> The method would look
Ok, i got it all sorted out. Thanks Rob and Malcom. It was a problem
in my accounts.urls.py file. I had made some placeholder urls to
edit and save but never put them into the view.py. I commented them
out for now and it worked like a champ.
Its wierd this never poped up in my windows box
When I'm poking around in my Django app, my development server
(manage.py runserver) will sometimes quit without raising an exception
or leaving any messages. I am not tinkering around with the code or
doing anything that would force a reload. It just decides to quit.
I can check the last
Hello All,
I fixed my problem I needed to add a line like this to urls.py:
(r'^uploads/(?P.*)$', 'django.views.static.serve', {
'document_root': 'c:/src/webcomic/uploads' } )
Thanks,
Craig Spry
On Mon, Dec 8, 2008 at 10:49 PM, Craig Spry <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> Just to add
I've not set anything up...
On Dec 8, 1:48 am, "Alex Koshelev" <[EMAIL PROTECTED]> wrote:
> Do you use caching?
>
> On Mon, Dec 8, 2008 at 07:34, garagefan <[EMAIL PROTECTED]> wrote:
>
> > ok... i've been able to figure out how long it takes based on the time
> > stamp... an hour and a half for
Hi Guys,
I've got a model that has a Many to Many relationship on one of the
fields. This relationship is basically on itself though like this:
#
class UserProfile(models.Model):
user= models.ForeignKey(User, unique=True)
friends_new
You're likely going to need to need to run to urlencode function
within the view that processes your ajax request. Should be able to
import using 'from urllib import urlencode' and then 'urlencode(*your
string variable*)'.
R.
--~--~-~--~~~---~--~~
You received
Anyone know of an straightforward way to cluster co-ordinate points
server-side i.e. in geoDjango prior to being displayed on an
openlayers map via a standard KML? At the moment I'm loading some
2000 coordinates from a KML generated by geoDjango but this is quite
understandably slowing the
I have an ajax-style update to a page that inserts html into the page
after it has already loaded (and run template filters, etc). Is there
a way to have the template filters run on the inserted html.
Here are the specifics: A list of folders is displayed upon the
initial load of the page.
On 8 pro, 18:16, "R. Gorman" <[EMAIL PROTECTED]> wrote:
> I ran into the same issue, but different encoding. I found that
> adding a special comment line to the beginning of the python file
> allowed for the desired encoding (source: 2.2.3
> fromhttp://www.python.org/doc/2.5.2/tut/node4.html).
On Mon, Dec 8, 2008 at 10:39 AM, Roland van Laar <[EMAIL PROTECTED]> wrote:
>
> Steve Holden wrote:
>> I am looking at expanding our training offerings for the coming year,
>> and a short course in Django looks like it might be popular. There
>> don't seem to be many Django classes at the moment,
I just want to catch the exception thrown when the query returns nothing.
Thanks, that seems to have done the trick.
[EMAIL PROTECTED] wrote:
> I'm not sure where you got that code snippet from, but DoesNotExist is
> an attribute on model classes, so that shoul read:
>
> except Tag.DoesNotExist.
Yes, that's what my reply to you was about. The below examples work
for ModelChoiceField, you only need to use the same technique on a
ModelMultipleChoiceField, where I - like I wrote - guess you can use a
tuple of initial values, e.g. ("foo", "bar").
/Håkan
8 dec 2008 kl. 18.30 skrev
I'm not sure where you got that code snippet from, but DoesNotExist is
an attribute on model classes, so that shoul read:
except Tag.DoesNotExist.
On Dec 8, 2:52 pm, Info Cascade <[EMAIL PROTECTED]> wrote:
> How do I import the DoesNotExist exception?
>
> This doesn't seem to work:> from
Hi,
On 08.12.2008, at 17:30, Berco Beute wrote:
>
> The 'someInt' is an attribute of an object I pass to the template. It
> varies with each object. I could of course make a dictionary with the
> object and a list of the integers but it would be handy to solve it in
> the template (although you
Your user will not have access to your database from the browser, so
you cannot do any kind of create, update and deletes from templates
directly.
It will always have to go through POST on your views. You could do
some AJAX to avoid web-page roundtrips, but then again, you will be
using views to
I think you are on something here.
Below is what concerns me most in the example:
data[o.name].append(o.model3_set.all().order_by('created')[0])
This will sort the entire model3 table just to get the min value.
And if the db is doing this 6000 times, that is a bit useless.
Have you tried using
Thanks for the idea Karen,
What's the right mechanism for passing the queryset back into the
form? I don't see an example in the docs.
Thanks!
-Josh
On Dec 4, 4:10 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Thu, Dec 4, 2008 at 2:12 AM, cyberjack <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
what I want is use ModelMultipleChoiceField with a queryset but I need
that some of the of the generated be mareked as
I ran into the same issue, but different encoding. I found that
adding a special comment line to the beginning of the python file
allowed for the desired encoding (source: 2.2.3 from
http://www.python.org/doc/2.5.2/tut/node4.html).
Hope that helps,
R.
Steve Holden wrote:
> I am looking at expanding our training offerings for the coming year,
> and a short course in Django looks like it might be popular. There
> don't seem to be many Django classes at the moment, and several of the
> students from our introductory Python classes expressed
If you want to set it to always the same values, you can use the
"initial" argument on your form field.
Pseudo-example (haven't run the code, but it illustrates the solution):
class MyForm(forms.Form):
end = forms.DateField(label="Until", required=False,
initial="2009-11-12")
If you
Why ModelMultipleChoiceField has no atribute 'instance'?
how can I select options in a ModelMultipleChoiceField
Abdel Bolaños Martínez
Ing. Infórmatico
Telf. 266-8562
5to piso, oficina 526, Edificio Beijing, Miramar Trade Center. ETECSA
--~--~-~--~~~---~--~~
The 'someInt' is an attribute of an object I pass to the template. It
varies with each object. I could of course make a dictionary with the
object and a list of the integers but it would be handy to solve it in
the template (although you may argue that such functionality should
stay out of the
Hi,
i'm new in django and i'm using ModelMultipleChoiceField and all works
fine but i need to 'mark' o 'selected' some model objects from the
queryset
have ever someone did something like that???
Abdel Bolaños Martínez
Ing. Infórmatico
Telf. 266-8562
5to piso, oficina 526, Edificio Beijing,
I am looking at expanding our training offerings for the coming year,
and a short course in Django looks like it might be popular. There
don't seem to be many Django classes at the moment, and several of the
students from our introductory Python classes expressed interest in
Django.
Without
Hello Dmitry Dzhus!
On Mon, 08 Dec 2008 18:25:47 +0300 you wrote:
>
> Grigory Fateyev wrote:
> > In all my local projects when I want to use comments contrib, got
> > the error [1]. Django is from last trunk, all *.pyc files from
> > contrib/comments were removed. What it can be?
>
> Have you
If I undestand the problem correctly, in MySQL you could do this in
one query as:
select
m.*,
(select min(created) from model2 where id = m.model2_id) as
first_created,
(select max(created) from model2 where id = m.model2_id) as
last_created
from model1 m
;
I don't know how that
Grigory Fateyev wrote:
> In all my local projects when I want to use comments contrib, got the
> error [1]. Django is from last trunk, all *.pyc files from
> contrib/comments were removed. What it can be?
Have you wiped out `urls/` subdirectory (left there from previous Django
version) from
Hi!
I'm using templetes to generate the HTML body for some reports I send
daily by email. I do it like this:
context = Context()
context["some_var"] = some_value
resp = render_to_string("daily_report.html", context)
msg = EmailMultiAlternatives(
_(u'Daily
Could anyone tell me if I can pass the current user to a form wizard
step so I can prepopulate their object details in the form? If so,
how?
Thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
>
> The code I pasted (poorly) *is* the model code that causes the
> problem, minus the last couple of field entries.
The code you pasted earlier uses the attribute name 'fields' where it
should use the name 'fieldsets'. The former is used when you are
providing a simple list of field names
I am still having trouble with Safari and cookies. I can login only
sometimes with Safari. About half the time I receive an error page.
There is a login box on all the pages of my site. Since I need to set
a test cookie before users login, I have the following code in a class
that is in the base
On 8 déc, 14:28, taleinat <[EMAIL PROTECTED]> wrote:
> I have a Django application, and I wrote an external script which
> reads and writes to the Django database. I've started getting the
> following exception consistently:
>
> Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out
I have a Django application, and I wrote an external script which
reads and writes to the Django database. I've started getting the
following exception consistently:
Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out of
sync; you can't run this command now") in > ignored
Has
Just so that everybody knows how I am running the fcgi daemon:
PYTHONPATH=/repo/django_src /usr/bin/python2.4 manage.py --
settings=PRODUCTION_settings runfcgi method=prefork host=127.0.0.1
port=8080
On Dec 8, 6:00 pm, madhav <[EMAIL PROTECTED]> wrote:
> I have a very strange problem. My
I have a very strange problem. My project directory has got a
directory named "utils" and all the modules related to the utils
folder are not getting imported. All the rest are getting imported.
That too this problem is only when I run the fcgi daemon(app server).
When I try to import the same
Hello All,
Just to add to what I've said below, when I point the browser at the
image url like this:
http://localhost:8000/uploads/comics/john7_web.png
I get a 404.
Craig
On Mon, Dec 8, 2008 at 10:34 PM, Craig Spry <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I have an image stored in a
Hello!
In all my local projects when I want to use comments contrib, got the
error [1]. Django is from last trunk, all *.pyc files from
contrib/comments were removed. What it can be?
Thanks!
[1] Exception Value:Caught an exception while rendering: Reverse
for '' with arguments '()' and
Hello All,
I have an image stored in a models.ImageField that looks like this:
comic = models.ImageField(upload_to='comics')
and I have this in the settings.py
MEDIA_URL = 'http://localhost:8000/uploads/'
and in the template I have this:
And all I see in the rendered page is the comic.name.
On 8 déc, 08:53, Sotiris Kazakis <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Thank you for your answer.
>
> I try : tbData = tableName.objects.values(*strFld.split(","))
>
> but that error appears :
>
> File "/var/lib/python-support/python2.4/django/db/models/sql/query.py",
> line 1503, in
On 7 déc, 21:48, "sotiris.kazakis" <[EMAIL PROTECTED]> wrote:
> hello,
>
> I search a lot about the use of object.values() but don't get what I
> want.
>
> I want to put dynamically (with a string ?)
Better to use a sequence of strings IMHO.
> the fields that I want to
> get from a model. i.e.:
I have been hunting around but can't find a solution to this problem:
It is probably best described with an example
Example:
class Author(models.Model):
name= models.CharField()
location = models.CharField()
class Book(models.Model):
name= models.CharField()
Got it!
I've been actively using GNU/Linux since mid-90's and it's always the
same issue... permissions...
I got the OTHER_DJANGO_PATH pointing to a root-only directory, so
apache (or mod_python), wisely, ignored it and, so, went on until site-
packages gloriously appeared.
I just can't
On Dec 8, 10:15 pm, Pablo Ruiz Múzquiz <[EMAIL PROTECTED]> wrote:
> Hmm. That is exactly what I meant with "No matter what I do with
> Apache's PythonPath".
> I have that same configuration you posted and /admin (and other stuff)
> won't work (most certainly because of the django version
Hmm. That is exactly what I meant with "No matter what I do with
Apache's PythonPath".
I have that same configuration you posted and /admin (and other stuff)
won't work (most certainly because of the django version mismatch)
The two errrors are "no module named urls" and "Viewdoesnotexist ..
danlester 写道:
> There are some posts on this list from a year or two ago suggesting
> that there is a contrib module allowing a SOAP server to be built in
> Django easily. It certainly isn't part of Django 1.0.2...
>
> Has anyone built a SOAP server using Django recently?
>
> I've been able to
Hi There,
So, I am trying "
http://docs.djangoproject.com/en/dev/topics/http/file-uploads/;, but can't
see the results.
I mean, I am confused because I don't know where to place the template
(which I believe has to be "contact.html"). I have a folder
"/mysite/templates/" and the tutorial
On Dec 8, 10:25 am, Vicky <[EMAIL PROTECTED]> wrote:
> Is there any way to insert, retrieve, delete and update tables in a
> database from templates itself?
Well, retrieving is what you do when you display data, but for the
rest the answer is *definitely not omg why would you want to do such a
Is there any way to insert, retrieve, delete and update tables in a
database from templates itself?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Yea that was the mistake :) it wrks fine nw
On Dec 8, 3:16 pm, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Dec 8, 9:31 am, Vicky <[EMAIL PROTECTED]> wrote:
>
>
>
> > I tried to use the code
> > below:
> > {% ifequal oftype
> > 'first_name' %}
> >
On Dec 8, 9:31 am, Vicky <[EMAIL PROTECTED]> wrote:
> I tried to use the code
> below:
> {% ifequal oftype
> 'first_name' %}
> {% for item in
> datas.first_name %}
>
Thank you very much Karen.
Indeed, reading Django docs I was getting something very close to what you
sent to me, but I am still failing to render (still have difficult to debug,
but getting there). With your example I believe can solve the issues I have.
I will describe what I want to do.
We
I tried to use the code
below:
{% ifequal oftype
'first_name' %}
{% for item in
datas.first_name %}
{{ item
}}
72 matches
Mail list logo