Oh, thank you very much!
Ho could i forget about that :)
On 30 июн, 09:23, "Andrews Medina" <[EMAIL PROTECTED]> wrote:
> 2007/6/29, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
>
>
> > Hello,
>
> > I have a model with ImageField, i want to let users to upload their
> > own images or select existing f
Request Method: POST
Request URL: http://127.0.0.1/topic/add/
Exception Type: TypeError
Exception Value: unsupported operand type(s) for +: 'NoneType' and
'int'
Exception Location: E:\Django Workspace\mybar\..\mybar\bar\views.py in
add_topic, line 71
Python Executable: E:\Python25\python.exe
Pytho
段叶飞 wrote:
> Request Method: POST
> Request URL: http://127.0.0.1/topic/add/
> Exception Type: TypeError
> Exception Value: unsupported operand type(s) for +: 'NoneType' and
> 'int'
> Exception Location: E:\Django Workspace\mybar\..\mybar\bar\views.py in
> add_topic, line 71
> Python Executable: E
han.
I'm a newbie,
I've got it, thank you very much
On Jun 30, 6:08 pm, Horst Gutmann <[EMAIL PROTECTED]> wrote:
> 段叶飞 wrote:
> > Request Method: POST
> > Request URL:http://127.0.0.1/topic/add/
> > Exception Type: TypeError
> > Exception Value: unsupported operand type(s) for +: 'NoneType' a
Hi all,
I have two sites that run nearly identical django instances. I wonder
if it's possible to somehow set per-domain ROOT_URLCONF and
TEMPLATE_DIRS to serve both sites from one django process.
--
Sincerely,
Vladimir "Farcaller" Pouzanov
http://hackndev.com
--~--~-~--~~-
On Sat, 2007-06-30 at 14:38 +0300, Vladimir Pouzanov wrote:
> Hi all,
>
> I have two sites that run nearly identical django instances. I wonder
> if it's possible to somehow set per-domain ROOT_URLCONF and
> TEMPLATE_DIRS to serve both sites from one django process.
>
No, this isn't possible. T
On 6/30/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
...
> No, this isn't possible. The settings file is read once and then the
> settings are cached (and are assumed to be static).
Actually, it *is* possible to alter the urlconf that's processed on a
per-request basis, though TEMPLATE_DIR
On Sat, 2007-06-30 at 07:29 -0500, Jeremy Dunck wrote:
> On 6/30/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> >
> ...
> > No, this isn't possible. The settings file is read once and then the
> > settings are cached (and are assumed to be static).
>
> Actually, it *is* possible to alter the
I have defined a dictionary of lookup arguments in my manages so I can
reuse them everywhere I want the same behavior...
On Jun 10, 3:12 am, Jonathan Stockdill
<[EMAIL PROTECTED]> wrote:
> I found myself in a similar position and used the following:
> def get_next_pub(self):
>return
Vladimir Pouzanov wrote:
> Hi all,
>
> I have two sites that run nearly identical django instances. I wonder
> if it's possible to somehow set per-domain ROOT_URLCONF and
> TEMPLATE_DIRS to serve both sites from one django process.
Why not just have two settings files? If you have common setting
Hi All,
There are n Classes in myapp/models.py
class Product_1(models.Model):
part_number = models.CharField(maxlength=20, unique=True)
...
class Product_2(models.Model):
part_number = models.CharField(maxlength=20, unique=True)
...
...
class Product_n(models.Model):
part_
Hello, Malcolm.
I have tested the 5559 revision, the boulder sprint is now in the
trunk, good news..
I have found the comment in source code, in the base.py (oracle
backend), that cx_Oracle can't handle unicode parameters, so for now
casting to str is used now.
I found changeset in unicode-branch
Hi,
2007/6/30, Davide.D <[EMAIL PROTECTED]>:
>
> Hi All,
>
> There are n Classes in myapp/models.py
>
> class Product_1(models.Model):
> part_number = models.CharField(maxlength=20, unique=True)
> ...
>
> class Product_2(models.Model):
> part_number = models.CharField(maxlength=20, un
>
> class Author(models.Model):
> user = models.ForeignKey(User,related_name='authors')
> Name = models.CharField(maxlength=50)
> Social_Number1 = models.PositiveIntegerField()
> Social_Number2 = models.PositiveIntegerField()
> Post_Code1 = models.PositiveSmallIntegerField()
>
I try to make multi user system.
That's why I try to pass username parameter into the url to distinguish each
user.
I tried what you googled already.
But this is not what I want it. Because in this reference, I have no way to
pass username parameter into the url
If you get my point, can you hel
Thanks for your suggestion.
Products have their own part_number, but their property are very
different.
class Product_1(models.Model):
part_number = models.CharField(maxlength=20, unique=True)
property_1_1 = models
property_1_2 = models
property_1_3 = models
...
c
Top8hyip is a private investment program, backed up by Gold, Forex,
Bonds, Stocks trading, and investing in various funds and activities
all over the world. Our mission is to provide our investors with a
great opportunity for their funds by investing as prudently as
possible in various arenas to g
On 6/30/07, Davide.D <[EMAIL PROTECTED]> wrote:
> Products have their own part_number, but their property are very
> different.
If you don't throw everything in the same table, then you'll have to
query each table individually.
You can loop through, querying until you find a match, or query all
I know, it's not really a good idea, but my linux machine is not
available right now. I can get to create a project by adding c:
\python25\lib\site-packages\django-0.96 to PATH, but I'm getting
"ImportError: No module named django.core.management". c:\python25\lib
\site-packages is in sys.path.
Hi,
I want to use django as DB backend for an application I am writing,
but I run into a problem when using ManyToManyFields. They don't seem
to resolve. A minimal testcase of what I mean can be found on
http://paste.ubuntu-nl.org/27980/
print m2.modelones.all() will trigger a TypeError as shown
On 6/30/07, Dennis K. <[EMAIL PROTECTED]> wrote:
> but I run into a problem when using ManyToManyFields. They don't seem
> to resolve.
...
> I'm using django 0.95.1 with python 2.4.4 on Ubuntu 7.04 -- can
> anybody hlp me solve this?
I think this (both test case and error) should be filed as a ti
On 6/30/07, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
>
> Vladimir Pouzanov wrote:
> serve both sites from one django process.
>
> Why not just have two settings files?
Two settings files being used by a single process?
How would that work?
--~--~-~--~~~---~--~~
Y
I think you didn't run the commad in your Django-0.96 directory
"python setup.py",
It will copy the django-0.96 to c:\python25\lib\site-packages\,
You can try it
On Jul 1, 12:54 am, Jim <[EMAIL PROTECTED]> wrote:
> I know, it's not really a good idea, but my linux machine is not
> available righ
On Jun 30, 8:19 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On 6/30/07, Dennis K. <[EMAIL PROTECTED]> wrote:
>
> > but I run into a problem when using ManyToManyFields. They don't seem
> > to resolve.
> ...
> > I'm using django 0.95.1 with python 2.4.4 on Ubuntu 7.04 -- can
> > anybody hlp me
On 6/30/07, Dennis K. <[EMAIL PROTECTED]> wrote:
> The magic behind ManyToManyFields relies on all models (well, the
> models used in the relationship) being present in an appname.models
> module. When I did that, the thing magically worked.
Yeah, ORM lookups are implemented by descriptors which
hi
views.py
--
from django.http import HttpResponse
from django.template import Context, loader
from django.http import HttpResponse
#from adv.models import User
from adv.models import *
def adv_index(request):
return HttpResponse("
On 6/30/07, Jim <[EMAIL PROTECTED]> wrote:
> I know, it's not really a good idea, but my linux machine is not
> available right now. I can get to create a project by adding c:
> \python25\lib\site-packages\django-0.96 to PATH, but I'm getting
> "ImportError: No module named django.core.management
For the record, I modified a little bit my object but the key was in
precising a lot |dictsort like the following case :
{# -- Compétences techniques -- #}
{% if user_techskill %}
Compétences techniques :
{% for tskill in user_techs
oh yeah... thanks.
I have head of BeautifulSoup - never used it before. my pages html are now
much
more readable.
Carl K
Michael Trier wrote:
> Make sure you have an __init__.py in that directory.
>
> Michael
>
> On 6/29/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
>> Carl Karsten wrote:
>>
Hi list!
I have a problem when I'm trying to import the model 'Tag'
from django-tagging outside an application.
My file import-delicious.py is located in the project root
directory where the apps are, too. The file looks like this:
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from
Yeah, thanks for the info. It's a nice addition.
Michael
On 6/30/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
>
> oh yeah... thanks.
>
> I have head of BeautifulSoup - never used it before. my pages html are now
> much
> more readable.
>
> Carl K
>
> Michael Trier wrote:
> > Make sure you have
On 6/30/07, Young Gyu Park <[EMAIL PROTECTED]> wrote:
> > class Author(models.Model):
> > user = models.ForeignKey(User,related_name='authors')
> > class Blog(models.Model):
> > author = models.ForeignKey(Author,related_name='blogs')
> > class Entry(models.Model):
> > blog = models.For
On Sat, 2007-06-30 at 14:57 +, Davide.D wrote:
> Hi All,
>
> There are n Classes in myapp/models.py
>
> class Product_1(models.Model):
> part_number = models.CharField(maxlength=20, unique=True)
> ...
>
> class Product_2(models.Model):
> part_number = models.CharField(maxlength=
On Sat, 2007-06-30 at 14:35 -0500, Jeremy Dunck wrote:
> On 6/30/07, Dennis K. <[EMAIL PROTECTED]> wrote:
> > The magic behind ManyToManyFields relies on all models (well, the
> > models used in the relationship) being present in an appname.models
> > module. When I did that, the thing magically w
A heads-up for anybody using Fedora 7 (and probably useful for those
hanging out answering questions on IRC, too):
Fedora recently updated the MySQLdb-python package to 1.2.2-2 and, in
the process, introduced a fairly annoying backwards incompatibility.
They changed MySQLdb.version_info to be a s
ViewDoesNotExist: Could not import
django.views.generic.list_detail.django.views.generic.list_detail. Error
was: No module named django.views.generic.list_detail
I fixed my code as Bill Fenner point out. but I got this error message.
I don't use generic view in my url or view.
How come this coul
Jeremy Dunck wrote:
> Two settings files being used by a single process?
>
> How would that work?
Oh... I missed the bit about a single process. But now I wonder why
require this? One server can happily serve two sites either from
separate mod_python handlers or separate FastCGI servers.
Vlad
Like this? ( database: mysql )-->
...
q = request.REQUEST['q']
...
from django.db import connection
cursor = connection.cursor()
cursor.execute("SELECT * FROM table_1, table_2, table_3 WHERE
part_number = %s", [q])
resultset = cursor.fetchone()
But it doesn't work:
I'm a bit confused about the right way to get data from a form to a
model. I'm working with a model and form for which I don't want to
use form_for_model, so I am defining a newform manually. Once the
form is validated, I want to pass form.cleaned_data to instantiate the
model object and then sa
On Sun, 2007-07-01 at 05:46 +, Davide.D wrote:
> Like this? ( database: mysql )-->
> ...
> q = request.REQUEST['q']
> ...
> from django.db import connection
> cursor = connection.cursor()
> cursor.execute("SELECT * FROM table_1, table_2, table_3 WHERE
> part_number = %s
On Sat, 2007-06-30 at 23:00 -0700, Steve Bergman wrote:
> I'm a bit confused about the right way to get data from a form to a
> model. I'm working with a model and form for which I don't want to
> use form_for_model, so I am defining a newform manually. Once the
> form is validated, I want to pa
Is there any facility in Django which takes advantage of postgresql's
support of arrays? I'd like to be able to store the list returned by
a SelectMultiple to an array of strings. Currently, I am converting
the list to comma separated values to store in the database, but it
would be nice to stor
> Probably best to give a (short) code example showing how you are trying
> to do this. Creating a model as MyModel(**some_dict) works, since that
> is exactly the same as explicitly passing in keyword arguments, so maybe
> you are doing something odd somewhere else.
Thank you. I was trying to d
hi
my db is sqlite3
when i use admin , i shows me the tables but i can't do anything with
them :
Database error
Something's wrong with your database installation. Make sure the
appropriate database tables have been created, and make sure the
database is readable by the appropriate user.
what's
>If you don't want to do that, just construct one queryset for each model
>and then join the results together in Python. You get to decide which
>trade-off you prefer: more queries and simpler code (appropriate if you
>have only a few models and/or not many results) or fewer queries and
>more comp
On Sun, 2007-07-01 at 06:31 +, Davide.D wrote:
> >If you don't want to do that, just construct one queryset for each model
> >and then join the results together in Python. You get to decide which
> >trade-off you prefer: more queries and simpler code (appropriate if you
> >have only a few mode
On 7/1/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> > Queryset is not a list?
>
> I think you know the answer to your own question. :-)
See itertools.chain if you want them to stay lazy. If you don't care
about giving up laziness, just list() each qs.
--~--~-~--~~
47 matches
Mail list logo