Re: Time Zone Problem when following on tutorial

2014-06-24 Thread miked

On 25/06/2014 7:44 AM, Jerry Wu wrote:> Thanks, Mike.


I still have a question. In your code, which part should I change in
order to set the time zone to Asia/Shanghai?


My settings uses Australia/Melbourne and Postgres stores time correctly 
as UTC+10 (or UTC+11 in daylight saving time).


But as it happens I'm in New Zealand for a couple of days. So I'll 
change my laptop location to Wellington tonight and log in and create 
some test entries and knowing when I do that I should be able to check 
the results after switching the laptop back to Melbourne time.


Now I think of it I could pretend I'm in Shanghai :)

You can see from the above that I half-believe pytz uses the system 
locale to figure out the UTC offset. But I suppose it might be TIME_ZONE 
in settings.


Have to go out now. I'll report back later

Mike




On Tuesday, June 24, 2014 7:26:52 AM UTC+8, Mike Dewhirst wrote:

On 24/06/2014 8:34 AM, Jerry Wu wrote:
 > Dear every one,
 >
 > I am following the tutorial
 > > and meet
with
 > some problem with Time Zone part. Since I am in Shanghai, China
(UTC+8)
 > , I think it is necessary to reset the time part.
 >
 > Below is what I tried but failed with valuerror incorrect
timezone setting:
 >
 > TIME_ZONE="UTC+8"
 > TIME_ZONE="UTC+8:00"
 >
 > I have tried "Asia/Shanghai", it works, but I think it is kind 
of

 > out-of-date style due to the description
 >

>


 > in the tutorial.

This a very good question. Especially considering the variability
between databases. At least I think so - I use Postgres and that 
seems

to store times in UTC. In my case it is accidentally just what I
want so
I'm not changing anything.

But just in case, I use the following utility everywhere ...

import pytz
from datetime import datetime

def when():
  return datetime.now(tz=pytz.utc)

I wish I understood (or had the time and brainspace to commit to
memory)
exactly how it all works. I think the target audience for the
documentation is somewhat smarter than I.

Mike
 >
 > Could some one give me a hint?
 >
 > Thans in advance.
 >


--
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/09843c1de23868d2d8fe13160e054aea%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: admin generated form, change dropdown with selction from popup menu

2014-06-24 Thread Aeh. ABID
Is there a way to display a field value other than id in the textbox

On Wednesday, June 25, 2014 6:11:27 AM UTC+1, Aeh. ABID wrote:
>
> When dropdown could hold a pretty long list which may slowdown the page 
> load, how can I override the drop-down menu in the change-form to a 
> "read-only input" that can be filled with value from popup window.
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1cb9f7b7-fdd3-427a-8194-777c53cc452d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: admin generated form, change dropdown with selction from popup menu

2014-06-24 Thread Aeh. ABID
Just found the answer here:
https://groups.google.com/forum/#!topic/django-users/zjdbX5ipRqY

http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.raw_id_fields
 


On Wednesday, June 25, 2014 6:11:27 AM UTC+1, Aeh. ABID wrote:
>
> When dropdown could hold a pretty long list which may slowdown the page 
> load, how can I override the drop-down menu in the change-form to a 
> "read-only input" that can be filled with value from popup window.
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3d7434e8-6830-48a3-9134-510be3636c81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


admin generated form, change dropdown with selction from popup menu

2014-06-24 Thread Aeh. ABID
When dropdown could hold a pretty long list which may slowdown the page 
load, how can I override the drop-down menu in the change-form to a 
"read-only input" that can be filled with value from popup window.

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3460eec8-6407-41f0-b0b6-52a188f3284d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Copied django project to shared host from repo - can't import settings

2014-06-24 Thread Lee
For mysite.fcgi I have: 

#!/home5/myorg/.virtualenvs/mydjango/bin/python
import sys, os

# Add a custom Python path.
sys.path.insert(0, "/home5/myorg/.virtualenvs/mydjango")
sys.path.insert(13, "/home5/myorg/django_projects/mysite")
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")


and for .htaccess I have - 

AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]


Thanks,
Lee

