Re: Strange deployment problem

2015-04-02 Thread Miloš Kozák
I have just found, that if I use tmux then everything works perfect... 
Maybe this might be caused by some system variables forced by my terminal?

This problem denies me to use Fabric for DB updates! This is very big 
constraint.

-- 
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/70d28237-e263-4fe6-84ab-8b540fefbbb6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


understanding of Dialup GPRS and IP

2015-04-02 Thread CTG
Can someone please briefly explain to me what they are in more details 
please
Thanks



-- 
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/caf7db9e-3aa5-42e2-94cf-0751dde845f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: setup.py for project?

2015-04-02 Thread Thomas Güttler



Am 02.04.2015 um 03:13 schrieb Ilya Kazakevich:

Hello.

What exactly are you trying to achieve?

If you have some part of functionality that is interesting for other 
people/projects and hence should be shared via
pypi, you should extract it as reusable app. Projects, how ever, are not 
reusable. If you need a fast way to install al
project requirements on your new server, you need to use requirements.txt (and 
pep freeze).

Some people use virtualization (vm images, vagrant, or even docker) to deploy 
"project" (with all environment including
databases, daemons etc) on staing or production machines.
Environment configuration engines like saltstack/chef/cfengine/puppet are also 
used.

An excelent book "Continuous delivery" is all about "how do you deploy your code on 
production with one click". It may
be interesting for you.


I just checked my favourite book seller. There are many books about this topic. 
Which one do you recommend?

Regards,
  Thomas Güttler

--
--
Thomas Güttler
http://thomas-guettler.de/

--
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/551D2071.2040201%40tbz-pariv.de.
For more options, visit https://groups.google.com/d/optout.


Re: setup.py for project?

2015-04-02 Thread Simon Brunning
On 2 April 2015 at 11:56, Thomas Güttler  wrote:
> There are many books about this topic. Which one do you recommend?

Continuous Delivery: Reliable Software Releases through Build, Test,
and Deployment Automation, ISBN 978-0321601919

Very good indeed.

Cheers,
Simon B.
@brunns
07963 351009

-- 
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/CAC1FPopWF17fy-pqF2KsMzZx-cdSU-Oe55vkGn0L01XUyvbDcg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: understanding of Dialup GPRS and IP

2015-04-02 Thread Avraham Serour
It seems you are on the wrong mailing list
On Apr 2, 2015 1:29 PM, "CTG"  wrote:

> Can someone please briefly explain to me what they are in more details
> please
> Thanks
>
>
>
>  --
> 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/caf7db9e-3aa5-42e2-94cf-0751dde845f8%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/CAFWa6tLscUbZAec0%2BS2XBjJmuYKufX1vYSJEuSGkDJ%3D6HjEgSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Help with: Django 'ModelForm' object has no attribute 'cleaned_data' for M2M through

2015-04-02 Thread Ronaldo Bahia

Hi every one.

Can you help me in this?

http://stackoverflow.com/questions/29413107/django-modelform-object-has-no-attribute-cleaned-data-for-m2m-through

Thanks in advance
Ronaldo

-- 
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/65204e73-37e5-4463-862f-cf453d835440%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help with: Django 'ModelForm' object has no attribute 'cleaned_data' for M2M through

2015-04-02 Thread Vijay Khemlani
Call form.is_valid() (and check that it returns True) before accessing
form.cleaned_data

On Thu, Apr 2, 2015 at 9:36 AM, Ronaldo Bahia  wrote:

>
> Hi every one.
>
> Can you help me in this?
>
>
> http://stackoverflow.com/questions/29413107/django-modelform-object-has-no-attribute-cleaned-data-for-m2m-through
>
> Thanks in advance
> Ronaldo
>
> --
> 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/65204e73-37e5-4463-862f-cf453d835440%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/CALn3ei1uA3zGzuRJkDTZWLwMjhbnXi8tf_azPj2sryBPCSFpew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help with: Django 'ModelForm' object has no attribute 'cleaned_data' for M2M through

2015-04-02 Thread Ronaldo Bahia
Thanks. Solved cleaned_data issue.

Now I getting:

Cannot assign "u'2'": "CandidateToJob.job" must be a "Job" instance.

Or

Cannot assign "u'Title'": "CandidateToJob.job" must be a "Job" instance.

Em quinta-feira, 2 de abril de 2015 09:44:44 UTC-3, Vijay Khemlani escreveu:
>
> Call form.is_valid() (and check that it returns True) before accessing 
> form.cleaned_data
>
> On Thu, Apr 2, 2015 at 9:36 AM, Ronaldo Bahia  > wrote:
>
>>
>> Hi every one.
>>
>> Can you help me in this?
>>
>>
>> http://stackoverflow.com/questions/29413107/django-modelform-object-has-no-attribute-cleaned-data-for-m2m-through
>>
>> Thanks in advance
>> Ronaldo
>>
>> -- 
>> 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/65204e73-37e5-4463-862f-cf453d835440%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/1f030ca5-651e-45a9-b4b3-25dbe5dc31fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help with: Django 'ModelForm' object has no attribute 'cleaned_data' for M2M through

2015-04-02 Thread Vijay Khemlani
In your Form class "job" is a ChoiceField, and it returns a primitive value
(such as "2") when cleaned.

You would need to convert it back to a django model with

job = Job.objects.get(pk=form.cleaned_data['job'])



On Thu, Apr 2, 2015 at 10:17 AM, Ronaldo Bahia  wrote:

> Thanks. Solved cleaned_data issue.
>
> Now I getting:
>
> Cannot assign "u'2'": "CandidateToJob.job" must be a "Job" instance.
>
> Or
>
> Cannot assign "u'Title'": "CandidateToJob.job" must be a "Job" instance.
>
> Em quinta-feira, 2 de abril de 2015 09:44:44 UTC-3, Vijay Khemlani
> escreveu:
>>
>> Call form.is_valid() (and check that it returns True) before accessing
>> form.cleaned_data
>>
>> On Thu, Apr 2, 2015 at 9:36 AM, Ronaldo Bahia 
>> wrote:
>>
>>>
>>> Hi every one.
>>>
>>> Can you help me in this?
>>>
>>> http://stackoverflow.com/questions/29413107/django-
>>> modelform-object-has-no-attribute-cleaned-data-for-m2m-through
>>>
>>> Thanks in advance
>>> Ronaldo
>>>
>>> --
>>> 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/65204e73-37e5-4463-862f-cf453d835440%
>>> 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/1f030ca5-651e-45a9-b4b3-25dbe5dc31fa%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/CALn3ei2SJKHvjxCh2GV03Xh8%2BzOXJrV3FLZ9%3DEKjgStkfcqRdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


The django CMS Network

2015-04-02 Thread Daniele Procida
Dear django CMS friends,

You might be interested in the django CMS Network.

There's a preview at  but it will be appearing 
on django-cms.org soon too.

It hasn't officially been launched yet, but will be publicly available in the 
next week or so.

If you work with django CMS - backend/frontend developer, agency, or whatever - 
you can get on the Network before the crowds rush in.

It's completely free to sign up, and will help put you - and the whole django 
CMS ecosystem - on the map. It takes a couple of minutes to complete the 
process; instructions at 

Regards,

Daniele

-- 
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/20150402135133.1533636538%40mail.wservices.ch.
For more options, visit https://groups.google.com/d/optout.


Using Unicode in django

2015-04-02 Thread temiloluwa adesina
Hello 
I just joined this group and i have problems with representing multiple 
fields in admin using __unicode__, when i try to call this data it returns 
just one of them:

class Crop(models.Model):
name = models.CharField(max_length=30)
importance = models.TextField()
cultivation = models.TextField()
def __unicode__(self):
return u'%s %s %s' % (self.name, self.importance, self.cultivation)


but rather than returning just the data in the importance field, it returns 
all the data in each separate field together.

Pls i would appreciate anyone's assistance.

-- 
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/504bf928-7259-4d17-994c-115e98a78a4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Saving Contionus Data through Django

2015-04-02 Thread nitinagarwal949
Hello All 

I am new to Django. And, I need help in models file. 
I made a table - device_list. It contain one filed as device_id. 
Now, I need to store 3 continuous data stream which is coming like 1 entry 
per minute each for this device_id. 
All 3 data streams will have different timestamps and that also needs to be 
stored. 

So, what is the best way to store the stream ?




-- 
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/820ad2ed-7163-4fdd-adf0-5e50a12308fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: setup.py for project?

2015-04-02 Thread Ilya Kazakevich
Simon is right. I recommend 
this http://martinfowler.com/books/continuousDelivery.html

On Thursday, April 2, 2015 at 1:57:40 PM UTC+3, guettli wrote:
>
>
>
> Am 02.04.2015 um 03:13 schrieb Ilya Kazakevich: 
> > Hello. 
> > 
> > What exactly are you trying to achieve? 
> > 
> > If you have some part of functionality that is interesting for other 
> people/projects and hence should be shared via 
> > pypi, you should extract it as reusable app. Projects, how ever, are not 
> reusable. If you need a fast way to install al 
> > project requirements on your new server, you need to use 
> requirements.txt (and pep freeze). 
> > 
> > Some people use virtualization (vm images, vagrant, or even docker) to 
> deploy "project" (with all environment including 
> > databases, daemons etc) on staing or production machines. 
> > Environment configuration engines like saltstack/chef/cfengine/puppet 
> are also used. 
> > 
> > An excelent book "Continuous delivery" is all about "how do you deploy 
> your code on production with one click". It may 
> > be interesting for you. 
>
> I just checked my favourite book seller. There are many books about this 
> topic. Which one do you recommend? 
>
> Regards, 
>Thomas Güttler 
>
> -- 
> -- 
> Thomas Güttler 
> http://thomas-guettler.de/ 
>

-- 
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/29284cb4-f609-46d2-801e-812ce457492b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Saving Contionus Data through Django

