Hi,
I am trying to run a unit test for my models. My unit test is as
follows
import os
import unittest
from myproject import models
DJANGO_PATH = "DJANGO_SETTINGS_MODULE"
os.environ[DJANGO_PATH] = "myproject.settings"
class ModelsTestCase(unittest.TestCase):
user = None
def setUp(self):
I have the following table in models.py
class SiteAccessProcess(models.Model):
"""Object model mapping to the site_access_process table.
Each element in the class represents a table column.
"""
instance_id = models.DecimalField(
blank=False, max_digits=32, decimal_places=0,
h
Thanks for replying Daniel. I wanted to know if I can use generic
views for web application form objects. I would like to use them to
avoid duplication on html pages.
On Sep 25, 1:20 pm, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Sep 25, 8:51 pm, Karthik Krishnan <[EMAIL PROTE
I know this may be a stupid question but please bear with me. Here is
my problem
In views.py I have a multiple methods, where each method is mapped to
a unique model. There may be multiple methods mapped to the same
model. But no method in views.py is mapped to multiple models.
For a GET/POST re
It throws a debug error page.
On Sep 18, 10:01 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On Friday 19 Sep 2008 7:02:06 am Karthik Krishnan wrote:
>
> > The premise is this: If the form validation fails, I want to display
> > all the validation error messages on
Hi,
The premise is this: If the form validation fails, I want to display
all the validation error messages on the top of the page in a special
div tag that I have created.
{% for field, message in form.errors.items()%}
{{message}}
{% endfor %}
returns a compilation error.
I don't want to d
Hi Daniel,
Thanks for your solution. It worked.
Thanks,
Karthik
On Sep 18, 1:46 pm, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Sep 18, 9:34 pm, Karthik Krishnan <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have a form which contains some prefilled data an
Hi,
I have a form which contains some prefilled data and some to be filled
in by the user. I have no trouble getting the forms to be prefilled.
What I want is thatfor a GET request, if the form data pre exists,
then display it; if not, then show a blank text field .
For a post request, if the fie
Hi Steve,
That was the problem. My django package was corrupted. Reinstalling
django package worked.
Thanks,
Karthik
On Sep 17, 4:56 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> Karthik Krishnan wrote:
> > Hi Norman,
>
> > But if I have an empty file, models.py, tha
Hi Norman,
But if I have an empty file, models.py, that should thrown an error.
Thanks,
Kartik
On Sep 17, 1:45 pm, "Norman Harman" <[EMAIL PROTECTED]> wrote:
> Karthik Krishnan wrote:
> > The stack trace is given below
>
> > Traceback (most recent call last
The stack trace is given below
Traceback (most recent call last):
File "manage.py", line 11, in
execute_manager(settings)
File "c:\tools\Python25\Lib\site-packages\django\core\management
\__init__.py",
line 340, in execute_manager
utility.execute()
File "c:\tools\Python25\Lib\site
Sorry duplicate. Accidentally pressed send twice
On Sep 9, 12:37 pm, Karthik Krishnan <[EMAIL PROTECTED]> wrote:
> Hi,
>
> When I try to use django-admin.py to set up my project,
>
> this is the error that I get
>
> chmod: changing permissions of 'django-adm
Hi,
I am sure that this issue has come up before but I could not find in
the forum mailing list.
When I try to run chmod +x django-admin.py , I get the following
error.
chmod: changing permissions of `django-admin.py': Permission denied
Is there something I am doing wrong? Any help would be ap
Hi,
When I try to use django-admin.py to set up my project,
this is the error that I get
chmod: changing permissions of 'django-admin.py' Permissions denied
In addition, I can not set up a project that I want.
I am running django on Windows Vista with a Cygwin shell.
Is there anything I can
14 matches
Mail list logo