On Tuesday, June 24, 2014 9:23:17 PM UTC-4, sacrac wrote:
>
> Hi, maybe show the content mysite.fcgi and .htaccess, the error say not 
> exist your project mysite
> maybe the path is not good in mysite.fcgi!
>
> Cheers
>
>
> On Tue, Jun 24, 2014 at 3:39 PM, Lee > 
> wrote:
>
>> Hello,
>>
>> I setup Django successfully on my shared Bluehost account following the 
>> tutorial below: http://www.nyayapati.com/srao/
>> 2012/08/setup-python-2-7-and-django-1-4-on-bluehost/
>>
>> I am now having problems with a Django project I have copied from a 
>> GitHub repo to my Bluehost directory. I am getting this error when I run 
>> python mysite.fcgi in my virtualenv
>>
>> go-1.5.1-py2.7.egg/django/conf/__init__.py", line 134, in __init__
>> raise ImportError("Could not import settings '%s' (Is it on sys.path?): 
>> %s" % (self.SETTINGS_MODULE, e))
>> ImportError: Could not import settings 'mysite.settings' (Is it on 
>> sys.path?): No module named settings
>>
>> Any thoughts on where to look for errors? I have checked .htaccess and 
>> the mysite.fcgi file in my www directory, the pointer to settings in my 
>> manage.py and these seem as they should be. Running python manage.py 
>> runserver on the project says there are no errors.
>>
>> Lee
>>
>> -- 
>> 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 django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/595e7cff-5af9-4c63-a052-41d3ce472e30%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d31f24ec-601b-4b4a-8d83-05d7048c442c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Copied django project to shared host from repo - can't import settings

2014-06-24 Thread carlos
Hi, maybe show the content mysite.fcgi and .htaccess, the error say not
exist your project mysite
maybe the path is not good in mysite.fcgi!

Cheers


On Tue, Jun 24, 2014 at 3:39 PM, Lee  wrote:

> Hello,
>
> I setup Django successfully on my shared Bluehost account following the
> tutorial below: http://www.nyayapati.com/srao/
> 2012/08/setup-python-2-7-and-django-1-4-on-bluehost/
>
> I am now having problems with a Django project I have copied from a GitHub
> repo to my Bluehost directory. I am getting this error when I run python
> mysite.fcgi in my virtualenv
>
> go-1.5.1-py2.7.egg/django/conf/__init__.py", line 134, in __init__
> raise ImportError("Could not import settings '%s' (Is it on sys.path?): 
> %s" % (self.SETTINGS_MODULE, e))
> ImportError: Could not import settings 'mysite.settings' (Is it on 
> sys.path?): No module named settings
>
> Any thoughts on where to look for errors? I have checked .htaccess and the
> mysite.fcgi file in my www directory, the pointer to settings in my
> manage.py and these seem as they should be. Running python manage.py
> runserver on the project says there are no errors.
>
> Lee
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/595e7cff-5af9-4c63-a052-41d3ce472e30%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM-7rO1GzajzTynGktf%2B6WKAV6n8YYP%3DDj1K9htaMTxuOktb2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Criar slideShow

2014-06-24 Thread Carlos Andre
Olá pessoal, tudo bem com todos?
Gostaria de uma solução que permita referenciar fotos para m slideshow com
até no máximo 5 fotos que seguirão ordem de inserção! tipo usando um id!
Obrigado pela atenção de todos!

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA8yBMzR-r9dsUeYrHN6xiLNOqGXpj%3DSMLsPjv5TcjEhLhARzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django wizard with one to many

2014-06-24 Thread Lachlan Musicman
Yes, it is.

Without a thorough knowledge of what you are doing, I would recommend looking at

condition_dict which is in the urls.py
https://docs.djangoproject.com/en/1.6/ref/contrib/formtools/form-wizard/#using-a-different-template-for-each-form

or the condition steps
https://docs.djangoproject.com/en/1.6/ref/contrib/formtools/form-wizard/#conditionally-view-skip-specific-steps



cheers
L.

On 25 June 2014 06:52, Henrique Oliveira  wrote:
> Hi there,
>
> I need to create a wizard that has an one-to-many relationship on step 2.
>
> These are my models:
>
> class Ticket(models.Model):
> user = models.ForeignKey(User)
> modality = models.CharField(max_length=3)
> drawing = models.ForeignKey(Drawing)
> type = models.CharField(max_length=1, choices=TYPES)
> amount = models.DecimalField(max_digits=6, decimal_places=2)
> first_to_fifth = models.BooleanField(default=False)
> created_at = models.DateTimeField()
>
> class Meta:
> db_table = 'ticket'
>
>
> class TicketPick(models.Model):
> ticket_id = models.ForeignKey(Ticket, related_name='picks')
> pick = models.CharField(max_length=4)
>
> class Meta:
> db_table = 'ticket_pick'
>
> Second step can have up to 5 fields, is possible to do that using Django
> wizard?
>
> Cheers
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2bb479eb-5df5-410d-b578-bdf15ed8625c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
The idea is that a beautiful image is frameable. Everything you need
to see is there: It’s everything you want, and it’s very pleasing
because there’s no extra information that you don’t get to see.
Everything’s in a nice package for you. But sublime art is
unframeable: It’s an image or idea that implies that there’s a bigger
image or idea that you can’t see: You’re only getting to look at a
fraction of it, and in that way it’s both beautiful and scary, because
it’s reminding you that there’s more that you don’t have access to.
It’s now sort of left the piece itself and it’s become your own
invention, so it’s personal as well as being scary as well as being
beautiful, which is what I really like about art like that.
---
Adventure Time http://theholenearthecenteroftheworld.com/

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiOZBNbXrG2M6%2BnjcdOU1d2zwBpRaAmC4UyvsyWp4-5xXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Time Zone Problem when following on tutorial

2014-06-24 Thread Jerry Wu
Thanks, Mike. 

I still have a question. In your code, which part should I change in order 
to set the time zone to Asia/Shanghai?


On Tuesday, June 24, 2014 7:26:52 AM UTC+8, Mike Dewhirst wrote:
>
> On 24/06/2014 8:34 AM, Jerry Wu wrote: 
> > Dear every one, 
> > 
> > I am following the tutorial 
> >  and meet with 
> > some problem with Time Zone part. Since I am in Shanghai, China (UTC+8) 
> > , I think it is necessary to reset the time part. 
> > 
> > Below is what I tried but failed with valuerror incorrect timezone 
> setting: 
> > 
> > TIME_ZONE="UTC+8" 
> > TIME_ZONE="UTC+8:00" 
> > 
> > I have tried "Asia/Shanghai", it works, but I think it is kind of 
> > out-of-date style due to the description 
> > <
> https://docs.djangoproject.com/en/1.6/ref/settings/#std:setting-TIME_ZONE> 
>
> > in the tutorial. 
>
> This a very good question. Especially considering the variability 
> between databases. At least I think so - I use Postgres and that seems 
> to store times in UTC. In my case it is accidentally just what I want so 
> I'm not changing anything. 
>
> But just in case, I use the following utility everywhere ... 
>
> import pytz 
> from datetime import datetime 
>
> def when(): 
>  return datetime.now(tz=pytz.utc) 
>
> I wish I understood (or had the time and brainspace to commit to memory) 
> exactly how it all works. I think the target audience for the 
> documentation is somewhat smarter than I. 
>
> Mike 
> > 
> > Could some one give me a hint? 
> > 
> > Thans in advance. 
> > 
> > -- 
> > 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 django-users...@googlegroups.com  
> > . 
> > To post to this group, send email to django...@googlegroups.com 
>  
> > . 
> > Visit this group at http://groups.google.com/group/django-users. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/django-users/fcda6aed-87ee-48f6-85d8-2b2906056b81%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/django-users/fcda6aed-87ee-48f6-85d8-2b2906056b81%40googlegroups.com?utm_medium=email&utm_source=footer>.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ad37ab7a-3ae6-4071-8043-a40723b10036%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Copied django project to shared host from repo - can't import settings

2014-06-24 Thread Lee
Hello,

I setup Django successfully on my shared Bluehost account following the 
tutorial below: 
http://www.nyayapati.com/srao/2012/08/setup-python-2-7-and-django-1-4-on-bluehost/

I am now having problems with a Django project I have copied from a GitHub 
repo to my Bluehost directory. I am getting this error when I run python 
mysite.fcgi in my virtualenv

go-1.5.1-py2.7.egg/django/conf/__init__.py", line 134, in __init__
raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" 
% (self.SETTINGS_MODULE, e))
ImportError: Could not import settings 'mysite.settings' (Is it on sys.path?): 
No module named settings

Any thoughts on where to look for errors? I have checked .htaccess and the 
mysite.fcgi file in my www directory, the pointer to settings in my 
manage.py and these seem as they should be. Running python manage.py 
runserver on the project says there are no errors.

Lee

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/595e7cff-5af9-4c63-a052-41d3ce472e30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django wizard with one to many

2014-06-24 Thread Henrique Oliveira
Hi there,

I need to create a wizard that has an one-to-many relationship on step 2.

These are my models:

class Ticket(models.Model):
user = models.ForeignKey(User)
modality = models.CharField(max_length=3)
drawing = models.ForeignKey(Drawing)
type = models.CharField(max_length=1, choices=TYPES)
amount = models.DecimalField(max_digits=6, decimal_places=2)
first_to_fifth = models.BooleanField(default=False)
created_at = models.DateTimeField()

class Meta:
db_table = 'ticket'


class TicketPick(models.Model):
ticket_id = models.ForeignKey(Ticket, related_name='picks')
pick = models.CharField(max_length=4)

class Meta:
db_table = 'ticket_pick'

Second step can have up to 5 fields, is possible to do that using Django 
wizard?

Cheers

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2bb479eb-5df5-410d-b578-bdf15ed8625c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I Iterate database object querysets

2014-06-24 Thread Roman Klesel
Hello,

I would recommend to create a django form and feed the post data to this
form.
Because
1) the form will extract the post data for you
2) in the form you will be able the validate and clean the post data (you
should definitively do that)