2015-04-02 Thread Ilya Kazakevich
You can't just store stream in database.
You need to buffer it first, and then save to field like 
blob: http://www.postgresql.org/docs/9.1/static/datatype-binary.html

I am not sure that relational database is the best place to store binary 
data coming from devices.


On Thursday, April 2, 2015 at 5:10:23 PM UTC+3, nitinag...@gmail.com wrote:
>
> Hello All 
>
> I am new to Django. And, I need help in models file. 
> I made a table - device_list. It contain one filed as device_id. 
> Now, I need to store 3 continuous data stream which is coming like 1 entry 
> per minute each for this device_id. 
> All 3 data streams will have different timestamps and that also needs to 
> be stored. 
>
> So, what is the best way to store the stream ?
>
>
>
>
>

-- 
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/69d2b2a4-5928-488f-a923-f03750d1eea6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Saving Contionus Data through Django

2015-04-02 Thread aRkadeFR

Not sure Django is the best solution to your problem.

As Ilya said, you should buffer it. Then you can work
with your buffered data. You said one entry every minute,
so the "buffer" can just send this entry every minute to
a Django project?

On 04/02/2015 04:34 PM, Ilya Kazakevich wrote:

You can't just store stream in database.
You need to buffer it first, and then save to field like 
blob: http://www.postgresql.org/docs/9.1/static/datatype-binary.html


I am not sure that relational database is the best place to store 
binary data coming from devices.



On Thursday, April 2, 2015 at 5:10:23 PM UTC+3, nitinag...@gmail.com 
wrote:


Hello All

I am new to Django. And, I need help in models file.
I made a table - device_list. It contain one filed as device_id.
Now, I need to store 3 continuous data stream which is coming like
1 entry per minute each for this device_id.
All 3 data streams will have different timestamps and that also
needs to be stored.

So, what is the best way to store the stream ?




--
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/69d2b2a4-5928-488f-a923-f03750d1eea6%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/551D5698.6000608%40arkade.info.
For more options, visit https://groups.google.com/d/optout.


Re: Is bcc implemented?

2015-04-02 Thread Scot Hacker

>
> See 
> https://docs.djangoproject.com/en/1.7/topics/email/#emailmessage-objects
>

./s
 

-- 
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/3fba2b64-2423-4592-9bc3-e39cb0fbb8ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using Unicode in django

2015-04-02 Thread Filipe Ximenes
Not sure I understood the problem. Are you trying to print only the data in
the "importance" field?
If so, try:

class Crop(models.Model):
name = models.CharField(max_length=30)
importance = models.TextField()
cultivation = models.TextField()
def __unicode__(self):
return u'%s' % (self.importance,)

​

On Thu, Apr 2, 2015 at 10:01 AM, temiloluwa adesina <
adesinatemilol...@gmail.com> wrote:

> Hello
> I just joined this group and i have problems with representing multiple
> fields in admin using __unicode__, when i try to call this data it returns
> just one of them:
>
> class Crop(models.Model):
> name = models.CharField(max_length=30)
> importance = models.TextField()
> cultivation = models.TextField()
> def __unicode__(self):
> return u'%s %s %s' % (self.name, self.importance, self.cultivation
> )
>
>
> 
> but rather than returning just the data in the importance field, it
> returns all the data in each separate field together.
>
> Pls i would appreciate anyone's assistance.
>
> --
> 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/504bf928-7259-4d17-994c-115e98a78a4b%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 


*Filipe Ximenes*+55 (81) 8245-9204

*Vinta Software Studio*http://www.vinta.com.br

-- 
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/CAA-QWB2h4TtWBoyf1yAzBppUj-jNAs3B%2BF%2BiZB3DX8twcjbR0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Python Soap

2015-04-02 Thread nadaei...@gmail.com
Hi All,

What is the best library of python to consume wsdl soap with client
certificate pfx and server certificate cer.

BR

-- 
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/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Accessing to my user

2015-04-02 Thread somenxavier
I have this
class Persona(models.Model):7 
 
   """Person class:8 
 
* user: a user9 
 
* presentation: some paragraph for other knowing you10 
 
* availability: the availability of user for knowing new 
people. See 'AVAILABILITY' tuples explanation11 
 
   """12 
 
   # 'Available' means you want to meet new people now13 
 
   # and 'Unavailable' means you don't want to meet new people.14 
 
   # Useful for not anoying you new users.15 
 
   AVAILABILITY = (16 
 
   ('Y', 'Available'),17 
 
   ('N', 'Unavailable'),18 
 
   )19 

20 

21 
 
   user = models.OneToOneField(User)22 
 
   presentation = models.CharField(max_length=254, blank=True)23 
 
   availability = models.CharField(max_length=1, choices=AVAILABILITY, 
default='Y')24 

25 
 
   def __str__(self):26 
 
   return self.user.username27 

28 
 
   def username(self):29 
 
   return self.user.username30 

31 
 
   def full_name(self):32 
 
   return "{0}, {1}".format(self.user.last_name, self.user.
first_name)33 



How can I do to acces to Persona which has user.username=='foo'?

Thanks 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/599f61a6-6f87-4dd7-a3f2-7a4b3693a185%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing to my user

2015-04-02 Thread Filipe Ximenes
Try:

p = Persona.objects.get(user__username='foo')

​

On Thu, Apr 2, 2015 at 12:24 PM,  wrote:

> I have this
> class Persona(models.Model):7
> 
>"""Person class:8
> 
> * user: a user9
> 
> * presentation: some paragraph for other knowing you10
> 
> * availability: the availability of user for knowing new
> people. See 'AVAILABILITY' tuples explanation11
> 
>"""12
> 
># 'Available' means you want to meet new people now13
> 
># and 'Unavailable' means you don't want to meet new people.14
> 
># Useful for not anoying you new users.15
> 
>AVAILABILITY = (16
> 
>('Y', 'Available'),17
> 
>('N', 'Unavailable'),18
> 
>)19
> 
> 20
> 
> 21
> 
>user = models.OneToOneField(User)22
> 
>presentation = models.CharField(max_length=254, blank=True)23
> 
>availability = models.CharField(max_length=1, choices=AVAILABILITY,
> default='Y')24
> 
> 25
> 
>def __str__(self):26
> 
>return self.user.username27
> 
> 28
> 
>def username(self):29
> 
>return self.user.username30
> 
> 31
> 
>def full_name(self):32
> 
>return "{0}, {1}".format(self.user.last_name, self.user.
> first_name)33
> 
>
>
> How can I do to acces to Persona which has user.username=='foo'?
>
> Thanks 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/599f61a6-6f87-4dd7-a3f2-7a4b3693a185%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 


*Filipe Ximenes*+55 (81) 8245-9204

*Vinta Software Studio*http://www.vinta.com.br

-- 
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/CAA-QWB1yVcigp4%3D0xX5KD4-F_dW4P%2Bp3BmamWjHHnNe_cyNA5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing to my user

2015-04-02 Thread Simon Charette
Hi!

Personna.objects.get(user__username='foo') should do.

Simon

Le jeudi 2 avril 2015 11:24:48 UTC-4, somen...@gmail.com a écrit :
>
> I have this
> class Persona(models.Model):7 
>  
>"""Person class:8 
>  
> * user: a user9 
>  
> * presentation: some paragraph for other knowing you10 
>  
> * availability: the availability of user for knowing new 
> people. See 'AVAILABILITY' tuples explanation11 
>  
>"""12 
>  
># 'Available' means you want to meet new people now13 
>  
># and 'Unavailable' means you don't want to meet new people.14 
>  
># Useful for not anoying you new users.15 
>  
>AVAILABILITY = (16 
>  
>('Y', 'Available'),17 
>  
>('N', 'Unavailable'),18 
>  
>)19 
> 
> 20 
> 
> 21 
>  
>user = models.OneToOneField(User)22 
>  
>presentation = models.CharField(max_length=254, blank=True)23 
>  
>availability = models.CharField(max_length=1, choices=AVAILABILITY, 
> default='Y')24 
> 
> 25 
>  
>def __str__(self):26 
>  
>return self.user.username27 
> 
> 28 
>  
>def username(self):29 
>  
>return self.user.username30 
> 
> 31 
>  
>def full_name(self):32 
>  
>return "{0}, {1}".format(self.user.last_name, self.user.
> first_name)33 
> 
>
>
> How can I do to acces to Persona which has user.username=='foo'?
>
> Thanks 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/30164044-6f56-433d-9372-75f77169a4d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Problem after Virtualenv Setup

2015-04-02 Thread Kishan Mehta
Hi Friends,

I have created my django project and worked on it . Recently I came to know 
about virtualenv and the problem it solves.
I have installed virtualenv and activated that environment.
Now django command is not recognized.
* Will I have to install django again ? Or is there any other efficient 
way.*
Thanks for help.


Kishan Mehta

-- 
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/8ff2789d-f636-4efb-9993-6d4044ed5b05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Problem after Virtualenv Setup

2015-04-02 Thread Carl Meyer
Hi Kishan,

On 04/02/2015 09:41 AM, Kishan Mehta wrote:
> I have created my django project and worked on it . Recently I came to
> know about virtualenv and the problem it solves.
> I have installed virtualenv and activated that environment.
> Now django command is not recognized.
> * Will I have to install django again ? Or is there any other efficient
> way.*
> Thanks for help.

You will have to reinstall Django inside the virtual environment.

You should probably also uninstall the global Django you installed
(should just be a matter of "pip uninstall Django" without the
virtualenv activated; may need to preface that with "sudo " depending on
your OS and configuration.)

Carl

-- 
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/551D63D9.8070005%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: Python Soap

2015-04-02 Thread Nikolas Stevenson-Molnar

Take a look at suds-jurko: https://bitbucket.org/jurko/suds

_Nik

On 4/2/2015 8:05 AM, nadaei...@gmail.com wrote:

Hi All,

What is the best library of python to consume wsdl soap with client 
certificate pfx and server certificate cer.


BR


