You've got a syntax error in your code, likely wherever you have
"return Poll.objects.filter(" in your code.
"Outside a function" likely means that you have not correctly indented
your code, for example if your return has no indentation. Whitespace
in Python is significant and is part of the
Mike,
Thanks for responding. I put an example of what I am trying to accomplish
below with your code in it. When I add or update a value in the admin, is
there a way to have the code add the user automatically? Seems like the
solution you proposed only allows me to manually set the values in
Hi
I have a super class Job that will never be instantiated on it's own,
although is not Meta.
There are two other models, WorkshopJob and EngineeringJob, which have
o2o links to a Job.
On creation of either WorkshopJob and EngineeringJob, a new Job is made.
The problem arises because any
hello,
i want to use foundation frame work in django for front end . DO can any
one say how to use foundation frame work for django?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from
Hello,
I was tooling along in the 1.6 tutorial quite well when I came across this
error, and I'm not sure what to make of it:
return Poll.objects.filter(
SyntaxError: 'return' outside function
The test.py (below) is failing 9 of 12 tests with this error:
*import datetime*
*from django.utils
Hi Michael,
There's nothing built into Django 1.7, or any previous version; however,
it's also not hard to implement yourself. All you have to do is override
the save method on your model, and in that method, and store whatever audit
information you want to record. So, for example, if you want to
On 17/09/2014 3:22 AM, Michael Martin wrote:
Mike,
Thanks for responding.
I seem to be getting an error when I try to make foreign keys in my
model. Do you have any idea why?
My Model that I am adding is called GeneralSetting
I am now importing:
from django.db import models
from
Dear Jay,
I just tried to following in my wsgi.py file:
import os
import sys
import site
import locale
site.addsitedir('/mypath/lib/python3.3/site-packages')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test.settings")
os.environ['HTTPS'] = "on"
sys.path.append('/mypath/test')
Thanks for your reply Ulrich.
If I set the locale in WSGI would that persist for all connections? If so
that sounds like the best option.
Thanks
Jay
On Tuesday, September 16, 2014, wrote:
> Hi,
> I ran into a similar problem yesterday while programming a web shop
We implemented a simple SOAP service using SoapLib 0.8 in our Django
project a long time ago. We think he created an API document that we want
to send to clients. I have a vague recollection that he somehow
auto-generated the APIs from the source code. However, we can't find the
document and
Mike,
Thanks for responding.
I seem to be getting an error when I try to make foreign keys in my model.
Do you have any idea why?
My Model that I am adding is called GeneralSetting
I am now importing:
from django.db import models
from django.contrib.auth.models import User
I added under my
scrub this may bad found I was re-writing the error message to "" later on
d'oh
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
pattern =
re.compile(ur'^(?=\d{2}([\/])\d{2}\1\d{4}$)(?:0[1-9]|1\d|[2][0-8]|29(?!.02.(?!(?!(?:[02468][1-35-79]|[13579][0-13-57-9])00)\d{2}(?:[02468][048]|[13579][26])))|30(?!.02)|31(?=.(?:0[13578]|10|12))).(?:0[1-9]|1[012]).\d{4}$')
goodmatch = re.match(pattern, date_from)
#
On 16/09/2014 2:02 PM, Pitchblack wrote:
Is there a way to add the user to the data model, so it knows who
created the record and who updated it last?
You need to establish a couple of foreign key fields in your model (eg
created and updated) which both link to auth.user. Then grab
Hi,
I ran into a similar problem yesterday while programming a web shop with
Django (Version 1.6, Python version 3.3) where language switching should
immediately have an effect on the way prices, etc. are displayed (doing so
by a in the template and
redirecting back to the page where it was
hi I want to know how to display the elements from a database in a django
forms ? i use postgresql . please help me
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
Hello,
I am running Django/python on Ubuntu. I am finding that my locale is not
setup correctly. Running locale from the command line shows this:
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
17 matches
Mail list logo