The code that saves the data to the form could also live in the form.

https://docs.djangoproject.com/en/dev/topics/forms/

If the structure of the post data matches the structure of the database
model closely, then a model form would be the easiest way.

Regards Roman


2014-06-24 21:33 GMT+02:00 G Z :

>   for lis in Licenses.objects.values('code'):
>>  for post_value in insert_data:
>>  if lis in post_value:
>>  license_tag += insert_data[lis] + ','
>>
>
> so im trying that now but the problem is django is causing issues when
> iterating over a dictionary i think because its a post dictionary
>
> Exception Value:
>
> coercing to Unicode: need string or buffer, dict found
>
> Exception Location:/home/grant/workspace/Django
> Projects/trunk/holon/portal/views.py in portal, line 171
>
>
> insert_data
>
>  [u'Unassigned'], u'vm_name_posted': [u'HyTrust-ESXi01'], u'assign_customer': 
> [u'61'], u'vm_datacenter_id_posted': [u'2'], u'vm_edit': [u'edit'], 
> u'vm_mor_posted': [u'vm-8026'], u'save': [u'save'], u'INGVMWESXI': 
> [u'INGVMWESXI'], u'insert': [u'yes'], u'customer_id': [u'1'], 
> u'csrfmiddlewaretoken': [u'4e8g52f3Hj4GmzWpQlfL8YvdJrETNZ8k'], 
> u'vm_group_id_posted': [u'1'], u'vm_id': [u'27390'], 
> u'vm_vcd_managed_posted': [u'Y'], u'vm_display_name_posted': 
> [u'HyTrust-ESXi01']}>
>
>
>
> post_value
>
> u'vm_id_posted'
>
>  --
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b4eb8f2f-e98a-437d-8656-1714f958af12%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAL2Rd%3DK_tbbfg0YB38tB_A49XE4rcGxkHUNx4azMzcb-vpKY0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I Iterate database object querysets

