On Wed, Feb 3, 2010 at 7:46 AM, Waqqas Jabbar wrote:
> Hi,
>
> I am thinking of making a "theme" application. The idea is to change the
> theme of the site easily from a list of available them (like in gmail).
> The theme selection can be based on
> - User (every user can choose her own theme)
> -
Sam, thanks for your help. Problem solved, partly with your advice. I
had two versions of Python on the same machine, and they were
interacting oddly. The 2.6 was being used when I type "python" at the
command line, but the 3.1 was being invoked for .py filetypes at the
CMD prompt.
Best wishes,
N
Hi,
Oh, sorry, but i guess it really was a bit wague:
-- base.html --
{% block extrahead %}
{% endblock %}
{% include "menu.html" %}
sub_page would look like you wrote and that works fine. But what i
want now (and i guess isnt possible and im just on the wrong way here
^^) is :
-- menu.h
Then it doesn't match the plus sign. I guess I need to put something
in my regex to match that as well?
--
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
On Feb 2, 5:56 pm, timc3 wrote:
> Well the space was still an issue it seems.
>
> I have the following urlconf:
>
> url(r'^group_view/(?P[-\w\s]+)/$', 'mysite.views.vs_group_view',
> name="group_view"),
>
> Which matches the whitespace but my URL reverse match still breaks.
>
> Any ideas?
The {%
Thanks!
Adding the m2m field helped, and the address was simply /product/?
has_standard="pk"
On Feb 3, 12:42 am, Woongcheol Yang wrote:
> Let's say your model looks like the following:
>
> class Standard(models.Model):
>
> class Product(models.Model):
> has_standard = models.ManyToManyField(
Hi!
When i create some changes in my page, i need restart apache server.
How can i avoid restarting?
--
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 gro
On Feb 2, 7:56 pm, timc3 wrote:
> Well the space was still an issue it seems.
>
> I have the following urlconf:
>
> url(r'^group_view/(?P[-\w\s]+)/$', 'mysite.views.vs_group_view',
> name="group_view"),
>
> Which matches the whitespace but my URL reverse match still breaks.
>
> Any ideas?
You are
On Wednesday 03 February 2010 05:51:59 Ovnicraft wrote:
> 2010/2/2 Shawn Milochik
>
> > There is much to say on this topic. I suggest doing some Google
searching
> > on "Django versus PHP" and read until you know the answer to your
> > question.
> >
> > My brief summary is that Django lets
On Mon, Feb 1, 2010 at 11:07 PM, Klemens Mantzos
wrote:
> hi list,
>
> checked out the new multidb feature
> (http://docs.djangoproject.com/en/dev/topics/db/multi-db/).
>
> i assumed that syncdb would only sync those models in the database
> when calling allow_syncdb() of the database routers retu
Ideally, yes, the design should only by in CSS, but how about we want to
make a theme for mobile user? The contents of the page (html) can not be the
same.
Having different html for theme helps in incorporating different CSS.
A middle ground can be to have different "base.html" for each theme. Thi
I am trying out the new model validation feature in svn trunk, but I
doubt I am doing this right.
Specifically, for a model I have the following: -
def clean(self):
from django.core.exceptions import ValidationError
if self.is_current and self.to_date is not None:
rais
Hi to all,
I'm having some trouble with setting up a session with one of my
clients. Which is: I've spent a good part of my day chasing ghosts
trying to find out where it goes wrong.
For some reason every request that client does shows up with a
different session_id in my django_session table. Th
I'll only reply to (2): Django is very suitable for web apps. I'm
building one and I've never felt limited in any way. Django lets you
write your own templates, so adding heavy ajax interfaces is painless.
I can't give you pointers because it's a custom in-house thing, but
it's close to 30k lines
This is my view:
http://dpaste.com/154088/
I did some testing and the error is coming from this line:
new_green.hp_coursepoints = new_green.hp_grade * hp_credithours
Here's my model now:
http://dpaste.com/154091/
Any ideas on how to fix this and the math work?
hp_coursepoints is a DecimalFie
hi,
i need to authenticate users through ldap but i need also to store their
preferences in the database, i cant really understand if
django-auth-ldap (http://packages.python.org/django-auth-ldap) only
authenticats the users over ldap or if it creates a real user object in
django.
i even found th
On 03/02/10 13:41, andreas schmid wrote:
hi,
i need to authenticate users through ldap but i need also to store their
preferences in the database, i cant really understand if
django-auth-ldap (http://packages.python.org/django-auth-ldap) only
authenticats the users over ldap or if it creates a r
Daishy,
I don't think you can do that with an include tag. You could do it by
defining a "base_with_menu.html" and having it extend "base.html" You
could make a menu block in base and override it in
base_with_menu.html.
Hope that helps,
Alex
On Feb 3, 3:28 am, Daishy wrote:
> Hi,
> Oh, sorry, b
im trying to get it working, i configured my settings.py like this:
import ldap
from django_auth_ldap.config import LDAPSearch, GroupOfNamesType
# Baseline configuration.
AUTH_LDAP_SERVER_URI = "ldap://myldapurl:myportnumber";
AUTH_LDAP_BIND_DN = ""
AUTH_LDAP_BIND_PASSWO
Chris McComas wrote:
I tried this, but no luck:
new_green.hp_coursepoints = Decimal(new_green.hp_grade) *
hp_credithours
Decimal can't directly convert floats to decimals.
Try:
new_green.hp_coursepoints = Decimal(str(new_green.hp_grade)) *
hp_credithours
or
new_green.hp_coursepoints = De
Hi Waqqas,
> Ideally, yes, the design should only by in CSS, but how about we want to
> make a theme for mobile user? The contents of the page (html) can not be the
> same.
> Having different html for theme helps in incorporating different CSS.
I working on a CMS that uses that idea. I have theme
On Wed, Feb 3, 2010 at 7:43 AM, chefsmart wrote:
> I am trying out the new model validation feature in svn trunk, but I
> doubt I am doing this right.
>
> Specifically, for a model I have the following: -
>
> [snip]
> AttributeError: 'ValidationError' object has no attribute
> 'message_dict'
>
>
thx!
syncdb is now calling the database router before actually syncing to
the db. but...
...stumbled upon a new problem:
if i do
python manage.py syncdb --database=default
before i sync the users database this error comes up (which seems ok to me):
django.db.utils.DatabaseError: (1146, "Table
'm
Hi
I really liked your post, it captures the feeling where you were
walking down a path, feeling fine and suddenly you open a door... and
find that all the time you've been in an underground tunnel!
On Wed, Feb 3, 2010 at 2:39 AM, Delifisek Tux wrote:
> WTF !??
>
> How can they wrote web apps w
Javier,
WORKED PERFECT! THANK YOU ALL SO MUCH! :)
On Feb 3, 9:50 am, Javier Rivera wrote:
> Chris McComas wrote:
> > I tried this, but no luck:
>
> > new_green.hp_coursepoints = Decimal(new_green.hp_grade) *
> > hp_credithours
>
> Decimal can't directly convert floats to decimals.
>
> Try:
>
> n
On Wednesday 03 February 2010 13:30:34 Zygmunt wrote:
> Hi!
> When i create some changes in my page, i need restart apache server.
> How can i avoid restarting?
>
Ummm, it was not a problem.
It was a feature. Which I realize now.
(if I understood correctly, please correct me if I was wron
Hi,
As per usual, I am probably just being really dappy, but I can't see a
good way to do this.
I have a model that has about 10 fields, and I may be populating each
record with at least one field, but probably less that 4 (could be any
4 of the 10 though). The others will be null or empty string
Over the course of a year or two of manual database twiddling, I've
fairly well messed up my table indexes and whatnot. In particular, I'm
getting lots of "duplicate key names" when installing fixtures for
testing, and generic foreign keys that point at contenttypes that no
longer exist.
How about using the key/value pairs in self.__dict__ that have a value?
Alternately, have a look at the help of instance._meta and see if that has
anything useful for you.
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
On 03/02/10 14:45, andreas schmid wrote:
AUTH_LDAP_BIND_DN = ""
AUTH_LDAP_BIND_PASSWORD = ""
AUTH_LDAP_USER_SEARCH = LDAPSearch("dc=example,dc=com",
ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
You're using uid here, but
# Set up the basic group parameters.
#
Hi Sam,
Thanks for the advice. Unfortunately, our VISTA systems are so locked
down that I can't adjust any of the advanced settings in IE7. Don't
even get me started on how irritating our corporate IT is...
At any rate, I was able to install Fiddler2 on a thumb drive and run
it from there. It
On Feb 3, 3:48 pm, Shawn Milochik wrote:
> How about using the key/value pairs in self.__dict__ that have a value?
That does pretty much the same as above (although granted it doesn't
give me the meta fields I don't care about).
> Alternately, have a look at the help of instance._meta and see if
thanks... ill check this asap.
David De La Harpe Golden wrote:
> On 03/02/10 14:45, andreas schmid wrote:
>
>
>> AUTH_LDAP_BIND_DN = ""
>> AUTH_LDAP_BIND_PASSWORD = ""
>> AUTH_LDAP_USER_SEARCH = LDAPSearch("dc=example,dc=com",
>> ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
>>
>
>
Hello,
I'm trying to store Django data on MS SQL Server 2005 using:
http://code.google.com/p/django-pyodbc/ (pyodbc + FreeTDS)
As long as I'm storing string consist of ASCII characters everything
is ok. When I'm using unicode (ex. '\xc5\x82'), django throws
ProgrammingError on:
ProgrammingError
I'm trying to sort out a problem in the console with editing an
object. The user-reported problem, which I verified, is that changes
made in the edit form are not made in the database; the user gets no
error message, but their changes aren't made, either.
I narrowed the problem down to form valida
hi
I have an Entry class that has no title but is to be represented
uniquely by a combination of its category and a datetime value.The
Category has a name field.I have modelled these like
class MyCategory(models.Model):
name=models.CharField(max_length=10)
description=models.TextF
This is kinda of a general and kind of a specific question. I have
this in my view:
http://dpaste.com/154208/
The first line adds up perfectly, but the second one doesn't and
throws an index out of range error.
What is the problem?
cog.interview_score and cog.interview_score_conv are both
Decim
OK, we managed to solve this ourselves.
W dniu 3 lutego 2010 18:08 użytkownik Filip Gruszczyński
napisał:
> Hello,
>
> I'm trying to store Django data on MS SQL Server 2005 using:
>
> http://code.google.com/p/django-pyodbc/ (pyodbc + FreeTDS)
>
> As long as I'm storing string consist of ASCII cha
It doesn't work because an instance of the Decimal object can't be used for
mathematical calculations (such as division and multiplication) with floats or
integers.
If you replace this:
100 / 25
with:
Decimal(str(100 / 25))
or:
Decimal("4")
It should work.
Shawn
--
You received this m
On Feb 3, 2010, at 1:30 PM, Filip Gruszczyński wrote:
> OK, we managed to solve this ourselves.
>
It would be nice if you mentioned what the cause was in detail, and what the
fix was.
Just in case someone finds your posts many months from now and is trying to
solve the same problem.
Shawn
stupid newbie question - i installed django and have been going
through the tutorials. i understand python has installed a webserver
that runs when i do a 'manage.py runserver'. Can anyone tell me where
the localhost directory is on my filesystem? thanks in advance
--
You received this message
Sure. In file freetds.conf you should set
client charset = UTF-8
and it started to work. I heard, that there might be still some
problems with, but we haven't yet encountered them.
2010/2/3 Shawn Milochik :
>
> On Feb 3, 2010, at 1:30 PM, Filip Gruszczyński wrote:
>
>> OK, we managed to solve t
The localhost isn't a place in your filesystem. It's an alias for the IP
address of your own computer, A.K.A. 127.0.0.1.
When you say that 'Python has installed a webserver,' that's not accurate.
Django comes with a Web server which you invoke when you run './manage.py
runserver,' but it's not
Shawn Milochik wrote:
It doesn't work because an instance of the Decimal object can't be used for
mathematical calculations (such as division and multiplication) with floats or
integers.
AFAIK decimals can be divided and multiplied with integers just fine.
They throw an "unsupported operand"
Hey there,
I have problem with dajaxice. I am trying to save vertex from google
route to my db.
Call of JS function:
Dajaxice.maps.sendRoute('sendRoute_callBack',{'data':array});
function sendRoute_callBack(data){
if(data!='DAJAXICE_EXCEPTION'){
On Feb 3, 5:45 pm, pjmorse wrote:
> I'm trying to sort out a problem in the console with editing an
> object. The user-reported problem, which I verified, is that changes
> made in the edit form are not made in the database; the user gets no
> error message, but their changes aren't made, either.
> i need to authenticate users through ldap but i need also to store their
> preferences in the database, i cant really understand if
> what is the best way to go?
One thing you might consider doing is just write a custom backend:
(http://docs.djangoproject.com/en/1.1/ref/authbackends/#ref-
authe
On Feb 3, 5:56 pm, harryos wrote:
> hi
> I have an Entry class that has no title but is to be represented
> uniquely by a combination of its category and a datetime value.The
> Category has a name field.I have modelled these like
>
> class MyCategory(models.Model):
> name=models.CharField
Edit: Ajax.py not Admin.py
On 3 ún, 20:09, Alexis Selves wrote:
> Hey there,
> I have problem with dajaxice. I am trying to save vertex from google
> route to my db.
> Call of JS function:
> Dajaxice.maps.sendRoute('sendRoute_callBack',{'data':array});
>
> function sendRoute_callBack(data){
>
@klemens you are most definitely not alone.
I made a router that would allow me to have one database per app and I
get exactly the same type of error on both postgres and sqlite. Doing
syncdb on the default db work as it should but when I in this case do
a ./manage.py syncdb --database=ads I get th
Hello Alexis,
Dajaxice returns DAJAXICE_EXCEPTION if your ajax function
(maps.ajax.sendRoute) raises any Exception.
Try to set DAJAXICE_DEBUG=True and see the server console or try:except: the
code inside your ajax function to see what Exception was raised
Hope it helps you.
2010/2/3 Alexis Selve
Hello DAJAXICE_DEBUG = True
in my settings.py is set already..
On 3 ún, 20:22, Jorge Bastida wrote:
> Hello Alexis,
> Dajaxice returns DAJAXICE_EXCEPTION if your ajax function
> (maps.ajax.sendRoute) raises any Exception.
> Try to set DAJAXICE_DEBUG=True and see the server console or try:except:
What version of dajaxice are you using?
The server console hasn't got any output?
Try to print out the logging info:
import logging logging.basicConfig(level=logging.DEBUG)
2010/2/3 Alexis Selves
> Hello DAJAXICE_DEBUG = True
> in my settings.py is set already..
>
> On 3 ún, 20:22, Jorge Bastid
I'm trying to run this IF in my views, it's throwing an index out of
range error.
http://dpaste.com/154249/
What have I done wrong?
--
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.
On Feb 3, 2010, at 2:52 PM, Chris McComas wrote:
> I'm trying to run this IF in my views, it's throwing an index out of
> range error.
>
> http://dpaste.com/154249/
>
> What have I done wrong?
>
Not reading this, mostly:
http://catb.org/~esr/faqs/smart-questions.html
To be slightly more spec
Sorry,
I've tried a few things...
What kind of sucks is I'm just getting an IndexError: list index out
of range which isn't very descriptive.
I know the 'lor' query works, I tweaked my view to this:
http://dpaste.com/154251/
I just put a HttpResponseRedirect below the 'if lor:' to make sure
th
Well, the IndexError narrows down the source of the problem to any time you're
trying to access something by index.
What is lor.rating_recommendation? Is it a field? If so, what type? If it's a
function, what is it doing internally?
Also, exactly what line of what file is throwing that error? L
I take it that you are using python3.x rather than python2.x.
In python 2.x, the expression 100/25 is the integer 4
In python 3.x, the expression 100/25 is 4.0
And as someone already pointed out mixing Decimal and float doesn't work.
Try replacing the 100 / 4 with one of int(100/4) or (100//4) (y
On Feb 3, 8:06 pm, Chris McComas wrote:
> Sorry,
>
> I've tried a few things...
>
> What kind of sucks is I'm just getting an IndexError: list index out
> of range which isn't very descriptive.
>
> I know the 'lor' query works, I tweaked my view to this:
>
> http://dpaste.com/154251/
>
> I just pu
I am new to Django development, and have not been able to find this in
the documentation.
In my templates, if I use any characters that are Unicode and not
straight ASCII e.g. é or ˝, the template fails. Is this normal
behavior? Is there an easy way to expand the templates to handle the
Unicode se
Hello,
I am a new user to Django and have trouble executing the "python
manage.py syncdb" command. I am using a server/client configuration,
where the database is setting on a different Linux (CentOS) server
than the web server (each one is being hosted in VMWare VM). The
"python manage.py syncd
On Wed, Feb 3, 2010 at 3:52 PM, zenWeasel wrote:
> I am new to Django development, and have not been able to find this in
> the documentation.
>
> In my templates, if I use any characters that are Unicode and not
> straight ASCII e.g. é or ˝, the template fails. Is this normal
> behavior? Is ther
I am using django-dajaxice-0.1.0
Console is clear.
How can print out logging info?
Where should I put this:
import logging logging.basicConfig(level=logging.DEBUG)
On 3 ún, 20:47, Jorge Bastida wrote:
> What version of dajaxice are you using?
> The server console hasn't got any output?
>
> Try t
I have a similar problem. In my database is a result class.
You need an exam, a user and the points to create a result and points are
without null-values.
Now I want to use Result.objects.get_or_create(exam=e,user=u) to get the result
if there already is one or create a new one.
This won't work
Hi,
I wrote my current Django app in the 0.96 timeframe and have since
upgraded, and now I have these cool signals available. I have some
model code, like overriding the delete() method to prevent deletion of
certain rows in the table, and I'm curious as to whether that can be
done with the pre_sa
Thank you for your reply I learned something.
Unfortunatelly all model admin registration are made in admin.py
files.
Elsewhere I found an advise to turn debuging on when you launch
manage.py runfcgi
and since I added that parameter to the command line I don't have any
problem.
I'm still looking f
Hi,
So I currently have two models
model Foo(models.Model):
model Bar(models.Model):
foo = models.ForeignKey(Foo)
address = models.IPAddress()
class Meta:
unique_together(('address', 'foo'),)
and this works fine to ensure that the address is unique across each
instance of f
I'm following along James Bennett's tutorials and when I save an entry
as a draft it doesn't show up in the admin interface for further
editing. When I log in with psql I can see the draft in the database
but the admin doesn't show the draft in the entries, however the draft
is listed in the Tagged
Hi, All...
Experienced engineer, new to Django.
In a sample Web app that I'm developing, I have a basic template that
includes (attempts to) a javascript file:
Header
Subheader
{% block content %}
{% endblock %}
When this template is rendered, the resulting HTML page contains the
script
Hi John,
Django doesn't server static files. It leaves that up to the web
server software. Have a read here
http://docs.djangoproject.com/en/dev/howto/static-files/
Most people have a condition URL for serving static files through
django whilst in development. In production you can serve through
Did you configure your Django webapp (settings.py) for serving static
files?
Take a look here:
http://docs.djangoproject.com/en/dev/howto/static-files/
May be this resolve your problem.
x13
On Feb 3, 8:02 pm, jpuopolo wrote:
> Hi, All...
>
> Experienced engineer, new to Django.
>
> In a sampl
I'm writing a bookkeeping system using Django latest code. I would
like to make sure that when certain records are saved, changes are
made to other records.For example, when I save a Sale model in the
admin - or programmatic code - it may create (or update) a bunch of
records in the general l
On Wed, Feb 3, 2010 at 11:02 PM, Klemens Mantzos
wrote:
> thx!
>
> syncdb is now calling the database router before actually syncing to
> the db. but...
>
> ...stumbled upon a new problem:
>
> if i do
> python manage.py syncdb --database=default
> before i sync the users database this error comes
Hi,
Did you make sure your webserver refreshed the application code ? I sometime
had similar issue because different processes had different code versions and
this leads to a totally random behavior.
Also, if you don't have issues while DEBUG=True, you will want to make sure you
have a 404.html
I'm getting this error even though my DJANGO_SETTINGS_MODULE is
defined in my wsgi file:
import os, sys
sys.path.append('/home/username/public_html/mysite.com')
sys.path.append('/home/username/public_html/mysite.com/mysite')
os.environ['PYTHON_EGG_CACHE'] = '/home/username/public_html/
mysite.co
register the class to the admin, you can find it in the source code. And you
can download the source code at apress website.
2010/2/4 neridaj
> I'm following along James Bennett's tutorials and when I save an entry
> as a draft it doesn't show up in the admin interface for further
> editing. Whe
Hiya folks,
I'm having a problem defining a relationship between a model, and
another model that subclasses the first. ie:
class Page(models.Model):
...
sections = models.ManyToManyField('Section',
through='PageSection',
related_name='pages', symmetrical=False, blank=True,
null=Tr
Page not found (404)
Request Method: GET
Request URL: http://www.cadal.zju.edu.cn/djvu_ulib/16003525/0001.djvu
Using the URLconf defined in cadal.urls, Django tried these URL
patterns, in this order:
^personal/?$
^personal/Eng/?$
^personal/addrule/book/?
^personal/delrule/(\d+)/?$
^personal/a
On Wed, Feb 3, 2010 at 9:54 PM, punwaicheung wrote:
> You're seeing this error because you have DEBUG = True in your Django
> settings file. Change that to False, and Django will display a
> standard 404 page.
You're receiving this reply because you didn't ask a question.
--
"Bureaucrat Conrad
http://catb.org/~esr/faqs/smart-questions.html
--
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
On Thu, Feb 4, 2010 at 1:15 PM, Shawn Milochik wrote:
> http://catb.org/~esr/faqs/smart-questions.html
You've posted this link a few times now, Shawn, but I'd rather you
didn't make a habit of doing so.
While ESR's point is valid, and many people would benefit from
following the spirit of his ad
I have an SQL statement in views.py:
karatekas = Karateka.objects.extra(where = ["bsc = 1 OR skr =
1"]).select_related()
This statement runs in a loop an no data will come back.
If I change the little word "OR" to "AND",
karatekas = Karateka.objects.extra(where = ["bsc = 1 AND skr =
1"]).select
I have a list of files I'd like to render as a list of check boxes
with multiple selection. Then from the frontend I want to add the
ability to save and delete these files. How can I achieve this using
CheckboxSelectMultiple() widget ?
Thanks
--
You received this message because you are subscribe
83 matches
Mail list logo