--
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/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%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/551D641E.6030109%40consbio.org.
For more options, visit https://groups.google.com/d/optout.


Re: Python Soap

2015-04-02 Thread nadaei...@gmail.com
Thanks Nikolas,

Checking will come back to you.

2015-04-02 15:45 GMT+00:00 Nikolas Stevenson-Molnar 
:

>  Take a look at suds-jurko: https://bitbucket.org/jurko/suds
>
> _Nik
>
>
> On 4/2/2015 8:05 AM, nadaei...@gmail.com wrote:
>
> Hi All,
>
>  What is the best library of python to consume wsdl soap with client
> certificate pfx and server certificate cer.
>
>  BR
>
>
>   --
> 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/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%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/551D641E.6030109%40consbio.org
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Nadae Ivar BADIO

+221 70 644 38 44

-- 
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/CACZ2VwR-jyrTOQiiR7EBcomhs0DAdU_vrQgjzCdh19WaXOz7hg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using Unicode in django

2015-04-02 Thread temiloluwa adesina
Thanks for your reply i found another way to do it, i could just make it 
work like this:

b= Crop.objects.all()
nm= b.name
imp= b.importance
cuv= b.cultivation

realized this would help me retrieve the individual data that i wanted to 
get.

On Thursday, April 2, 2015 at 3:57:18 PM UTC+1, Filipe Ximenes wrote:
>
> Not sure I understood the problem. Are you trying to print only the data 
> in the "importance" field?
> If so, try:
>
> class Crop(models.Model):
> name = models.CharField(max_length=30)
> importance = models.TextField()
> cultivation = models.TextField()
> def __unicode__(self):
> return u'%s' % (self.importance,)
>
> ​
>
> On Thu, Apr 2, 2015 at 10:01 AM, temiloluwa adesina  > wrote:
>
>> Hello 
>> I just joined this group and i have problems with representing multiple 
>> fields in admin using __unicode__, when i try to call this data it returns 
>> just one of them:
>>
>> class Crop(models.Model):
>> name = models.CharField(max_length=30)
>> importance = models.TextField()
>> cultivation = models.TextField()
>> def __unicode__(self):
>> return u'%s %s %s' % (self.name, self.importance, self.
>> cultivation)
>>
>>
>> 
>> but rather than returning just the data in the importance field, it 
>> returns all the data in each separate field together.
>>
>> Pls i would appreciate anyone's assistance.
>>
>> -- 
>> 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/504bf928-7259-4d17-994c-115e98a78a4b%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>   
>
> *Filipe Ximenes*+55 (81) 8245-9204
>
> *Vinta Software Studio*http://www.vinta.com.br
>  

-- 
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/5c19a867-7450-4af5-abbb-654efa31295a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python Soap

2015-04-02 Thread nadaei...@gmail.com
I am already using suds but my issue was using suds with ssl and client and
server certificate

2015-04-02 15:48 GMT+00:00 nadaei...@gmail.com :

> Thanks Nikolas,
>
> Checking will come back to you.
>
> 2015-04-02 15:45 GMT+00:00 Nikolas Stevenson-Molnar <
> nik.mol...@consbio.org>:
>
>>  Take a look at suds-jurko: https://bitbucket.org/jurko/suds
>>
>> _Nik
>>
>>
>> On 4/2/2015 8:05 AM, nadaei...@gmail.com wrote:
>>
>> Hi All,
>>
>>  What is the best library of python to consume wsdl soap with client
>> certificate pfx and server certificate cer.
>>
>>  BR
>>
>>
>>   --
>> 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/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%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/551D641E.6030109%40consbio.org
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Nadae Ivar BADIO
>
> +221 70 644 38 44
>



-- 
Nadae Ivar BADIO

+221 70 644 38 44

-- 
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/CACZ2VwS9Ge-L6%3DfiU%2BdtRYgcr2LfU5t7mNAaJUYosTV3YQQXFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python Soap

2015-04-02 Thread James Schneider
Suds is an old (abandoned) library. suds-jurko is a newer fork of it, and
may handle SSL connections better.

You may need to provide more detail as to what you are trying to do, as the
SSL portion is handled by underlying libraries in Python, not by suds-jurko
directly.

-James
On Apr 2, 2015 8:57 AM, "nadaei...@gmail.com"  wrote:

> I am already using suds but my issue was using suds with ssl and client
> and server certificate
>
> 2015-04-02 15:48 GMT+00:00 nadaei...@gmail.com :
>
>> Thanks Nikolas,
>>
>> Checking will come back to you.
>>
>> 2015-04-02 15:45 GMT+00:00 Nikolas Stevenson-Molnar <
>> nik.mol...@consbio.org>:
>>
>>>  Take a look at suds-jurko: https://bitbucket.org/jurko/suds
>>>
>>> _Nik
>>>
>>>
>>> On 4/2/2015 8:05 AM, nadaei...@gmail.com wrote:
>>>
>>> Hi All,
>>>
>>>  What is the best library of python to consume wsdl soap with client
>>> certificate pfx and server certificate cer.
>>>
>>>  BR
>>>
>>>
>>>   --
>>> 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/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%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/551D641E.6030109%40consbio.org
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Nadae Ivar BADIO
>>
>> +221 70 644 38 44
>>
>
>
>
> --
> Nadae Ivar BADIO
>
> +221 70 644 38 44
>
> --
> 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/CACZ2VwS9Ge-L6%3DfiU%2BdtRYgcr2LfU5t7mNAaJUYosTV3YQQXFA%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/CA%2Be%2BciVXHTKJppwP5cuDoHFew2AZxkJ1CVJ%3Dk486XOjQeNpPBA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Problem after Virtualenv Setup

2015-04-02 Thread Kishan Mehta
Hey thanks Carl.
On Apr 2, 2015 9:14 PM, "Carl Meyer"  wrote:

> Hi Kishan,
>
> On 04/02/2015 09:41 AM, Kishan Mehta wrote:
> > I have created my django project and worked on it . Recently I came to
> > know about virtualenv and the problem it solves.
> > I have installed virtualenv and activated that environment.
> > Now django command is not recognized.
> > * Will I have to install django again ? Or is there any other efficient
> > way.*
> > Thanks for help.
>
> You will have to reinstall Django inside the virtual environment.
>
> You should probably also uninstall the global Django you installed
> (should just be a matter of "pip uninstall Django" without the
> virtualenv activated; may need to preface that with "sudo " depending on
> your OS and configuration.)
>
> Carl
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/Fsqe3LmK3l8/unsubscribe.
> To unsubscribe from this group and all its topics, 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/551D63D9.8070005%40oddbird.net
> .
> 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/CAC5ThKEj-549uMOkxFY8eaK616iZ16QmfCXcNroOLeFaLfTBVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python Soap

2015-04-02 Thread Nikolas Stevenson-Molnar
suds-jurko also seems to be actively maintained, so you may have luck 
with filing an issue for missing functionality.


_Nik

On 4/2/2015 9:05 AM, James Schneider wrote:


Suds is an old (abandoned) library. suds-jurko is a newer fork of it, 
and may handle SSL connections better.


You may need to provide more detail as to what you are trying to do, 
as the SSL portion is handled by underlying libraries in Python, not 
by suds-jurko directly.


-James

On Apr 2, 2015 8:57 AM, "nadaei...@gmail.com 
" > wrote:


I am already using suds but my issue was using suds with ssl and
client and server certificate

2015-04-02 15:48 GMT+00:00 nadaei...@gmail.com
 mailto:nadaei...@gmail.com>>:

Thanks Nikolas,

Checking will come back to you.

2015-04-02 15:45 GMT+00:00 Nikolas Stevenson-Molnar
mailto:nik.mol...@consbio.org>>:

Take a look at suds-jurko: https://bitbucket.org/jurko/suds

_Nik


On 4/2/2015 8:05 AM, nadaei...@gmail.com
 wrote:

Hi All,

What is the best library of python to consume wsdl soap
with client certificate pfx and server certificate cer.

BR


-- 
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/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%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/551D641E.6030109%40consbio.org

.
For more options, visit https://groups.google.com/d/optout.




-- 
Nadae Ivar BADIO


+221 70 644 38 44 




-- 
Nadae Ivar BADIO


+221 70 644 38 44 
-- 
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/CACZ2VwS9Ge-L6%3DfiU%2BdtRYgcr2LfU5t7mNAaJUYosTV3YQQXFA%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/CA%2Be%2BciVXHTKJppwP5cuDoHFew2AZxkJ1CVJ%3Dk486XOjQeNpPBA%40mail.gmail.com 


Re: Help with: Django 'ModelForm' object has no attribute 'cleaned_data' for M2M through

2015-04-02 Thread Ronaldo Bahia
Dont know why but I still get the same error

Ronaldo Bahia

> Em 02/04/2015, às 10:50, Vijay Khemlani  escreveu:
> 
> In your Form class "job" is a ChoiceField, and it returns a primitive value 
> (such as "2") when cleaned.
> 
> You would need to convert it back to a django model with
> 
> job = Job.objects.get(pk=form.cleaned_data['job'])
> 
> 
> 
>> On Thu, Apr 2, 2015 at 10:17 AM, Ronaldo Bahia  wrote:
>> Thanks. Solved cleaned_data issue.
>> 
>> Now I getting:
>> 
>> Cannot assign "u'2'": "CandidateToJob.job" must be a "Job" instance.
>> 
>> Or
>> 
>> Cannot assign "u'Title'": "CandidateToJob.job" must be a "Job" instance.
>> 
>> Em quinta-feira, 2 de abril de 2015 09:44:44 UTC-3, Vijay Khemlani escreveu:
>>> 
>>> Call form.is_valid() (and check that it returns True) before accessing 
>>> form.cleaned_data
>>> 
>>> On Thu, Apr 2, 2015 at 9:36 AM, Ronaldo Bahia  wrote:
 
 Hi every one.
 
 Can you help me in this?
 
 http://stackoverflow.com/questions/29413107/django-modelform-object-has-no-attribute-cleaned-data-for-m2m-through
 
 Thanks in advance
 Ronaldo
 -- 
 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/65204e73-37e5-4463-862f-cf453d835440%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/1f030ca5-651e-45a9-b4b3-25dbe5dc31fa%40googlegroups.com.