2014-06-24 Thread G Z

>
>   for lis in Licenses.objects.values('code'):
>  for post_value in insert_data: 
>  if lis in post_value:
>  license_tag += insert_data[lis] + ','
>

so im trying that now but the problem is django is causing issues when 
iterating over a dictionary i think because its a post dictionary 

Exception Value:

coercing to Unicode: need string or buffer, dict found

Exception Location:/home/grant/workspace/Django 
Projects/trunk/holon/portal/views.py in portal, line 171


insert_data





post_value

u'vm_id_posted'

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b4eb8f2f-e98a-437d-8656-1714f958af12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I Iterate database object querysets

2014-06-24 Thread G Z

>
>
> according to what ive found the following should work but it doesn't
>


 for lis in licenses: 
  if lis.Licenses in insert_data:
  license_tag += insert_data[lis] + ',' 

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2a23ab33-d004-4bb0-ac9d-fb399256b678%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How do I Iterate database object querysets

2014-06-24 Thread G Z
I am posting data from a page with a dynamic set of licenses, I'm using the 
license_name as they key for the post values, then im building a string 
from the posted values. However
I can't figure out how to iterate through the database object set. There is 
no other way for what im doing because im using this to insert data into 
vcenter directly through python code.


ive tried

licenses.Licenses
licenses('Licenses')
licenses['Licenses']
 
current code:

licenses = Licenses.objects.all()
insert_data = request.POST.copy()

for field, lis in licenses:   
  for lisc in insert_data[lis]:
 license_tag += lisc + ','


I've tried

for lis in licenses:   
  for lisc in insert_data[lis]:
 license_tag += lisc + ','

for lis in licenses:   
  for lisc in insert_data[lis['Licenses']]:
 license_tag += lisc + ','

for lis in licenses:   
  for lisc in insert_data[lis('Licenses')]:
 license_tag += lisc + ','

for lis in licenses:   
  for lisc in insert_data[lis.Licenses]:
 license_tag += lisc + ','



licenses looks like, so its an object inside of a list, which means i 
should be able to access it as lis.objectname or licenses.objectname 
correct?

licenses

[, , , 
, , , 
, , , , , , , 
, , , 
, , , , '...(remaining elements truncated)...']



-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9ef47463-cca9-4ca2-a12f-b62dfa0e7ccc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: one form, many submits

2014-06-24 Thread Gunpreet Ahuja


On Saturday, February 20, 2010 9:07:57 PM UTC+5:30, David De La Harpe 
Golden wrote:
>
> On Sat, Feb 20, 2010 at 06:42:11AM -0800, Tom wrote:
>
>  

> Check request.POST.get('cancel') to see if cancel was clicked,
> and request.POST.get('accept') to see if accept was clicked.
>
 This was really helpful. :) 

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fd80c0db-6928-48b7-945a-4a3ce5c047ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Referencing Django List Objects From Query Question

2014-06-24 Thread G Z
How do I call django objects from a query for example


licenses = Licenses.objects.all() how I get my licenses,

then im trying to loop through licenses for every object from licenses that 
exist in a post save something to vc.

if insert == 'yes':
  insert_data = request.POST.copy()
  license_tag=''
  for lis in licenses:
 license_tag += insert_data[lis('Licenses')] + ','


the data returns like 


[, , , 
, , , 
, , , , , , , 
, , , 
, , , , '...(remaining elements truncated)...']


I get the error


'Licenses' object is not callable



I've tried 

insert_data[lis('Licenses')] 

insert_data[lis['Licenses']] 

insert_data[lis.Licenses] 



any ideas?

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/09cf61fb-584f-4a8f-b932-09d084f0fbe8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin Login - Redirecting back to login page

2014-06-24 Thread Aaron Reabow
also try: LOGIN_REDIRECT_URL

