> Nowhere. Output is correct and as documented - you get back *RawQuerySet*. Not
> a single value.
>
> So you have to do something like:
>
> maxid = Client.objects.raw('SELECT MAX(job_no) as max_job_no FROM
> CLIENT').values_list('max_job_no', flat=True)[0]
facing this error
AttributeError: 'RawQ
On Thu, Nov 11, 2010 at 01:34:43AM -0600, James Bennett wrote:
> The first alpha preview package for Django 1.3 is now available.
Great!
> * Release notes: http://docs.djangoproject.com/en/dev/releases/1.3-alpha-1/
Is the first paragraph under "Class-based views" incomplete?
With kind regards
now I also try another method to get max(id)
from django.db import connection
cursor = connection.cursor()
cursor.execute('SELECT max(id) FROM automation_client')
maxid = cursor.fetchone()
output is :
(2L,)
but i want only 2 not any other character.
Is any other method to get
On Thu, Nov 11, 2010 at 4:15 PM, Baurzhan Ismagulov wrote:
> On Thu, Nov 11, 2010 at 01:34:43AM -0600, James Bennett wrote:
>> The first alpha preview package for Django 1.3 is now available.
>
> Great!
>
>
>> * Release notes: http://docs.djangoproject.com/en/dev/releases/1.3-alpha-1/
>
> Is the f
On Tuesday 09 November 2010 12:25:30 Jagdeep Singh Malhi wrote:
> hi
> I am facing problem with raw() mysql quiers
> for example :
> maxid = Client.objects.raw('SELECT Max(id) FROM client')
>
> print maxid
>
> output is :-
>
>
> I am using Django 1.2 version.
> where I am wrong?
Nowhere. Outpu
On 11 November 2010 09:17, Jagdeep Singh Malhi wrote:
>
> now I also try another method to get max(id)
>
> from django.db import connection
> cursor = connection.cursor()
> cursor.execute('SELECT max(id) FROM automation_client')
> maxid = cursor.fetchone()
>
> output is :
> (2L,)
>
>
when i creating project on comand promt it says
'django-admin.py' is not recognized as an internal or external command
operable program & bach file
pls giv me solution i m new for django
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post t
no missing parenthesis ?
class ept_inv(models.Model):
part_num = models.CharField(max_length=20)
ept_type = models.SmallIntegerField()
inv_id = models.IntegerField()
load_date = models.DateField()
On 10 nov, 18:23, octopusgrabbus wrote:
> I have an existing MySQL table. It's fair
Looks like django is not on your sytem path. Have you used python much
in Windows and are familiar with Environmental variables?
Look like this problem has been addresses on the django forums
http://thedjangoforum.com/board/thread/4/django-admin-py-error-when-installing-dj/
and here is a link fro
On Wed, Nov 10, 2010 at 4:35 AM, derek wrote:
> I have not really understood when and why they are needed; I would be
> interested to see an alternative also because it might improve my
> understanding.
>
I've never used them before, and always avoided looking into them
because I thought they wer
> >>> from django.db.models import Max
> >>> Client.objects.aggregate(maxid=Max('id'))
>
> {'maxid': 2L}
>
> And you'll get a dictionary with the value you want as a result.
>
> [1]:http://docs.djangoproject.com/en/1.1/topics/db/aggregation/
Thanks for link, problem solve.
--
You received thi
Hi guys just trying to get the admin section of a pinax site working
and i am getting the following error when i try and load the admin
section.
TemplateDoesNotExist at /admin/
admin/login.htmlRequest Method: GET
Request URL: http://ourislandgeorgia.net/admin/
Django Version: 1.2.3
Exception Type:
Hi,
I have a unit test that tests that a comment can be posted on an entry
in a Django blog. Posting a comment myself in the browser works fine,
but the test always fails with this error:
"TemplateSyntaxError: Caught VariableDoesNotExist while rendering:
Failed lookup for key [request] in u'[{}]'
My project is in folder: webinterface/
I have defined a custom "webinterface_tags.py" inside my project:
webinterface/templatetags/webinterface_tags.py
My webinterface/settings.py says:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions
What about having an official 1.3 feedback thread at django-developers
list? ;)
I'm liking the pack of small improvements coming in this release, and
timing is very good, well done. I must say I'm less than happy with
the view classes though. Is the API on it frozen already?
On 11 nov, 05:34, Jam
On 12 November 2010 01:16, hcarvalhoalves wrote:
> What about having an official 1.3 feedback thread at django-developers
> list? ;)
>
> I'm liking the pack of small improvements coming in this release, and
> timing is very good, well done. I must say I'm less than happy with
> the view classes th
2010/11/12 Łukasz Rekucki
> On 12 November 2010 01:16, hcarvalhoalves
> wrote:
> > What about having an official 1.3 feedback thread at django-developers
> > list? ;)
> >
> > I'm liking the pack of small improvements coming in this release, and
> > timing is very good, well done. I must say I'm
On Fri, Nov 12, 2010 at 8:16 AM, hcarvalhoalves
wrote:
> What about having an official 1.3 feedback thread at django-developers
> list? ;)
Why is a single catch-all thread needed? Those sorts of threads
rapidly descend into an unmaintainable mess. It's better to open a new
thread for any issue yo
To be fair, I only had one small pet peeve with the current views API
after trying the alpha: the use of self.args / self.kwargs.
There's added value on being able to see which parameters a view
expects by seeing it's method signature:
def publisher(request, publisher_name):
publisher = get_
On 12 November 2010 01:45, Ian Lewis wrote:
> 2010/11/12 Łukasz Rekucki
>>
>> On 12 November 2010 01:16, hcarvalhoalves
>> wrote:
>> > What about having an official 1.3 feedback thread at django-developers
>> > list? ;)
>> >
>> > I'm liking the pack of small improvements coming in this release,
On 11/11/2010 5:04 PM, Russell Keith-Magee wrote:
> It won't be 100% frozen until the final release
Shouldn't that be "first beta"?
regards
Steve
--
DjangoCon US 2010 September 7-9 http://djangocon.us/
--
You received this message because you are subscribed to the Google Groups
"Django users
On Fri, Nov 12, 2010 at 9:17 AM, Steve Holden wrote:
> On 11/11/2010 5:04 PM, Russell Keith-Magee wrote:
>> It won't be 100% frozen until the final release
>
> Shouldn't that be "first beta"?
Let me clarify:
The absolute hard deadline for changes to API is the final release.
That's the point at
On Fri, Nov 12, 2010 at 9:09 AM, hcarvalhoalves
wrote:
> To be fair, I only had one small pet peeve with the current views API
> after trying the alpha: the use of self.args / self.kwargs.
>
> There's added value on being able to see which parameters a view
> expects by seeing it's method signatur
2010/11/12 Łukasz Rekucki :
> On 12 November 2010 01:45, Ian Lewis wrote:
>> 2010/11/12 Łukasz Rekucki
>>>
>>> On 12 November 2010 01:16, hcarvalhoalves
>>> wrote:
>>> > What about having an official 1.3 feedback thread at django-developers
>>> > list? ;)
>>> >
>>> > I'm liking the pack of small
I have the following models.py file:
class Account(models.Model):
name = models.CharField(max_length=30)
user = models.ForeignKey(User, related_name='account_creator')
class Category(models.Model):
name = models.CharField(max_length=30)
account = models.ForeignKey(Account, related
I assume webinterface is your django app. If so, you'll need to add it
to INSTALLED_APPS.
On Nov 11, 2:18 pm, vivek_12315 wrote:
> My project is in folder: webinterface/
>
> I have defined a custom "webinterface_tags.py" inside my project:
>
> webinterface/templatetags/webinterface_tags.py
>
> My
Hi
New to django, and just loving it!
Got the basics working - had the following question.
What would be the preferred way to associate an error code with an
error message (so that say it can be given back to an api call)
class MyForm(forms.Form):
email = forms.CharField(error_messages={'inv
Hi all,
Django newbie question here. I am building some pages to let my users
manage lists of data. I really like the look, feel, and behavior, of
the admin pages. But I can't give my users that much control. Is
there a way to reuse the admin widgets in non-admin pages? I want to
give them l
Thanks for the fix.
Besides adding a directory directive, one also needs to make an alias
so that http://mysite.com/media/ points to the style sheets.
I added this to the same apache config as above (and now it works):
AllowOverride None
Options None
Order allow,deny
Allow from
Hi,
I am new to django .
>From html page I want to download a file from a location in my local
system . I am using django server and not the apache/lightpd.
By the following code I am able to get the dialouge box on clicking the
link on web page .
But it downloads exactly 0 bytes.
Please suggest w
30 matches
Mail list logo