>> 
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Django users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/django-users/Ve_RLvkK4Gs/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CALn3ei2SJKHvjxCh2GV03Xh8%2BzOXJrV3FLZ9%3DEKjgStkfcqRdQ%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/5D9058DA-F6B7-4866-95A0-CD7FA59AF5B1%40jobconvo.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help with: Django 'ModelForm' object has no attribute 'cleaned_data' for M2M through

2015-04-02 Thread Vijay Khemlani
post your updated code

On Thu, Apr 2, 2015 at 1:06 PM, Ronaldo Bahia  wrote:

> Dont know why but I still get the same error
>
> Ronaldo Bahia
>
> Em 02/04/2015, às 10:50, Vijay Khemlani  escreveu:
>
> In your Form class "job" is a ChoiceField, and it returns a primitive
> value (such as "2") when cleaned.
>
> You would need to convert it back to a django model with
>
> job = Job.objects.get(pk=form.cleaned_data['job'])
>
>
>
> On Thu, Apr 2, 2015 at 10:17 AM, Ronaldo Bahia 
> wrote:
>
>> Thanks. Solved cleaned_data issue.
>>
>> Now I getting:
>>
>> Cannot assign "u'2'": "CandidateToJob.job" must be a "Job" instance.
>>
>> Or
>>
>> Cannot assign "u'Title'": "CandidateToJob.job" must be a "Job" instance.
>>
>> Em quinta-feira, 2 de abril de 2015 09:44:44 UTC-3, Vijay Khemlani
>> escreveu:
>>>
>>> Call form.is_valid() (and check that it returns True) before accessing
>>> form.cleaned_data
>>>
>>> On Thu, Apr 2, 2015 at 9:36 AM, Ronaldo Bahia 
>>> wrote:
>>>

 Hi every one.

 Can you help me in this?

 http://stackoverflow.com/questions/29413107/django-
 modelform-object-has-no-attribute-cleaned-data-for-m2m-through

 Thanks in advance
 Ronaldo

 --
 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/65204e73-37e5-4463-862f-cf453d835440%
 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/1f030ca5-651e-45a9-b4b3-25dbe5dc31fa%40googlegroups.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/Ve_RLvkK4Gs/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CALn3ei2SJKHvjxCh2GV03Xh8%2BzOXJrV3FLZ9%3DEKjgStkfcqRdQ%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/5D9058DA-F6B7-4866-95A0-CD7FA59AF5B1%40jobconvo.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/CALn3ei32-q-cRm1m_jktsVnYoFg40fu4v5Ztd_BjL-f7b4n7FA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python Soap

2015-04-02 Thread nadaei...@gmail.com
i was doing it using this:

import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.DEBUG)
logging.getLogger('suds.transport').setLevel(logging.DEBUG)

c = Client('https://10.102.5.81:901/APIService.svc?singleWsdl',
transport = HTTPSClientCertTransport('client.pem','server.pem'))

response11 =  c.service.Login()
print response11



2015-04-02 16:09 GMT+00:00 Nikolas Stevenson-Molnar 
:

>  suds-jurko also seems to be actively maintained, so you may have luck
> with filing an issue for missing functionality.
>
> _Nik
>
>
> On 4/2/2015 9:05 AM, James Schneider wrote:
>
> Suds is an old (abandoned) library. suds-jurko is a newer fork of it, and
> may handle SSL connections better.
>
> You may need to provide more detail as to what you are trying to do, as
> the SSL portion is handled by underlying libraries in Python, not by
> suds-jurko directly.
>
> -James
> On Apr 2, 2015 8:57 AM, "nadaei...@gmail.com"  wrote:
>
>> I am already using suds but my issue was using suds with ssl and client
>> and server certificate
>>
>> 2015-04-02 15:48 GMT+00:00 nadaei...@gmail.com :
>>
>>> Thanks Nikolas,
>>>
>>>  Checking will come back to you.
>>>
>>> 2015-04-02 15:45 GMT+00:00 Nikolas Stevenson-Molnar <
>>> nik.mol...@consbio.org>:
>>>
  Take a look at suds-jurko: https://bitbucket.org/jurko/suds

 _Nik


 On 4/2/2015 8:05 AM, nadaei...@gmail.com wrote:

  Hi All,

  What is the best library of python to consume wsdl soap with client
 certificate pfx and server certificate cer.

  BR


 --
 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/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%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/551D641E.6030109%40consbio.org
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>>   --
>>>  Nadae Ivar BADIO
>>>
>>> +221 70 644 38 44 <%2B221%2070%20644%2038%2044>
>>>
>>
>>
>>
>>  --
>>  Nadae Ivar BADIO
>>
>> +221 70 644 38 44 <%2B221%2070%20644%2038%2044>
>>   --
>> 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/CACZ2VwS9Ge-L6%3DfiU%2BdtRYgcr2LfU5t7mNAaJUYosTV3YQQXFA%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/CA%2Be%2BciVXHTKJppwP5cuDoHFew2AZxkJ1CVJ%3Dk486XOjQeNpPBA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>  --
> You received this message because you are subscribed to th

Re: Help with: Django 'ModelForm' object has no attribute 'cleaned_data' for M2M through

2015-04-02 Thread Ronaldo Bahia
updated

http://stackoverflow.com/questions/29413107/django-modelform-object-has-no-attribute-cleaned-data-for-m2m-through/29417768#29417768

*Ronaldo Bahia *
Diretor | JobConvo.com
Tel: 11 3280 6971

2015-04-02 13:15 GMT-03:00 Vijay Khemlani :

> post your updated code
>
> On Thu, Apr 2, 2015 at 1:06 PM, Ronaldo Bahia 
> wrote:
>
>> Dont know why but I still get the same error
>>
>> Ronaldo Bahia
>>
>> Em 02/04/2015, às 10:50, Vijay Khemlani  escreveu:
>>
>> In your Form class "job" is a ChoiceField, and it returns a primitive
>> value (such as "2") when cleaned.
>>
>> You would need to convert it back to a django model with
>>
>> job = Job.objects.get(pk=form.cleaned_data['job'])
>>
>>
>>
>> On Thu, Apr 2, 2015 at 10:17 AM, Ronaldo Bahia 
>> wrote:
>>
>>> Thanks. Solved cleaned_data issue.
>>>
>>> Now I getting:
>>>
>>> Cannot assign "u'2'": "CandidateToJob.job" must be a "Job" instance.
>>>
>>> Or
>>>
>>> Cannot assign "u'Title'": "CandidateToJob.job" must be a "Job" instance.
>>>
>>> Em quinta-feira, 2 de abril de 2015 09:44:44 UTC-3, Vijay Khemlani
>>> escreveu:

 Call form.is_valid() (and check that it returns True) before accessing
 form.cleaned_data

 On Thu, Apr 2, 2015 at 9:36 AM, Ronaldo Bahia 
 wrote:

>
> Hi every one.
>
> Can you help me in this?
>
> http://stackoverflow.com/questions/29413107/django-
> modelform-object-has-no-attribute-cleaned-data-for-m2m-through
>
> Thanks in advance
> Ronaldo
>
> --
> 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/65204e73-37e5-4463-862f-cf453d835440%
> 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/1f030ca5-651e-45a9-b4b3-25dbe5dc31fa%40googlegroups.com
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/Ve_RLvkK4Gs/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/CALn3ei2SJKHvjxCh2GV03Xh8%2BzOXJrV3FLZ9%3DEKjgStkfcqRdQ%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/5D9058DA-F6B7-4866-95A0-CD7FA59AF5B1%40jobconvo.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/Ve_RLvkK4Gs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-us

Re: Python Soap

2015-04-02 Thread Nikolas Stevenson-Molnar
Have a look at this: 
https://bitbucket.org/jurko/suds/issue/23/ssl-certificate-verification


_Nik

On 4/2/2015 9:17 AM, nadaei...@gmail.com wrote:

i was doing it using this:

import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.DEBUG)
logging.getLogger('suds.transport').setLevel(logging.DEBUG)

c = 
Client('https://10.102.5.81:901/APIService.svc?singleWsdl', transport 
= HTTPSClientCertTransport('client.pem','server.pem'))


response11 =  c.service.Login()
print response11

2015-04-02 16:09 GMT+00:00 Nikolas Stevenson-Molnar 
mailto:nik.mol...@consbio.org>>:


suds-jurko also seems to be actively maintained, so you may have
luck with filing an issue for missing functionality.

_Nik


On 4/2/2015 9:05 AM, James Schneider wrote:


Suds is an old (abandoned) library. suds-jurko is a newer fork of
it, and may handle SSL connections better.

You may need to provide more detail as to what you are trying to
do, as the SSL portion is handled by underlying libraries in
Python, not by suds-jurko directly.

-James

On Apr 2, 2015 8:57 AM, "nadaei...@gmail.com
" mailto:nadaei...@gmail.com>> wrote:

I am already using suds but my issue was using suds with ssl
and client and server certificate

2015-04-02 15:48 GMT+00:00 nadaei...@gmail.com
 mailto:nadaei...@gmail.com>>:

Thanks Nikolas,

Checking will come back to you.

2015-04-02 15:45 GMT+00:00 Nikolas Stevenson-Molnar
mailto:nik.mol...@consbio.org>>:

Take a look at suds-jurko:
https://bitbucket.org/jurko/suds

_Nik


On 4/2/2015 8:05 AM, nadaei...@gmail.com
 wrote:

Hi All,

What is the best library of python to consume wsdl
soap with client certificate pfx and server
certificate cer.

BR


-- 
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/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%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/551D641E.6030109%40consbio.org