On Tuesday, 24 June 2014 16:55:21 UTC+2, Sergiy Khohlov wrote:
>
> Hello,
>
>  Could you please paste your LOGIN_URL  from your settings.py 
>
>
>
> Many thanks,
>
> Serge
>
>
> +380 636150445
> skype: skhohlov
>
>
> On Tue, Jun 24, 2014 at 5:40 PM, Діма Ревуцький  > wrote:
>
>> I had same problem 
>> In settings remove SESSION_COOKIE_DOMAIN or set correct domain
>>
>> понедельник, 6 июня 2011 г., 13:57:11 UTC+3 пользователь Aidan написал:
>>>
>>> I'm having trouble with the Django Admin. My login page appears ok at 
>>> http://127.0.0.1:8000/admin but when I try to login with a valid 
>>> username or password the page seems to refresh - it reappears with 
>>> text boxes empty. It doesn't display any errors on the page (logging 
>>> in with invalid username / password brings up all the red errors you'd 
>>> expect). 
>>>
>>> I'm not sure what's going on here. The console gives me the following: 
>>>
>>> (cache) C:\PythonProjects\CacheProject\cache>python manage.py 
>>> runserver 
>>> Validating models... 
>>>
>>> 0 errors found 
>>> Django version 1.3, using settings 'cache.settings' 
>>> Development server is running at http://127.0.0.1:8000/ 
>>> Quit the server with CTRL-BREAK. 
>>> [06/Jun/2011 11:52:09] "GET /admin/ HTTP/1.1" 200 2053 
>>> [06/Jun/2011 11:52:17] "POST /admin/ HTTP/1.1" 302 0 
>>> [06/Jun/2011 11:52:21] "GET /admin/ HTTP/1.1" 200 2053 
>>>
>>> settings.py - 
>>> # 
>>> INSTALLED_APPS = ( 
>>> 'django.contrib.auth', 
>>> 'django.contrib.contenttypes', 
>>> 'django.contrib.sessions', 
>>> 'django.contrib.sites', 
>>> 'django.contrib.messages', 
>>> 'django.contrib.admin', 
>>> ) 
>>> # 
>>>
>>> urls.py - 
>>>
>>> from django.conf.urls.defaults import patterns, include, url 
>>>
>>> from django.contrib import admin 
>>> admin.autodiscover() 
>>>
>>> urlpatterns = patterns('', 
>>> (r'^admin/', include(admin.site.urls)), 
>>> ) 
>>>
>>> Any ideas?
>>
>>  -- 
>> 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 django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/739282ff-e00d-46ca-99dc-8bebdff27f6f%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0f12f7a9-f1d4-4faf-b29b-b322f68f006d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using session data to populate multiple forms

2014-06-24 Thread Aaron Reabow
Hi Daniel,

Thanks for the response. 

What I am trying to get right is the ability to save session data across 
multiple forms.

In an initial form, people can tell me some generic information about their 
department, role etc.

It is then useful for me to save that information alongside their answers 
in subsequent forms that they complete within a session.  (It helps me to 
know who is who when I analyse their responses)

I save a little session dictionary of their core information in URL1 and am 
looking to add that information to the models that they complete in 
URL2,3,4...

I hope that makes some sense.

warm regards,

Aaron

On Tuesday, 24 June 2014 18:04:16 UTC+2, Daniel Roseman wrote:
>
> On Tuesday, 24 June 2014 14:30:48 UTC+1, Aaron Reabow wrote:
>>
>> Hi All,
>>
>> I have been scratching around this for a bit now.
>>
>> Sometimes I *don't want people to have to register* on my site, but I do 
>> want to *capture some information* about them and *reuse it across 
>> multiple mini questionnaires/forms*.
>>
>> I can happily set and get a session variable using the session 
>> 'dictionary'
>>
>> What I am trying to figure out is how to then use this information to 
>> populate fields so I can know who is giving which answers.
>>
>> I could take the session variable and write this to the template, grab 
>> this information in the template and write it to the input using jquery. 
>>  This doesn't seem the most efficient way.
>>
>> I assume writing this information in the view would be optional, 
>> alternatively is there a way to foreignkey type of approach.
>>
>> Also I am pretty new to django so i might be way off the mark..
>>
>> many thanks in advance,
>>
>> Aaron
>>
>> my view:
>>
>> def sessionStoreView(request):
>> if request.method == "POST":
>> form = sessionStoreForm(request.POST)
>> if form.is_valid():
>> model_instance = form.save(commit=False)
>> *model_instance['participant'] 
>> = request.session.get('participant') #something like that would be great if 
>> it worked*
>> model_instance.save()
>> return HttpResponseRedirect('sessionStore')
>> else:
>> form = sessionStoreForm()
>> return render(request, "sessionStore.html", {'form': form})
>>
>
> Apart from the fact that model_instance is, well, a model instance, and 
> therefore you access it via dot notation not dictionary notation, what 
> exactly are you having trouble with here?
> --
> DR. 
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cf96fdf0-e8e4-4141-9a5e-9ad5ca7f5918%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Can't run tests when admin is part of INSTALLED_APPS?

2014-06-24 Thread John Rambo
If I try to run test suites in 1.7 with admin in INSTALLED_APPS, I get 
this...

  File "/django/core/management/commands/migrate.py", line 195, in 