.
For more options, visit
https://groups.google.com/d/optout.




-- 
Nadae Ivar BADIO


+221 70 644 38 44 




-- 
Nadae Ivar BADIO


+221 70 644 38 44 
-- 
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

http

Re: Help with: Django 'ModelForm' object has no attribute 'cleaned_data' for M2M through

2015-04-02 Thread Vijay Khemlani
What line is thrwing the error? the one with

form.save(commit=False)

?

On Thu, Apr 2, 2015 at 1:23 PM, Ronaldo Bahia  wrote:

> updated
>
>
> http://stackoverflow.com/questions/29413107/django-modelform-object-has-no-attribute-cleaned-data-for-m2m-through/29417768#29417768
>
> *Ronaldo Bahia *
> Diretor | JobConvo.com
> Tel: 11 3280 6971
>
> 2015-04-02 13:15 GMT-03:00 Vijay Khemlani :
>
>> post your updated code
>>
>> On Thu, Apr 2, 2015 at 1:06 PM, Ronaldo Bahia 
>> wrote:
>>
>>> Dont know why but I still get the same error
>>>
>>> Ronaldo Bahia
>>>
>>> Em 02/04/2015, às 10:50, Vijay Khemlani  escreveu:
>>>
>>> In your Form class "job" is a ChoiceField, and it returns a primitive
>>> value (such as "2") when cleaned.
>>>
>>> You would need to convert it back to a django model with
>>>
>>> job = Job.objects.get(pk=form.cleaned_data['job'])
>>>
>>>
>>>
>>> On Thu, Apr 2, 2015 at 10:17 AM, Ronaldo Bahia 
>>> wrote:
>>>
 Thanks. Solved cleaned_data issue.

 Now I getting:

 Cannot assign "u'2'": "CandidateToJob.job" must be a "Job" instance.

 Or

 Cannot assign "u'Title'": "CandidateToJob.job" must be a "Job" instance.

 Em quinta-feira, 2 de abril de 2015 09:44:44 UTC-3, Vijay Khemlani
 escreveu:
>
> Call form.is_valid() (and check that it returns True) before
> accessing form.cleaned_data
>
> On Thu, Apr 2, 2015 at 9:36 AM, Ronaldo Bahia 
> wrote:
>
>>
>> Hi every one.
>>
>> Can you help me in this?
>>
>> http://stackoverflow.com/questions/29413107/django-
>> modelform-object-has-no-attribute-cleaned-data-for-m2m-through
>>
>> Thanks in advance
>> Ronaldo
>>
>> --
>> 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/65204e73-37e5-4463-862f-cf453d835440%
>> 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/1f030ca5-651e-45a9-b4b3-25dbe5dc31fa%40googlegroups.com
 
 .

 For more options, visit https://groups.google.com/d/optout.

>>>
>>>  --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/Ve_RLvkK4Gs/unsubscribe.
>>> To unsubscribe from this group and all its topics, 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/CALn3ei2SJKHvjxCh2GV03Xh8%2BzOXJrV3FLZ9%3DEKjgStkfcqRdQ%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/5D9058DA-F6B7-4866-95A0-CD7FA59AF5B1%40jobconvo.com
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> You received this message because you are 

Re: Help with: Django 'ModelForm' object has no attribute 'cleaned_data' for M2M through

2015-04-02 Thread Ronaldo Bahia
No.
This line:

job = Job.objects.get(id=form.cleaned_data['job'])

If I change my form to get job__id:

cojobs=Company.objects.select_related('job__id').values_list('job__id',
flat=True)


The error is still that line but a different message:

Job matching query does not exist.




*Ronaldo Bahia *
Diretor | JobConvo.com
Tel: 11 3280 6971

2015-04-02 13:28 GMT-03:00 Vijay Khemlani :

> What line is thrwing the error? the one with
>
> form.save(commit=False)
>
> ?
>
> On Thu, Apr 2, 2015 at 1:23 PM, Ronaldo Bahia 
> wrote:
>
>> updated
>>
>>
>> http://stackoverflow.com/questions/29413107/django-modelform-object-has-no-attribute-cleaned-data-for-m2m-through/29417768#29417768
>>
>> *Ronaldo Bahia *
>> Diretor | JobConvo.com
>> Tel: 11 3280 6971
>>
>> 2015-04-02 13:15 GMT-03:00 Vijay Khemlani :
>>
>>> post your updated code
>>>
>>> On Thu, Apr 2, 2015 at 1:06 PM, Ronaldo Bahia 
>>> wrote:
>>>
 Dont know why but I still get the same error

 Ronaldo Bahia

 Em 02/04/2015, às 10:50, Vijay Khemlani  escreveu:

 In your Form class "job" is a ChoiceField, and it returns a primitive
 value (such as "2") when cleaned.

 You would need to convert it back to a django model with

 job = Job.objects.get(pk=form.cleaned_data['job'])



 On Thu, Apr 2, 2015 at 10:17 AM, Ronaldo Bahia 
 wrote:

> Thanks. Solved cleaned_data issue.
>
> Now I getting:
>
> Cannot assign "u'2'": "CandidateToJob.job" must be a "Job" instance.
>
> Or
>
> Cannot assign "u'Title'": "CandidateToJob.job" must be a "Job"
> instance.
>
> Em quinta-feira, 2 de abril de 2015 09:44:44 UTC-3, Vijay Khemlani
> escreveu:
>>
>> Call form.is_valid() (and check that it returns True) before
>> accessing form.cleaned_data
>>
>> On Thu, Apr 2, 2015 at 9:36 AM, Ronaldo Bahia 
>> wrote:
>>
>>>
>>> Hi every one.
>>>
>>> Can you help me in this?
>>>
>>> http://stackoverflow.com/questions/29413107/django-
>>> modelform-object-has-no-attribute-cleaned-data-for-m2m-through
>>>
>>> Thanks in advance
>>> Ronaldo
>>>
>>> --
>>> 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/65204e73-
>>> 37e5-4463-862f-cf453d835440%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/1f030ca5-651e-45a9-b4b3-25dbe5dc31fa%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

  --
 You received this message because you are subscribed to a topic in the
 Google Groups "Django users" group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/django-users/Ve_RLvkK4Gs/unsubscribe.
 To unsubscribe from this group and all its topics, 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/CALn3ei2SJKHvjxCh2GV03Xh8%2BzOXJrV3FLZ9%3DEKjgStkfcqRdQ%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

Re: Accessing to my user

2015-04-02 Thread somenxavier
Perfect.

El dijous, 2 abril de 2015 17:29:46 UTC+2, Filipe Ximenes va escriure:
>
> Try:
>
> p = Persona.objects.get(user__username='foo')
>
> ​
>
> On Thu, Apr 2, 2015 at 12:24 PM, > wrote:
>
>> I have this
>> class Persona(models.Model):7 
>>  
>>"""Person class:8 
>>  
>> * user: a user9 
>>  
>> * presentation: some paragraph for other knowing you10 
>>  
>> * availability: the availability of user for knowing new 
>> people. See 'AVAILABILITY' tuples explanation11 
>>  
>>"""12 
>>  
>># 'Available' means you want to meet new people now13 
>>  
>># and 'Unavailable' means you don't want to meet new people.14 
>>  
>># Useful for not anoying you new users.15 
>>  
>>AVAILABILITY = (16 
>>  
>>('Y', 'Available'),17 
>>  
>>('N', 'Unavailable'),18 
>>  
>>)19 
>> 
>> 20 
>> 
>> 21 
>>  
>>user = models.OneToOneField(User)22 
>>  
>>presentation = models.CharField(max_length=254, blank=True)23 
>>  
>>availability = models.CharField(max_length=1, choices=AVAILABILITY
>> , default='Y')24 
>> 
>> 25 
>>  
>>def __str__(self):26 
>>  
>>return self.user.username27 
>> 
>> 28 
>>  
>>def username(self):29 
>>  
>>return self.user.username30 
>> 
>> 31 
>>  
>>def full_name(self):32 
>>  
>>return "{0}, {1}".format(self.user.last_name, self.user.
>> first_name)33 
>> 
>>
>>
>> How can I do to acces to Persona which has user.username=='foo'?
>>
>> Thanks 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/599f61a6-6f87-4dd7-a3f2-7a4b3693a185%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>   
>
> *Filipe Ximenes*+55 (81) 8245-9204
>
> *Vinta Software Studio*http://www.vinta.com.br
>  

-- 
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/5fca2f82-7bdf-4eff-abc6-e6aab45ab41e%40googlegroups.com.
For

Re: Help with: Django 'ModelForm' object has no attribute 'cleaned_data' for M2M through

2015-04-02 Thread Ronaldo Bahia
Sorry. It is

if form.is_valid():



The line providing the error

*Ronaldo Bahia *
Diretor | JobConvo.com
Tel: 11 3280 6971

2015-04-02 13:39 GMT-03:00 Ronaldo Bahia :

> No.
> This line:
>
> job = Job.objects.get(id=form.cleaned_data['job'])
>
> If I change my form to get job__id:
>
> cojobs=Company.objects.select_related('job__id').values_list('job__id',
> flat=True)
>
>
> The error is still that line but a different message:
>
> Job matching query does not exist.
>
>
>
>
> *Ronaldo Bahia *
> Diretor | JobConvo.com
> Tel: 11 3280 6971
>
> 2015-04-02 13:28 GMT-03:00 Vijay Khemlani :
>
> What line is thrwing the error? the one with
>>
>> form.save(commit=False)
>>
>> ?
>>
>> On Thu, Apr 2, 2015 at 1:23 PM, Ronaldo Bahia 
>> wrote:
>>
>>> updated
>>>
>>>
>>> http://stackoverflow.com/questions/29413107/django-modelform-object-has-no-attribute-cleaned-data-for-m2m-through/29417768#29417768
>>>
>>> *Ronaldo Bahia *
>>> Diretor | JobConvo.com
>>> Tel: 11 3280 6971
>>>
>>> 2015-04-02 13:15 GMT-03:00 Vijay Khemlani :
>>>
 post your updated code

 On Thu, Apr 2, 2015 at 1:06 PM, Ronaldo Bahia 
 wrote:

> Dont know why but I still get the same error
>
> Ronaldo Bahia
>
> Em 02/04/2015, às 10:50, Vijay Khemlani  escreveu:
>
> In your Form class "job" is a ChoiceField, and it returns a primitive
> value (such as "2") when cleaned.
>
> You would need to convert it back to a django model with
>
> job = Job.objects.get(pk=form.cleaned_data['job'])
>
>
>
> On Thu, Apr 2, 2015 at 10:17 AM, Ronaldo Bahia 
> wrote:
>
>> Thanks. Solved cleaned_data issue.
>>
>> Now I getting:
>>
>> Cannot assign "u'2'": "CandidateToJob.job" must be a "Job" instance.
>>
>> Or
>>
>> Cannot assign "u'Title'": "CandidateToJob.job" must be a "Job"
>> instance.
>>
>> Em quinta-feira, 2 de abril de 2015 09:44:44 UTC-3, Vijay Khemlani
>> escreveu:
>>>
>>> Call form.is_valid() (and check that it returns True) before
>>> accessing form.cleaned_data
>>>
>>> On Thu, Apr 2, 2015 at 9:36 AM, Ronaldo Bahia 
>>> wrote:
>>>

 Hi every one.

 Can you help me in this?

 http://stackoverflow.com/questions/29413107/django-
 modelform-object-has-no-attribute-cleaned-data-for-m2m-through

 Thanks in advance
 Ronaldo

 --
 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/65204e73-
 37e5-4463-862f-cf453d835440%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/1f030ca5-651e-45a9-b4b3-25dbe5dc31fa%40googlegroups.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/Ve_RLvkK4Gs/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/CALn3ei2SJKHvjxCh2GV03Xh8%2BzOXJrV3FLZ9%3DEKjgStkfcqRdQ%40mail.gmail.com
> 
> .
> For more options, visit htt

Re: Python Soap

2015-04-02 Thread nadaei...@gmail.com
Thanks finally using this but getting web.fault:

from sudsssltransport import SudsClientStrictSSL
c= SudsClientStrictSSL('
https://10.102.5.81:901/APIService.svc?singleWsdl', client_cert='cert.pem',
verify_ssl='certificate.pem')
print 'here'
hoho = c.service.Login(clientID=202,
terminalID='657CBC06-B339-432C-8122-F8DE3DDD15A8', authCred='API-0002')
print hoho



No handlers could be found for logger "suds.client"

Traceback (most recent call last):

  File ".py", line 61, in 

main()

  File ".py", line 52, in main

hoho = c.service.Login()

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 521, in __call__

return client.invoke(args, kwargs)

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 581, in invoke

result = self.send(soapenv)

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 621, in send

original_soapenv=original_soapenv)

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 670, in
process_reply

raise WebFault(fault, replyroot)

suds.WebFault





2015-04-02 16:24 GMT+00:00 Nikolas Stevenson-Molnar 
:

>  Have a look at this:
> https://bitbucket.org/jurko/suds/issue/23/ssl-certificate-verification
>
> _Nik
>
>
> On 4/2/2015 9:17 AM, nadaei...@gmail.com wrote:
>
> i was doing it using this:
>
>  import logging
>  logging.basicConfig(level=logging.INFO)
> logging.getLogger('suds.client').setLevel(logging.DEBUG)
> logging.getLogger('suds.transport').setLevel(logging.DEBUG)
>
>  c = Client('https://10.102.5.81:901/APIService.svc?singleWsdl',
> transport = HTTPSClientCertTransport('client.pem','server.pem'))
>
>  response11 =  c.service.Login()
> print response11
>
>
>
> 2015-04-02 16:09 GMT+00:00 Nikolas Stevenson-Molnar <
> nik.mol...@consbio.org>:
>
>>  suds-jurko also seems to be actively maintained, so you may have luck
>> with filing an issue for missing functionality.
>>
>> _Nik
>>
>>
>> On 4/2/2015 9:05 AM, James Schneider wrote:
>>
>> Suds is an old (abandoned) library. suds-jurko is a newer fork of it, and
>> may handle SSL connections better.
>>
>> You may need to provide more detail as to what you are trying to do, as
>> the SSL portion is handled by underlying libraries in Python, not by
>> suds-jurko directly.
>>
>> -James
>> On Apr 2, 2015 8:57 AM, "nadaei...@gmail.com" 
>> wrote:
>>
>>> I am already using suds but my issue was using suds with ssl and client
>>> and server certificate
>>>
>>> 2015-04-02 15:48 GMT+00:00 nadaei...@gmail.com :
>>>
 Thanks Nikolas,

  Checking will come back to you.

 2015-04-02 15:45 GMT+00:00 Nikolas Stevenson-Molnar <
 nik.mol...@consbio.org>:

>  Take a look at suds-jurko: https://bitbucket.org/jurko/suds
>
> _Nik
>
>
> On 4/2/2015 8:05 AM, nadaei...@gmail.com wrote:
>
>  Hi All,
>
>  What is the best library of python to consume wsdl soap with client
> certificate pfx and server certificate cer.
>
>  BR
>
>
> --
> 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/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%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/551D641E.6030109%40consbio.org
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



   --
  Nadae Ivar BADIO

 +221 70 644 38 44 <%2B221%2070%20644%2038%2044>

>>>
>>>
>>>
>>>  --
>>>  Nadae Ivar BADIO
>>>
>>> +221 70 644 38 44 <%2B221%2070%20644%2038%2044>
>>>   --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails

best way to pass options to django views?

2015-04-02 Thread dk
I have a option section in my webpage just display the names of some 
machines

doing this tutorial I was able to get all the lines that appear in the 
"option" tag of my html.
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_select_options
and I can get a big string that I can separate by comas.

I was going to put that big long string as the last part of the url and use 
it with a get method such:

url:   mywebsite/myapp/?options=txt

def profile_page(request):
options = request.GET.get("options", "")
#here parse the options string
 
is this something recommended? or is a better smarter way?
thanks =)


-- 
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/7e6052c5-9ce9-4a13-9eba-c0eb6b9fd745%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


"The outermost 'atomic' block cannot use savepoint = False when autocommit is off." error after upgrading to Django 1.8

2015-04-02 Thread Matt Woodward
Hi all -- I just upgraded one of my projects to Django 1.8 from 1.7.7 and 
in a view function where we're doing manual transaction management 
(Postgres) I'm now getting the error in the subject line.

Basic gist of the code involved:

def foo(request):
  try:
transaction.set_autocommit(False)

... do stuff involving multiple database actions ...
  except (DatabaseError, Exception) as e:
transaction.rollback()

This worked fine in 1.7.7 so I'm not sure what I need to change to get it 
working with 1.8.

I did read the docs on the atomic() functionality and took a few runs at 
that but just wound up with different errors, so I thought I'd start with 
what I originally had and see what I need to change to make Django 1.8 
happy. But if using the atomic() stuff is preferable any tips around that 
would also be appreciated; I can post the errors I'm getting when trying 
things that way as needed.

Appreciate any ideas anyone has. Thanks.

-- 
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/670a0358-3538-4a2f-b5e3-b1c2a33076ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: subprocess behave diferent in the server than in the client.