model_installed
(opts.auto_created and converter(opts.auto_created._meta.db_table) in 
tables))
AttributeError: 'bool' object has no attribute '_meta'

If I comment out the django.contrib.admin, tests work fine.

I do not know how to dig further from here. Is anyone able to point me in 
the right direction?

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/31e83a94-6520-41a0-b881-c0806f954bde%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using session data to populate multiple forms

2014-06-24 Thread Daniel Roseman
On Tuesday, 24 June 2014 14:30:48 UTC+1, Aaron Reabow wrote:
>
> Hi All,
>
> I have been scratching around this for a bit now.
>
> Sometimes I *don't want people to have to register* on my site, but I do 
> want to *capture some information* about them and *reuse it across 
> multiple mini questionnaires/forms*.
>
> I can happily set and get a session variable using the session 'dictionary'
>
> What I am trying to figure out is how to then use this information to 
> populate fields so I can know who is giving which answers.
>
> I could take the session variable and write this to the template, grab 
> this information in the template and write it to the input using jquery. 
>  This doesn't seem the most efficient way.
>
> I assume writing this information in the view would be optional, 
> alternatively is there a way to foreignkey type of approach.
>
> Also I am pretty new to django so i might be way off the mark..
>
> many thanks in advance,
>
> Aaron
>
> my view:
>
> def sessionStoreView(request):
> if request.method == "POST":
> form = sessionStoreForm(request.POST)
> if form.is_valid():
> model_instance = form.save(commit=False)
> *model_instance['participant'] 
> = request.session.get('participant') #something like that would be great if 
> it worked*
> model_instance.save()
> return HttpResponseRedirect('sessionStore')
> else:
> form = sessionStoreForm()
> return render(request, "sessionStore.html", {'form': form})
>

Apart from the fact that model_instance is, well, a model instance, and 
therefore you access it via dot notation not dictionary notation, what 
exactly are you having trouble with here?
--
DR. 

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9727e4eb-6a9c-48f3-9216-7dbb10c2c511%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Should I use any ecommerce Django package for a Price Alert Website?

2014-06-24 Thread amit barik


I am trying to build a price tracking/alert website (like 
https://hukkster.com ). This website is not entirely a ecommerce website. 
Because there are so many Django ecommerce packages (like Oscar) out there, 
I was wondering if I should use one of them or just develop one inhouse?

My requirements are simple:

   - User can track the price of products from other ecommerce sites (like 
   amazon, ebay).
   - User will get notified when price drops a certain threshold
   - User will have an account
   - User can view all of its own tagged products and also view the top 
   tags (like top hukks in hukkster).

Before I try to reinvent the wheel here, I would like to know which (if 
any) Django package(s) will support my requirements?

Thanks,

Amit

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d155b09b-55d7-455c-82e5-3c1150b80293%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin Login - Redirecting back to login page

2014-06-24 Thread Sergiy Khohlov
Hello,

 Could you please paste your LOGIN_URL  from your settings.py



Many thanks,

Serge


+380 636150445
skype: skhohlov


On Tue, Jun 24, 2014 at 5:40 PM, Діма Ревуцький  wrote:

> I had same problem
> In settings remove SESSION_COOKIE_DOMAIN or set correct domain
>
> понедельник, 6 июня 2011 г., 13:57:11 UTC+3 пользователь Aidan написал:
>>
>> I'm having trouble with the Django Admin. My login page appears ok at
>> http://127.0.0.1:8000/admin but when I try to login with a valid
>> username or password the page seems to refresh - it reappears with
>> text boxes empty. It doesn't display any errors on the page (logging
>> in with invalid username / password brings up all the red errors you'd
>> expect).
>>
>> I'm not sure what's going on here. The console gives me the following:
>>
>> (cache) C:\PythonProjects\CacheProject\cache>python manage.py
>> runserver
>> Validating models...
>>
>> 0 errors found
>> Django version 1.3, using settings 'cache.settings'
>> Development server is running at http://127.0.0.1:8000/
>> Quit the server with CTRL-BREAK.
>> [06/Jun/2011 11:52:09] "GET /admin/ HTTP/1.1" 200 2053
>> [06/Jun/2011 11:52:17] "POST /admin/ HTTP/1.1" 302 0
>> [06/Jun/2011 11:52:21] "GET /admin/ HTTP/1.1" 200 2053
>>
>> settings.py -
>> #
>> INSTALLED_APPS = (
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.sites',
>> 'django.contrib.messages',
>> 'django.contrib.admin',
>> )
>> #
>>
>> urls.py -
>>
>> from django.conf.urls.defaults import patterns, include, url
>>
>> from django.contrib import admin
>> admin.autodiscover()
>>
>> urlpatterns = patterns('',
>> (r'^admin/', include(admin.site.urls)),
>> )
>>
>> Any ideas?
>
>  --
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/739282ff-e00d-46ca-99dc-8bebdff27f6f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADTRxJPKeEi_bZRMe_YTPbigu8VNXH%2BDxGF3bVyZdk9piPjk5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin Login - Redirecting back to login page

2014-06-24 Thread Діма Ревуцький
I had same problem 
In settings remove SESSION_COOKIE_DOMAIN or set correct domain

понедельник, 6 июня 2011 г., 13:57:11 UTC+3 пользователь Aidan написал:
>
> I'm having trouble with the Django Admin. My login page appears ok at 
> http://127.0.0.1:8000/admin but when I try to login with a valid 
> username or password the page seems to refresh - it reappears with 
> text boxes empty. It doesn't display any errors on the page (logging 
> in with invalid username / password brings up all the red errors you'd 
> expect). 
>
> I'm not sure what's going on here. The console gives me the following: 
>
> (cache) C:\PythonProjects\CacheProject\cache>python manage.py 
> runserver 
> Validating models... 
>
> 0 errors found 
> Django version 1.3, using settings 'cache.settings' 
> Development server is running at http://127.0.0.1:8000/ 
> Quit the server with CTRL-BREAK. 
> [06/Jun/2011 11:52:09] "GET /admin/ HTTP/1.1" 200 2053 
> [06/Jun/2011 11:52:17] "POST /admin/ HTTP/1.1" 302 0 
> [06/Jun/2011 11:52:21] "GET /admin/ HTTP/1.1" 200 2053 
>
> settings.py - 
> # 
> INSTALLED_APPS = ( 
> 'django.contrib.auth', 
> 'django.contrib.contenttypes', 
> 'django.contrib.sessions', 
> 'django.contrib.sites', 
> 'django.contrib.messages', 
> 'django.contrib.admin', 
> ) 
> # 
>
> urls.py - 
>
> from django.conf.urls.defaults import patterns, include, url 
>
> from django.contrib import admin 
> admin.autodiscover() 
>
> urlpatterns = patterns('', 
> (r'^admin/', include(admin.site.urls)), 
> ) 
>
> Any ideas?

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/739282ff-e00d-46ca-99dc-8bebdff27f6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Using session data to populate multiple forms

2014-06-24 Thread Aaron Reabow
Hi All,

I have been scratching around this for a bit now.

Sometimes I *don't want people to have to register* on my site, but I do 
want to *capture some information* about them and *reuse it across multiple 
mini questionnaires/forms*.

I can happily set and get a session variable using the session 'dictionary'

What I am trying to figure out is how to then use this information to 
populate fields so I can know who is giving which answers.

I could take the session variable and write this to the template, grab this 
information in the template and write it to the input using jquery.  This 
doesn't seem the most efficient way.

I assume writing this information in the view would be optional, 
alternatively is there a way to foreignkey type of approach.

Also I am pretty new to django so i might be way off the mark..

many thanks in advance,

Aaron

my view:

def sessionStoreView(request):
if request.method == "POST":
form = sessionStoreForm(request.POST)
if form.is_valid():
model_instance = form.save(commit=False)
*model_instance['participant'] 
= request.session.get('participant') #something like that would be great if 
it worked*
model_instance.save()
return HttpResponseRedirect('sessionStore')
else:
form = sessionStoreForm()
return render(request, "sessionStore.html", {'form': form})

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3246927b-5b7e-4b03-9612-651ae0b10431%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


WANTED: Photo Contest Package

2014-06-24 Thread André Meyer-Vitali
Hi all

I'm organising a photography contest and would like to set up a web site 
for submission, display and voting of the pictures.

Do you know of any django package or plugin that could be helpful?

thanks in advance!
André

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/adca556e-468b-4392-a6b9-c6f5f7d81c61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error: ImproperlyConfigured: The SECRET_KEY setting must not be empty

2014-06-24 Thread Lachlan Musicman
I find I get this error when I forget to set my settings, since I have
a split settings set up:

python manage.py --settings=app.settings.dev

got to remember the --settings=app.settings.x

On 24 June 2014 22:14, Tom Evans  wrote:
> On Tue, Jun 24, 2014 at 9:59 AM, Rini Michael  wrote:
>> Hi,
>> i was trying to install django_cron using pip install django_cron,but
>> unfortunately
>> now i find a error as
>> ImproperlyConfigured: The SECRET_KEY setting must not be empty
>> can anybody help me with this
>> Thanks in advance
>>
>> regards,
>> Rini
>
> Set a secret key:
>
> https://docs.djangoproject.com/en/1.6/ref/settings/#secret-key
>
> Cheers
>
> Tom
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAFHbX1LSLmHDimUTGTY1-zV6Rv9aaeyW%3Dgz63aShv8%2BO%3DfbgFA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
The idea is that a beautiful image is frameable. Everything you need
to see is there: It’s everything you want, and it’s very pleasing
because there’s no extra information that you don’t get to see.
Everything’s in a nice package for you. But sublime art is
unframeable: It’s an image or idea that implies that there’s a bigger
image or idea that you can’t see: You’re only getting to look at a
fraction of it, and in that way it’s both beautiful and scary, because
it’s reminding you that there’s more that you don’t have access to.
It’s now sort of left the piece itself and it’s become your own
invention, so it’s personal as well as being scary as well as being
beautiful, which is what I really like about art like that.
---
Adventure Time http://theholenearthecenteroftheworld.com/

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiP3SC0bMPdsV_msoU9yUZ%3Dqi0d4FJjCC5cYbXBqA95BkQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error: ImproperlyConfigured: The SECRET_KEY setting must not be empty