2015-04-02 Thread dk
found 2 things happening,  some one move the file, second of all the 
subprocess stdout spits a tuple of tuples =( (that was trick thing to find.)
thanks guys.


On Tuesday, March 31, 2015 at 2:03:08 PM UTC-5, JirkaV wrote:

> It's very likely that the actual user running the webserver process(es) 
> does not have "ping" on the executables path...
>
> HTH
>
> Jirka
> --
> *From: * dk > 
> *Sender: * django...@googlegroups.com  
> *Date: *Tue, 31 Mar 2015 08:12:03 -0700 (PDT)
> *To: *>
> *ReplyTo: * django...@googlegroups.com  
> *Subject: *Re: subprocess behave diferent in the server than in the 
> client.
>
> playing a littlie bit more, I found out that does work if I am using the 
> manage.py runserver.
> but doesn't work using the production django =(.
>
>
>
> On Monday, March 30, 2015 at 5:53:59 PM UTC-5, dk wrote:
>
>> hi, I have a button in my webpage that lunch a subprocess and check the 
>> ping of the computer and save the information in a text file. that's it,  
>> very basic stuff.
>>
>> If I am doing my click in the server computer  everything works,
>> the subprocess will ping the computer, make the file and save the 
>> information. 
>> and go back the corresponding view.
>>
>>
>> but if I do it from a client computer,  does all the script,  return the 
>> view that needs to return, but it never lunched the subprocess =(.   is 
>> like that line was commented or something doesn't even complain or spits 
>> errors =(
>>
>> have any one got an issue like this?
>>
>  -- 
> 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/bb43b536-352e-4eb0-b32a-485860d19e13%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/d0d7bd17-f949-4e35-9858-4ca5c5122733%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python Soap

2015-04-02 Thread Nikolas Stevenson-Molnar

Did you switch to using suds-jurko?

_Nik

On 4/2/2015 10:10 AM, nadaei...@gmail.com wrote:

Thanks finally using this but getting web.fault:

from sudsssltransport import SudsClientStrictSSL
c= 
SudsClientStrictSSL('https://10.102.5.81:901/APIService.svc?singleWsdl', 
client_cert='cert.pem', verify_ssl='certificate.pem')

print 'here'
hoho = c.service.Login(clientID=202, 
terminalID='657CBC06-B339-432C-8122-F8DE3DDD15A8', authCred='API-0002')

print hoho



No handlers could be found for logger "suds.client"

Traceback (most recent call last):

  File ".py", line 61, in 

main()

  File ".py", line 52, in main

hoho = c.service.Login()

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 521, in 
__call__


return client.invoke(args, kwargs)

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 581, in invoke

result = self.send(soapenv)

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 621, in send

original_soapenv=original_soapenv)

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 670, in 
process_reply


raise WebFault(fault, replyroot)

suds.WebFault





2015-04-02 16:24 GMT+00:00 Nikolas Stevenson-Molnar 
mailto:nik.mol...@consbio.org>>:


Have a look at this:
https://bitbucket.org/jurko/suds/issue/23/ssl-certificate-verification

_Nik


On 4/2/2015 9:17 AM, nadaei...@gmail.com
 wrote:

i was doing it using this:

import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.DEBUG)
logging.getLogger('suds.transport').setLevel(logging.DEBUG)

c =
Client('https://10.102.5.81:901/APIService.svc?singleWsdl',
transport = HTTPSClientCertTransport('client.pem','server.pem'))

response11 =  c.service.Login()
print response11

2015-04-02 16:09 GMT+00:00 Nikolas Stevenson-Molnar
mailto:nik.mol...@consbio.org>>:

suds-jurko also seems to be actively maintained, so you may
have luck with filing an issue for missing functionality.

_Nik


On 4/2/2015 9:05 AM, James Schneider wrote:


Suds is an old (abandoned) library. suds-jurko is a newer
fork of it, and may handle SSL connections better.

You may need to provide more detail as to what you are
trying to do, as the SSL portion is handled by underlying
libraries in Python, not by suds-jurko directly.

-James

On Apr 2, 2015 8:57 AM, "nadaei...@gmail.com
" mailto:nadaei...@gmail.com>> wrote:

I am already using suds but my issue was using suds with
ssl and client and server certificate

2015-04-02 15:48 GMT+00:00 nadaei...@gmail.com
 mailto:nadaei...@gmail.com>>:

Thanks Nikolas,

Checking will come back to you.

2015-04-02 15:45 GMT+00:00 Nikolas Stevenson-Molnar
mailto:nik.mol...@consbio.org>>:

Take a look at suds-jurko:
https://bitbucket.org/jurko/suds

_Nik


On 4/2/2015 8:05 AM, nadaei...@gmail.com
 wrote:

Hi All,

What is the best library of python to consume
wsdl soap with client certificate pfx and
server certificate cer.

BR


-- 
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/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%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 

Re: "The outermost 'atomic' block cannot use savepoint = False when autocommit is off." error after upgrading to Django 1.8

2015-04-02 Thread Simon Charette
Hi Matt,

I think it would be preferable to use atomic() here.

>From reading the documentation 
 it looks 
like you might already be in a transaction when calling `set_autocommit` 
but it's hard to tell without the full traceback.

What kind of errors do you get from:

def foo(request):
with transaction.atomic():
# ... do stuff involving multiple database actions ...

Note that you should never catch `DatabaseError` within an `atomic()` 
context. You should wrap the context managed block with a try/except 
instead:

*Wrong*
with transaction.atomic():
try:
# Do database stuff possibly raising database errors
except DatabaseError:
pass


*Right*
try:
with transaction.atomic():
# Do database stuff possibly raising database errors
except DatabaseError:
pass

Simon

Le jeudi 2 avril 2015 14:42:26 UTC-4, Matt Woodward a écrit :
>
> Hi all -- I just upgraded one of my projects to Django 1.8 from 1.7.7 and 
> in a view function where we're doing manual transaction management 
> (Postgres) I'm now getting the error in the subject line.
>
> Basic gist of the code involved:
>
> def foo(request):
>   try:
> transaction.set_autocommit(False)
>
> ... do stuff involving multiple database actions ...
>   except (DatabaseError, Exception) as e:
> transaction.rollback()
>
> This worked fine in 1.7.7 so I'm not sure what I need to change to get it 
> working with 1.8.
>
> I did read the docs on the atomic() functionality and took a few runs at 
> that but just wound up with different errors, so I thought I'd start with 
> what I originally had and see what I need to change to make Django 1.8 
> happy. But if using the atomic() stuff is preferable any tips around that 
> would also be appreciated; I can post the errors I'm getting when trying 
> things that way as needed.
>
> Appreciate any ideas anyone has. Thanks.
>

-- 
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/bc17b239-b42c-4c08-80be-8e5309b10eda%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python Soap

2015-04-02 Thread nadaei...@gmail.com
Yes

2015-04-02 19:05 GMT+00:00 Nikolas Stevenson-Molnar 
:

>  Did you switch to using suds-jurko?
>
> _Nik
>
>
> On 4/2/2015 10:10 AM, nadaei...@gmail.com wrote:
>
> Thanks finally using this but getting web.fault:
>
>  from sudsssltransport import SudsClientStrictSSL
> c= SudsClientStrictSSL('
> https://10.102.5.81:901/APIService.svc?singleWsdl',
> client_cert='cert.pem', verify_ssl='certificate.pem')
> print 'here'
> hoho = c.service.Login(clientID=202,
> terminalID='657CBC06-B339-432C-8122-F8DE3DDD15A8', authCred='API-0002')
> print hoho
>
>
>
>  No handlers could be found for logger "suds.client"
>
> Traceback (most recent call last):
>
>   File ".py", line 61, in 
>
> main()
>
>   File ".py", line 52, in main
>
> hoho = c.service.Login()
>
>   File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 521, in
> __call__
>
> return client.invoke(args, kwargs)
>
>   File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 581, in invoke
>
> result = self.send(soapenv)
>
>   File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 621, in send
>
> original_soapenv=original_soapenv)
>
>   File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 670, in
> process_reply
>
> raise WebFault(fault, replyroot)
>
> suds.WebFault
>
>
>
>
>
> 2015-04-02 16:24 GMT+00:00 Nikolas Stevenson-Molnar <
> nik.mol...@consbio.org>:
>
>>  Have a look at this:
>> https://bitbucket.org/jurko/suds/issue/23/ssl-certificate-verification
>>
>> _Nik
>>
>>
>> On 4/2/2015 9:17 AM, nadaei...@gmail.com wrote:
>>
>>  i was doing it using this:
>>
>>  import logging
>>  logging.basicConfig(level=logging.INFO)
>> logging.getLogger('suds.client').setLevel(logging.DEBUG)
>> logging.getLogger('suds.transport').setLevel(logging.DEBUG)
>>
>>  c = Client('https://10.102.5.81:901/APIService.svc?singleWsdl',
>> transport = HTTPSClientCertTransport('client.pem','server.pem'))
>>
>>  response11 =  c.service.Login()
>> print response11
>>
>>
>>
>> 2015-04-02 16:09 GMT+00:00 Nikolas Stevenson-Molnar <
>> nik.mol...@consbio.org>:
>>
>>>  suds-jurko also seems to be actively maintained, so you may have luck
>>> with filing an issue for missing functionality.
>>>
>>> _Nik
>>>
>>>
>>> On 4/2/2015 9:05 AM, James Schneider wrote:
>>>
>>> Suds is an old (abandoned) library. suds-jurko is a newer fork of it,
>>> and may handle SSL connections better.
>>>
>>> You may need to provide more detail as to what you are trying to do, as
>>> the SSL portion is handled by underlying libraries in Python, not by
>>> suds-jurko directly.
>>>
>>> -James
>>> On Apr 2, 2015 8:57 AM, "nadaei...@gmail.com" 
>>> wrote:
>>>
 I am already using suds but my issue was using suds with ssl and client
 and server certificate

 2015-04-02 15:48 GMT+00:00 nadaei...@gmail.com :

> Thanks Nikolas,
>
>  Checking will come back to you.
>
> 2015-04-02 15:45 GMT+00:00 Nikolas Stevenson-Molnar <
> nik.mol...@consbio.org>:
>
>>  Take a look at suds-jurko: https://bitbucket.org/jurko/suds
>>
>> _Nik
>>
>>
>> On 4/2/2015 8:05 AM, nadaei...@gmail.com wrote:
>>
>>  Hi All,
>>
>>  What is the best library of python to consume wsdl soap with client
>> certificate pfx and server certificate cer.
>>
>>  BR
>>
>>
>> --
>> 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/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%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/551D641E.6030109%40consbio.org
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

Re: Python Soap

2015-04-02 Thread Nikolas Stevenson-Molnar
Make sure your previous suds is completely uninstalled. The code in the 
stack trace doesn't seem to fit with the current suds-jurko code. If 
you're still encountering the issue, I'd open an issue on the suds-jurko 
tracker.


_Nik

On 4/2/2015 12:23 PM, nadaei...@gmail.com wrote:

Yes

2015-04-02 19:05 GMT+00:00 Nikolas Stevenson-Molnar 
mailto:nik.mol...@consbio.org>>:


Did you switch to using suds-jurko?

_Nik


On 4/2/2015 10:10 AM, nadaei...@gmail.com
 wrote:

Thanks finally using this but getting web.fault:

from sudsssltransport import SudsClientStrictSSL
c=
SudsClientStrictSSL('https://10.102.5.81:901/APIService.svc?singleWsdl',
client_cert='cert.pem', verify_ssl='certificate.pem')
print 'here'
hoho = c.service.Login(clientID=202,
terminalID='657CBC06-B339-432C-8122-F8DE3DDD15A8',
authCred='API-0002')
print hoho



No handlers could be found for logger "suds.client"

Traceback (most recent call last):

  File ".py", line 61, in 

main()

  File ".py", line 52, in main

hoho = c.service.Login()

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 521,
in __call__

return client.invoke(args, kwargs)

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 581,
in invoke

result = self.send(soapenv)

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 621,
in send

original_soapenv=original_soapenv)

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 670,
in process_reply

raise WebFault(fault, replyroot)

suds.WebFault





2015-04-02 16:24 GMT+00:00 Nikolas Stevenson-Molnar
mailto:nik.mol...@consbio.org>>:

Have a look at this:
https://bitbucket.org/jurko/suds/issue/23/ssl-certificate-verification

_Nik