2014-06-24 Thread Tom Evans
On Tue, Jun 24, 2014 at 9:59 AM, Rini Michael  wrote:
> Hi,
> i was trying to install django_cron using pip install django_cron,but
> unfortunately
> now i find a error as
> ImproperlyConfigured: The SECRET_KEY setting must not be empty
> can anybody help me with this
> Thanks in advance
>
> regards,
> Rini

Set a secret key:

https://docs.djangoproject.com/en/1.6/ref/settings/#secret-key

Cheers

Tom

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1LSLmHDimUTGTY1-zV6Rv9aaeyW%3Dgz63aShv8%2BO%3DfbgFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Static Analysis Tool

2014-06-24 Thread Tom Evans
There is also pyflakes.

I've never met a static analysis tool that can correctly distinguish
when something is wrong versus when something is misunderstood (by the
tool). Therefore, whatever tool you use, you will have to spend some
time telling it that certain things are false positives.

Cheers

Tom

On Tue, Jun 24, 2014 at 4:50 AM, Mario Gudelj  wrote:
> PyCharm IDE does a lot of this stuff. It's great at pointing out bad code.
> But you can try https://chris-lamb.co.uk/projects/django-lint which is a
> wrapper around pylint
>
>
> On 24 June 2014 10:19, Mayur Sharma  wrote:
>>
>> Hi,
>>
>> I am looking for industry level Django Static Analysis tools. Most of the
>> commercial tools don't support Django like Checkmarx and Coverity. Which
>> tools are recommended for it then ?
>>
>> Thanks,
>> Mayur Sharma
>>
>> --
>> 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 django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/27e08deb-80ea-46d1-8edc-3494cd6c537c%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHqTbjkVjFoHB%3DtYBpmfaRfzFvSzMd2BiCEqnHDVdhdGX%3DwNUQ%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1%2BQQOqE_0O0f05h2xaqedeXfYrtMmOQRVgJbb2UTYHvCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


RE: Static Analysis Tool

2014-06-24 Thread Ilya Kazakevich
PyCharm will support DjangoLint inspections soon, I believe: 
http://youtrack.jetbrains.com/issue/PY-4554


Ilya Kazakevich,
JetBrains PyCharm (Best Python/Django IDE)
http://www.jetbrains.com/pycharm/
"Develop with pleasure!"

>-Original Message-
>From: django-users@googlegroups.com
>[mailto:django-users@googlegroups.com] On Behalf Of Mario Gudelj
>Sent: Tuesday, June 24, 2014 7:51 AM
>To: django-users@googlegroups.com
>Subject: Re: Static Analysis Tool
>
>PyCharm IDE does a lot of this stuff. It's great at pointing out bad code. But 
>you
>can try https://chris-lamb.co.uk/projects/django-lint which is a wrapper around
>pylint
>
>
>On 24 June 2014 10:19, Mayur Sharma  wrote:
>
>
>   Hi,
>
>   I am looking for industry level Django Static Analysis tools. Most of 
> the
>commercial tools don't support Django like Checkmarx and Coverity. Which tools
>are recommended for it then ?
>
>   Thanks,
>   Mayur Sharma
>
>
>   --
>   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 django-users+unsubscr...@googlegroups.com.
>   To post to this group, send email to django-users@googlegroups.com.
>   Visit this group at http://groups.google.com/group/django-users.
>   To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-users/27e08deb-80ea-46d1-8edc-34
>94cd6c537c%40googlegroups.com
>494cd6c537c%40googlegroups.com?utm_medium=email&utm_source=footer> .
>   For more options, visit https://groups.google.com/d/optout.
>
>
>
>--
>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
>django-users+unsubscr...@googlegroups.com.
>To post to this group, send email to django-users@googlegroups.com.
>Visit this group at http://groups.google.com/group/django-users.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-users/CAHqTbjkVjFoHB%3DtYBpmfa
>RfzFvSzMd2BiCEqnHDVdhdGX%3DwNUQ%40mail.gmail.com
>aRfzFvSzMd2BiCEqnHDVdhdGX%3DwNUQ%40mail.gmail.com?utm_medium=e
>mail&utm_source=footer> .
>For more options, visit https://groups.google.com/d/optout.


-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/004701cf8fa5%245216b770%24f6442650%24%40JetBrains.com.
For more options, visit https://groups.google.com/d/optout.


Error: ImproperlyConfigured: The SECRET_KEY setting must not be empty

2014-06-24 Thread Rini Michael
Hi,
i was trying to install django_cron using pip install django_cron,but
unfortunately
now i find a error as
ImproperlyConfigured: The SECRET_KEY setting must not be empty
can anybody help me with this
Thanks in advance

regards,
Rini

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFoY06uqrKrGWDzD3DYasB59FpyUqdp2zHjXTH-wjkJd8hz%2Bjg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.