On 4/2/2015 9:17 AM, nadaei...@gmail.com
 wrote:

i was doing it using this:

import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.DEBUG)
logging.getLogger('suds.transport').setLevel(logging.DEBUG)

c =
Client('https://10.102.5.81:901/APIService.svc?singleWsdl',
transport = HTTPSClientCertTransport('client.pem','server.pem'))

response11 =  c.service.Login()
print response11

2015-04-02 16:09 GMT+00:00 Nikolas Stevenson-Molnar
mailto:nik.mol...@consbio.org>>:

suds-jurko also seems to be actively maintained, so you
may have luck with filing an issue for missing
functionality.

_Nik


On 4/2/2015 9:05 AM, James Schneider wrote:


Suds is an old (abandoned) library. suds-jurko is a
newer fork of it, and may handle SSL connections better.

You may need to provide more detail as to what you are
trying to do, as the SSL portion is handled by
underlying libraries in Python, not by suds-jurko directly.

-James

On Apr 2, 2015 8:57 AM, "nadaei...@gmail.com
" mailto:nadaei...@gmail.com>> wrote:

I am already using suds but my issue was using suds
with ssl and client and server certificate

2015-04-02 15:48 GMT+00:00 nadaei...@gmail.com
 mailto:nadaei...@gmail.com>>:

Thanks Nikolas,

Checking will come back to you.

2015-04-02 15:45 GMT+00:00 Nikolas
Stevenson-Molnar mailto:nik.mol...@consbio.org>>:

Take a look at suds-jurko:
https://bitbucket.org/jurko/suds

_Nik


On 4/2/2015 8:05 AM, nadaei...@gmail.com
 wrote:

Hi All,

What is the best library of python to
consume wsdl soap with client certificate
pfx and server certificate cer.

BR


-- 
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
.
 

Re: Python Soap

2015-04-02 Thread nadaei...@gmail.com
Thanks i think it is working issue with the server API keep you updated.

BR

2015-04-02 20:27 GMT+00:00 Nikolas Stevenson-Molnar 
:

>  Make sure your previous suds is completely uninstalled. The code in the
> stack trace doesn't seem to fit with the current suds-jurko code. If you're
> still encountering the issue, I'd open an issue on the suds-jurko tracker.
>
> _Nik
>
>
> On 4/2/2015 12:23 PM, nadaei...@gmail.com wrote:
>
> Yes
>
> 2015-04-02 19:05 GMT+00:00 Nikolas Stevenson-Molnar <
> nik.mol...@consbio.org>:
>
>>  Did you switch to using suds-jurko?
>>
>> _Nik
>>
>>
>> On 4/2/2015 10:10 AM, nadaei...@gmail.com wrote:
>>
>>  Thanks finally using this but getting web.fault:
>>
>>  from sudsssltransport import SudsClientStrictSSL
>> c= SudsClientStrictSSL('
>> https://10.102.5.81:901/APIService.svc?singleWsdl',
>> client_cert='cert.pem', verify_ssl='certificate.pem')
>> print 'here'
>> hoho = c.service.Login(clientID=202,
>> terminalID='657CBC06-B339-432C-8122-F8DE3DDD15A8', authCred='API-0002')
>> print hoho
>>
>>
>>
>>  No handlers could be found for logger "suds.client"
>>
>> Traceback (most recent call last):
>>
>>   File ".py", line 61, in 
>>
>> main()
>>
>>   File ".py", line 52, in main
>>
>> hoho = c.service.Login()
>>
>>   File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 521, in
>> __call__
>>
>> return client.invoke(args, kwargs)
>>
>>   File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 581, in invoke
>>
>> result = self.send(soapenv)
>>
>>   File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 621, in send
>>
>> original_soapenv=original_soapenv)
>>
>>   File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 670, in
>> process_reply
>>
>> raise WebFault(fault, replyroot)
>>
>> suds.WebFault
>>
>>
>>
>>
>>
>> 2015-04-02 16:24 GMT+00:00 Nikolas Stevenson-Molnar <
>> nik.mol...@consbio.org>:
>>
>>>  Have a look at this:
>>> https://bitbucket.org/jurko/suds/issue/23/ssl-certificate-verification
>>>
>>> _Nik
>>>
>>>
>>> On 4/2/2015 9:17 AM, nadaei...@gmail.com wrote:
>>>
>>>  i was doing it using this:
>>>
>>>  import logging
>>>  logging.basicConfig(level=logging.INFO)
>>> logging.getLogger('suds.client').setLevel(logging.DEBUG)
>>> logging.getLogger('suds.transport').setLevel(logging.DEBUG)
>>>
>>>  c = Client('https://10.102.5.81:901/APIService.svc?singleWsdl',
>>> transport = HTTPSClientCertTransport('client.pem','server.pem'))
>>>
>>>  response11 =  c.service.Login()
>>> print response11
>>>
>>>
>>>
>>> 2015-04-02 16:09 GMT+00:00 Nikolas Stevenson-Molnar <
>>> nik.mol...@consbio.org>:
>>>
  suds-jurko also seems to be actively maintained, so you may have luck
 with filing an issue for missing functionality.

 _Nik


 On 4/2/2015 9:05 AM, James Schneider wrote:

 Suds is an old (abandoned) library. suds-jurko is a newer fork of it,
 and may handle SSL connections better.

 You may need to provide more detail as to what you are trying to do, as
 the SSL portion is handled by underlying libraries in Python, not by
 suds-jurko directly.

 -James
 On Apr 2, 2015 8:57 AM, "nadaei...@gmail.com" 
 wrote:

> I am already using suds but my issue was using suds with ssl and
> client and server certificate
>
> 2015-04-02 15:48 GMT+00:00 nadaei...@gmail.com :
>
>> Thanks Nikolas,
>>
>>  Checking will come back to you.
>>
>> 2015-04-02 15:45 GMT+00:00 Nikolas Stevenson-Molnar <
>> nik.mol...@consbio.org>:
>>
>>>  Take a look at suds-jurko: https://bitbucket.org/jurko/suds
>>>
>>> _Nik
>>>
>>>
>>> On 4/2/2015 8:05 AM, nadaei...@gmail.com wrote:
>>>
>>>  Hi All,
>>>
>>>  What is the best library of python to consume wsdl soap with
>>> client certificate pfx and server certificate cer.
>>>
>>>  BR
>>>
>>>
>>> --
>>> 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/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%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 f

Re: best way to pass options to django views?

2015-04-02 Thread Ilya Kazakevich
This tutorial is about client-side (JavaScript) while Python/Django is 
server side:)

What are you trying to do? Pass all options from HTML page to server side? 
What for?
In most cases you want to pass the option selected by user to server. You 
must first read about HTML forms and how to submit them, and then read 
Django Forms tutorial: https://docs.djangoproject.com/en/1.8/topics/forms/



On Thursday, April 2, 2015 at 9:35:39 PM UTC+3, dk wrote:
>
> I have a option section in my webpage just display the names of some 
> machines
>
> doing this tutorial I was able to get all the lines that appear in the 
> "option" tag of my html.
> http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_select_options
> and I can get a big string that I can separate by comas.
>
> I was going to put that big long string as the last part of the url and 
> use it with a get method such:
>
> url:   mywebsite/myapp/?options=txt
>
> def profile_page(request):
> options = request.GET.get("options", "")
> #here parse the options string
>  
> is this something recommended? or is a better smarter way?
> thanks =)
>
>
>

-- 
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/3d54b2c7-2423-473d-90f2-da47df4ccfb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Saving Contionus Data through Django

2015-04-02 Thread Mike Dewhirst

On 3/04/2015 12:14 AM, nitinagarwal...@gmail.com wrote:

Hello All

I am new to Django. And, I need help in models file.
I made a table - device_list. It contain one filed as device_id.
Now, I need to store 3 continuous data stream which is coming like 1
entry per minute each for this device_id.
All 3 data streams will have different timestamps and that also needs to
be stored.

So, what is the best way to store the stream ?


Ok - so each device has three datastreams. You need to decide whether 
the data in each stream should be stored in a single table or perhaps in 
two or three tables. Without knowing what you want to store it isn't 
possible to advise you.


Anyway, each datastream model needs to have a foreign-key into the 
device_list model. To record the time you include a field of class 
models.DateTimeField with an auto_now_add=True option which puts the 
current date/time into that field. 
https://docs.djangoproject.com/en/1.8/ref/models/fields/#datetimefield


By the way, it would be more conventional to name that model (ie., 
table) device rather than device_list.


If you are new to Django, the best advice usually given is to work 
through the tutorial. That will show you how to establish foreign key 
relationships between models.


I think Django is fantastic and I hope you enjoy.

Mike






--
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/820ad2ed-7163-4fdd-adf0-5e50a12308fb%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/551E1783.3040209%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: Using Unicode in django

2015-04-02 Thread Mike Dewhirst

On 3/04/2015 12:01 AM, temiloluwa adesina wrote:

Hello
I just joined this group and i have problems with representing multiple
fields in admin using __unicode__, when i try to call this data it
returns just one of them:

|
classCrop(models.Model):
 name =models.CharField(max_length=30)
 importance =models.TextField()
 cultivation =models.TextField()
def__unicode__(self):
returnu'%s %s %s'%(self.name,self.importance,self.cultivation)
|



but rather than returning just the data in the importance field, it
returns all the data in each separate field together.


That __unicode__() return value is a concatenation of the three named 
fields and I assume that is what you want. When the object is returned 
its name is mentioned first (Yam) followed by a space followed by 
whatever data is in the importance field followed by a space then 
cultivation


Your screenshot seems to be showing that.

If all you want is the importance info, just make __unicode__() return 
that and nothing else.


Whatever is returned by __unicode__ is the object's identification.

You seem to have a good handle on that so I suspect I haven't understood 
your question.


Mike



Pls i would appreciate anyone's assistance.

--
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/504bf928-7259-4d17-994c-115e98a78a4b%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/551E1CD3.7000906%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.