Re: ManyToMany field creation problem

2013-12-09 Thread Mrinmoy Das

Hi,

Sorry Daniel for bothering, my understanding of many to many field was 
pretty shaky :)

On Monday, December 9, 2013 5:02:13 PM UTC+5:30, Tom Evans wrote:
>
> On Fri, Dec 6, 2013 at 9:42 AM, Mrinmoy Das 
>  
> wrote: 
> > I cant get the field 
> > 
> > 
> > unit_price = models.ManyToManyField(UnitType,through=UnitPrice, 
> blank=True, 
> > null=True) 
> > 
> > in Property table. 
> > 
> > After adding the field, I tried doing a schemamigration, but output says 
> > "No change has been done" 
> > 
>
> This is because adding that field results in no change - no columns 
> need to be added to any tables, no columns need to be removed from any 
> tables and no tables need to be created. 
>
> Adding the unit_price field to Property simply informs Django to 
> create the appropriate properties on the python models so that you can 
> access the related models, and so South, being a tool for managing 
> database schema changes, has nothing to do. 
>
> Cheers 
>
> Tom 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/92ef6686-d643-4a23-8edb-8c7727f7b6c4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Looking for a job as a junior django developer or internship (remote)

2013-12-09 Thread Mrinmoy Das
Hi,

Looking for a job or internship opportunities as a junior django developer 
(remote).

I have about 5months of experience on working with django (
http://goromlagche.in/resume#experience).

My mail id is mrinmoy.da...@gmail.com.

Regards
Mrinmoy Das
http://goromlagche.in/

-- 
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/4cd07786-b7ef-4f01-9b61-a26eacd915f4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django for in-house data

2013-12-09 Thread Lachlan Musicman
On 10 December 2013 00:23,   wrote:
> What I'm trying to understand now is it's possible with little effort to
> build views which mostly behave as the admin interface would, doing some
> customization on specific points where needed.
>
> For example, the paged views offered by the admin interface is something I
> would prefer not to code from scratch in the views.


You are looking for "Class Based Views". No more effort than setting
up the admin but without the deep power at an early stage.

You build the models and CBVs abstract away most of the heavy lifting

see
https://docs.djangoproject.com/en/dev/topics/class-based-views/
http://ccbv.co.uk/

Cheers
L.



-- 
>From this perspective it is natural that anarchism be marked by
spontaneity, differentiation, and experimentation that it be marked by
an expressed affinity with chaos, if chaos is understood to be what
lies outside or beyond the dominant game or system. Because of the
resistance to definition and categorisation, the anarchist principle
has been variously interpreted as, rather than an articulated
position, “a moral attitude, an emotional climate, or even a mood”.
This mood hangs in dramatic tension between utopian hope or dystopian
nihilism...
-
http://zuihitsu.org/godspeed-you-black-emperor-and-the-politics-of-chaos

-- 
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/CAGBeqiMFiPu_zd5FzMgURBq2TjznSfF7qYVTTmwJ%3DTsKvk%3DJ9g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django for in-house data

2013-12-09 Thread Mike Dewhirst

On 10/12/2013 12:23am, giuliano.bertole...@gmail.com wrote:

the database is built from scratch, so I can use whatever I wish.
Currently I'm performing some tests with SQLite, but plan to migrate to
MySQL for production.
The project is building a basic CRM with a few tweaks for managing
specific business types.
I'm new to Django and Web frameworks in general, but have decent
experience in Python.


One of the major benefits of Django is the number of apps available to 
save you the (most) of the work of doing it yourself. Look here ...


https://www.djangopackages.com/


What I'm trying to understand now is it's possible with little effort to
build views which mostly behave as the admin interface would, doing some
customization on specific points where needed.
For example, the paged views offered by the admin interface is something
I would prefer not to code from scratch in the views.
But I've not finished to read the whole documentation yet, so it's
possible that I'm simply asking trivial questions (sorry).
Giuliano.

On Monday, December 9, 2013 12:17:05 PM UTC+1, Robin St.Clair wrote:

You haven't said what DB product you are connecting to.

However, why don't you use a tool that is designed to allow end
users as
well as syrems folk to interact with data - check out Pentaho - BI and
DI applications and dashboards, reports etc. There is an open source
version. You can implement security, if required.

Letting end users directly access the DB is quite wrong, especially if
the DB is complex. In the latter case, many of the reports created will
be wrong, and decisions will be made on misleading data.

Robin St.Clair


On 09/12/2013 09:01, Lachlan Musicman wrote:
 > On 9 December 2013 19:17, Mike Dewhirst  wrote:
 >> On 9/12/2013 8:14am, Lachlan Musicman wrote:
 >>> To be fair, I think the best measure is the technical literacy
of your
 >>> users. The Admin interface is powerful, but they could also
 >>> accidentally screw everything up.
 >>
 >> Your point about technical literacy bears thinking about.
Wouldn't you say
 >> all users can screw things up whether they are technically
literate or not?
 > Of course - I've even done it myself. But some users are more likely
 > to than others. More importantly, they are usually less able to
 > articulate exactly what it was they did to enact the data loss.
 >
 >
 >
 > Cheers
 > L.
 >
 >
 >

--
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/d2e08f16-0a92-4c40-a398-c5ea7fac9dce%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


--
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/52A63060.4050604%40dewhirst.com.au.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I test my Django App on my Phone

2013-12-09 Thread Juan Pablo Romero Bernal
Hi,

> I suggest setting up a  URL using  no-ip.org or similar service.
>  No-ip.org is free at this level and works great, at least on Ubuntu and
> CentOS.  I haven't tried other OS's.
>

Or you can use localtunnel (http://progrium.com/localtunnel/) it's easy to
install and works
fine on most *NIX.

-- 
Juan

-- 
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/CAJK1Jg1XHcgYjzW6-1w%3DqUnJtVn1US9vAWLUiVABHd5nbH_Z4A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I test my Django App on my Phone

2013-12-09 Thread Tim Chase
On 2013-12-09 17:28, Timothy W. Cook wrote:
> I suggest setting up a  URL using  no-ip.org or similar service.
> No-ip.org is free at this level and works great, at least on Ubuntu
> and CentOS.  I haven't tried other OS's.

This Tim agrees with that Tim. :-)

It's one thing to go through finding your IP address once, then test
a bunch before the ISP changes it out from under you, and then be
done (or come back and do it again in a couple months).  But if
you plan to do do it regularly over a long period of time, it is nice
to have an agent keep that information up-to-date for you with a
company like NoIP.  It has the added benefit that I also route my
external port 22 to internal port 22, so I can ssh to my home machine
via an easily-remembered URL rather than by an IP address that can
change out from under me.

-tkc


-- 
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/20131209140137.15a2cd7b%40bigbox.christie.dr.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I test my Django App on my Phone

2013-12-09 Thread Timothy W. Cook
Tim Chase's answer works well for a now and then test.  But many static IPs
change every 24 hours or so.  Plus you will probably want to do this many
more times in the future as well as ask others to test it on various
devices. .

I suggest setting up a  URL using  no-ip.org or similar service.  No-ip.org
is free at this level and works great, at least on Ubuntu and CentOS.  I
haven't tried other OS's.

HTH,
Tim



On Mon, Dec 9, 2013 at 5:08 PM, Tim Chase wrote:

> On 2013-12-09 10:44, Muhammad Ali wrote:
> > Instructions I found online (such as this one: ) say that I should
> > plug the phone to the computer through a USB and run: manage.py
> > runser 0.0.0.0:8000 and visit this IP address via my phone's
> > browser. But it doesn't work and instead returns an error:
> >
> > "Oops! Google Chrome could not connect to 0.0.0.0:8000"
>
> The "runserver 0.0.0.0:8000" tells Django to listen on all interfaces
> you have.  You'd have to determine the IP address of your server
> (well, dev machine).  Usually you can get this from the output of
> "ifconfig -a" (or "ipconfig /all" on Win32).  It will usually return
> something like 192.168.x.y
>
> Depending on how you're tethered, you want to point your phone to
> that address:
>
>   http://192.168.3.14:8000/
>
> Some tethering forces the phone to appear outside your network,
> preventing it from seeing the private/internal 192.168.x.y
> addresses.  This complicates matters, as you'd have to adjust your
> router/NAT to open port 8000 (or port 80 for that matter) and point
> it at your box internally.  You'd then have to visit your site via
> your external IP address.  So you it might look something like
>
>   phone
>|
>v
>   internet
>|
>v
>   router 123.45.67.89
>|
>| configure router NAT to listen on 80
>|   and forward internally
>|   to 192.168.x.y on port 8000
>v
>   computer 192.168.x.y listening on port 8000
>
> You can find your external IP address by just googling for it:
>
>   https://www.google.com/search?q=my+IP+address
>
> which includes the answer before the other actual search results.
> Once you have that external address, you can use
>
>   http://123.45.67.89/
>
> to access it (note that if you forward 8000-to-8000 instead of
> 80-to-8000, you'd have to specify the port as :8000 in the URL)
>
> -tkc
>
>
>
> --
> 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/20131209130815.323c8fd8%40bigbox.christie.dr
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
MLHIM VIP Signup: http://goo.gl/22B0U

Timothy Cook, MSc   +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

-- 
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%2B%3DOU3XHtgPfxtekctdCMUKive2-4u1HBahxcWvUgZWtJQfHsg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I test my Django App on my Phone

2013-12-09 Thread Tim Chase
On 2013-12-09 10:44, Muhammad Ali wrote:
> Instructions I found online (such as this one: ) say that I should
> plug the phone to the computer through a USB and run: manage.py
> runser 0.0.0.0:8000 and visit this IP address via my phone's
> browser. But it doesn't work and instead returns an error:
> 
> "Oops! Google Chrome could not connect to 0.0.0.0:8000" 

The "runserver 0.0.0.0:8000" tells Django to listen on all interfaces
you have.  You'd have to determine the IP address of your server
(well, dev machine).  Usually you can get this from the output of
"ifconfig -a" (or "ipconfig /all" on Win32).  It will usually return
something like 192.168.x.y 

Depending on how you're tethered, you want to point your phone to
that address:

  http://192.168.3.14:8000/

Some tethering forces the phone to appear outside your network,
preventing it from seeing the private/internal 192.168.x.y
addresses.  This complicates matters, as you'd have to adjust your
router/NAT to open port 8000 (or port 80 for that matter) and point
it at your box internally.  You'd then have to visit your site via
your external IP address.  So you it might look something like

  phone
   |
   v
  internet
   |
   v
  router 123.45.67.89
   |
   | configure router NAT to listen on 80
   |   and forward internally
   |   to 192.168.x.y on port 8000
   v
  computer 192.168.x.y listening on port 8000

You can find your external IP address by just googling for it:

  https://www.google.com/search?q=my+IP+address

which includes the answer before the other actual search results.
Once you have that external address, you can use

  http://123.45.67.89/

to access it (note that if you forward 8000-to-8000 instead of
80-to-8000, you'd have to specify the port as :8000 in the URL)

-tkc



-- 
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/20131209130815.323c8fd8%40bigbox.christie.dr.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I test my Django App on my Phone

2013-12-09 Thread Juan Pablo Romero Bernal
Hi,

Your phone must be connected to the same network that your workstation is
connected. So, the django app must running listening on local IP address
like 192.168.1.2:8000 and from phone you can access the application using
this IP.

Hope this helps,



On Mon, Dec 9, 2013 at 1:44 PM, Muhammad Ali  wrote:

> Hello,
>
> I'm developing a Django-powered blog, with two versions: a desktop version
> and a mobile I optimized version for when it is accessed through a mobile
> device.
>
> Now, I'm trying to test it on my Samsung phone to see how it would look
> and act like when someone uses it through a mobile phone's browser [iPhone,
> Android, etc.]
>
> Instructions I found online (such as this one: ) say that I should plug
> the phone to the computer through a USB and run: manage.py runser
> 0.0.0.0:8000 and visit this IP address via my phone's browser. But it
> doesn't work and instead returns an error:
>
> "Oops! Google Chrome could not connect to 0.0.0.0:8000"
>
> What am I missing in the setup? What are other, if any, alternative ways
> of testing my Django app on my phone during development?
>
> Thank you for your time and help.
>
> Sincerely,
> Muhammad
>
> --
> 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/47bac303-2b53-4f9d-bd93-acbc1d4f1b09%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Juan

-- 
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/CAJK1Jg3bprjLA304UwGMRsdS-TfXHgQ2XRgtYkiGj0xb1Z6Cww%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How do I test my Django App on my Phone

2013-12-09 Thread Nick Santos
I'm not familiar with the method you mentioned - and don't think it should
work unless you establish a network connection through your USB connection,
amongst other things. In a basic sense, 0.0.0.0 is nonroutable if you try
to access it externally. That runserver command, if I remember correctly,
uses 0.0.0.0 to bind to all of your computer's IP addresses (so you can
access it externally). A simpler way than trying to network over USB would
be to connect your phone to the the same network (via wifi, unless that's
not an option), and open port 8000 to your development machine in its
firewall. Then determine that machine's public IP address (eg 1.2.3.4) and
enter that into your browser as 1.2.3.4:8000. Then it should come up on
your phone.
-Nick 



On Mon, Dec 9, 2013 at 10:44 AM, Muhammad Ali  wrote:

> Hello,
>
> I'm developing a Django-powered blog, with two versions: a desktop version
> and a mobile I optimized version for when it is accessed through a mobile
> device.
>
> Now, I'm trying to test it on my Samsung phone to see how it would look
> and act like when someone uses it through a mobile phone's browser [iPhone,
> Android, etc.]
>
> Instructions I found online (such as this one: ) say that I should plug
> the phone to the computer through a USB and run: manage.py runser
> 0.0.0.0:8000 and visit this IP address via my phone's browser. But it
> doesn't work and instead returns an error:
>
> "Oops! Google Chrome could not connect to 0.0.0.0:8000"
>
> What am I missing in the setup? What are other, if any, alternative ways
> of testing my Django app on my phone during development?
>
> Thank you for your time and help.
>
> Sincerely,
> Muhammad
>
> --
> 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/47bac303-2b53-4f9d-bd93-acbc1d4f1b09%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/CAM1S3vCsYr-kO2Cz4FSGiVs-JX3LA5XBeV090EqiRd%2BmrVV1sw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


How do I test my Django App on my Phone

2013-12-09 Thread Muhammad Ali
Hello,

I'm developing a Django-powered blog, with two versions: a desktop version and 
a mobile I optimized version for when it is accessed through a mobile device.

Now, I'm trying to test it on my Samsung phone to see how it would look and act 
like when someone uses it through a mobile phone's browser [iPhone, Android, 
etc.]

Instructions I found online (such as this one: ) say that I should plug the 
phone to the computer through a USB and run: manage.py runser 0.0.0.0:8000 and 
visit this IP address via my phone's browser. But it doesn't work and instead 
returns an error:

"Oops! Google Chrome could not connect to 0.0.0.0:8000" 

What am I missing in the setup? What are other, if any, alternative ways of 
testing my Django app on my phone during development?

Thank you for your time and help.

Sincerely,
Muhammad

-- 
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/47bac303-2b53-4f9d-bd93-acbc1d4f1b09%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: I have a problem with wizard.

2013-12-09 Thread Olga Burdonova
More information from pdb...

> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/views.py(60)current()
-> return self._wizard.storage.current_step or self.first
(Pdb) self._wizard.storage.current_step
u'0'
(Pdb) self.first
u'0'
(Pdb) n
--Return--
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/views.py(60)current()->u'0'
-> return self._wizard.storage.current_step or self.first
(Pdb) n
--Call--
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/views.py(403)process_step()
-> def process_step(self, form):
(Pdb) n
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/views.py(408)process_step()
-> return self.get_form_step_data(form)
(Pdb) n
--Return--
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/views.py(408)process_step()->
-> return self.get_form_step_data(form)
(Pdb) n
--Call--
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/storage/base.py(55)set_step_data()
-> def set_step_data(self, step, cleaned_data):
(Pdb) n
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/storage/base.py(62)set_step_data()
-> if isinstance(cleaned_data, MultiValueDict):
(Pdb) n
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/storage/base.py(63)set_step_data()
-> cleaned_data = dict(cleaned_data.lists())
(Pdb) n
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/storage/base.py(64)set_step_data()
-> self.data[self.step_data_key][step] = cleaned_data
(Pdb) s
--Call--
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/storage/session.py(11)_get_data()
-> def _get_data(self):
(Pdb) n
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/storage/session.py(12)_get_data()
-> self.request.session.modified = True
(Pdb) n
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/storage/session.py(13)_get_data()
-> return self.request.session[self.prefix]
(Pdb) n
--Return--
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/storage/session.py(13)_get_data()->{'extra_data':
 
{}, 'step': u'0', 'step_data': {}, 'step_files': {}}
-> return self.request.session[self.prefix]
(Pdb) n
--Return--
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/storage/base.py(64)set_step_data()->None
-> self.data[self.step_data_key][step] = cleaned_data
(Pdb) n
> 
/usr/local/lib/python2.7/dist-packages/django/contrib/formtools/wizard/views.py(285)post()
-> self.storage.set_step_files(self.steps.current, 
self.process_step_files(form))

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a888a914-b7f1-4ab4-9e35-8d93a0bb09f4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Does not generate the password hash my User

2013-12-09 Thread Ricardo Kamada
Thanks for the reply Jérôme.
Know what it says but said if I just edit the save of the form () i lose
the login form because the save () the model User.objects.create_user
(self.email, self.email, self.password)

Ricardo

Ricardo


2013/12/9 Jérôme Thiard 

> The problem is  that you have a `password` field in your `Cliente` model.
> So the `ClienteForm` save the readable value of the password in the Cliente
> model.
>
> You should not have this field in the model. Instead override the save
> method of your `ClientForm` to create the user in the form and not in the
> model.
> That way the password will be stored only hashed, and only in the User
> model.
>
> cheers,
>
> Jérôme
>
>
> 2013/12/6 Ricardo 
>
>> Ok
>>
>>
>> Em quinta-feira, 5 de dezembro de 2013 17h54min44s UTC-2, Ricardo
>> escreveu:
>>
>>> I have a model "Cliente" and in it a field "password".
>>> In forms.py file, I am using ModelForm, but put in the password field
>>> Password = forms.CharField (widget = forms.PasswordInput (render_value =
>>> True))
>>> It turns out that the admin password field appears readable, and I do
>>> not want that to happen.
>>> I tried to put in set_password. Models but did not succeed.
>>> Now if I put in the admin:
>>> form = FormCliente
>>> Displays the password field and confirm password type password.
>>> But I will not so I want to appear only the password hash.
>>>
>>> http://pastebin.com/AQnWR0W3
>>> in line 19 does not generate the password hash, but the readable password
>>>
>>> Ricardo
>>>
>>  --
>> 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/61ead39c-3c6c-437d-815b-37944df833b2%40googlegroups.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> 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/S5dUX4OXkJo/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/CAOLVUFf9dJOS6b_uwaurTfwfZeydAUt6px6sOVDD%3D8SPv9WdtQ%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/CAJTdXTE%2BXetVe%2BOLo7QaEDHQx%3DRC9wVFPR%2BpnhD-DO_%2BLNPVuA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


itens vindo vazio

2013-12-09 Thread fabricio
I'm with this code  in views


form_pedido = PedidoForm(request.POST, instance=v_pedido)
formset_itens = ItensInlineFormSet(request.POST, request.FILES, 
instance=v_pedido)

if form_pedido.is_valid() and formset_itens.is_valid():


pedido = form_pedido.save(commit=False)
itens_pedido = formset_itens.save(commit=False)



v_vlrtotal = 0
for i in itens_pedido :
i.vlr_total = i.qtde * i.vlr_unit
v_vlrtotal += i.vlr_total


and when I arrive at is that being itens_pedido is empty

  formset_itens = ItensInlineFormSet (request.POST, request.FILES, instance 
= v_pedido)


  formset_itens contains items can someone help me




-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an 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/72aa1b16-2fe8-4cba-a05f-d2a57dd3cde2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


I have a problem with wizard.

2013-12-09 Thread Olga Burdonova
I have a problem with wizard, no data from previous forms is stored in
session backend ...
What's exactly the problem I do not understand, but as a function called

"def set_step_data(data):   self.data[self.step_data_key][step] =
cleaned_data"

nothing is stored...

then via pdb I see that _get_data(self):  called instead of _set_data(self,
value):

What could be the problem of such behavior?

Backend session is configured ... and I see certain things of wizard
database contains ...

for instance:

{'_auth_user_backend':
'allauth.account.auth_backends.AuthenticationBackend',
'wizard_order_wizard': {'step_files': {u'0': {}}, 'step': u'1',
'extra_data': {}, 'step_data': {u'0': {u'csrfmiddlewaretoken':
[u'xC8H5GMNDe79iC3jkYAQZUy3E11RhnDK'], u'0-number_of_credits': [u'1'],
u'order_wizard-current_step': [u'0']}}}, '_auth_user_id': 1}

but not all steps stored ..

I've tried

SESSION_SAVE_EVERY_REQUEST = True

no results... (very strange behavior..)

What am I doing wrong?

Obviously "done" is not called and wizard stops in render_done

(Pdb) print self.storage.get_step_data(form_key)
None

(Pdb) form_obj.is_valid()
False

return self.render_revalidation_failure(form_key, form_obj, **kwargs)

Does anyone have any idea about this problem?

-- 
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/CAEKo5h81s1KJmr0zmRi6EMnTEj5txCmiZtuxeHXi%3Ds87bLiOVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django for in-house data

2013-12-09 Thread giuliano . bertoletti
 
the database is built from scratch, so I can use whatever I wish. Currently 
I'm performing some tests with SQLite, but plan to migrate to MySQL for 
production.
 
The project is building a basic CRM with a few tweaks for managing specific 
business types.
 
I'm new to Django and Web frameworks in general, but have decent 
experience in Python.
 
What I'm trying to understand now is it's possible with little effort to 
build views which mostly behave as the admin interface would, doing some 
customization on specific points where needed.
 
For example, the paged views offered by the admin interface is something I 
would prefer not to code from scratch in the views.
But I've not finished to read the whole documentation yet, so it's possible 
that I'm simply asking trivial questions (sorry). 
 
 
Giuliano.
 
 
 
 
 

On Monday, December 9, 2013 12:17:05 PM UTC+1, Robin St.Clair wrote:

> You haven't said what DB product you are connecting to. 
>
> However, why don't you use a tool that is designed to allow end users as 
> well as syrems folk to interact with data - check out Pentaho - BI and 
> DI applications and dashboards, reports etc. There is an open source 
> version. You can implement security, if required. 
>
> Letting end users directly access the DB is quite wrong, especially if 
> the DB is complex. In the latter case, many of the reports created will 
> be wrong, and decisions will be made on misleading data. 
>
> Robin St.Clair 
>
>
> On 09/12/2013 09:01, Lachlan Musicman wrote: 
> > On 9 December 2013 19:17, Mike Dewhirst 
> >  
> wrote: 
> >> On 9/12/2013 8:14am, Lachlan Musicman wrote: 
> >>> To be fair, I think the best measure is the technical literacy of your 
> >>> users. The Admin interface is powerful, but they could also 
> >>> accidentally screw everything up. 
> >> 
> >> Your point about technical literacy bears thinking about. Wouldn't you 
> say 
> >> all users can screw things up whether they are technically literate or 
> not? 
> > Of course - I've even done it myself. But some users are more likely 
> > to than others. More importantly, they are usually less able to 
> > articulate exactly what it was they did to enact the data loss. 
> > 
> > 
> > 
> > Cheers 
> > L. 
> > 
> > 
> > 
>
>

-- 
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/d2e08f16-0a92-4c40-a398-c5ea7fac9dce%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Does not generate the password hash my User

2013-12-09 Thread Jérôme Thiard
The problem is  that you have a `password` field in your `Cliente` model.
So the `ClienteForm` save the readable value of the password in the Cliente
model.

You should not have this field in the model. Instead override the save
method of your `ClientForm` to create the user in the form and not in the
model.
That way the password will be stored only hashed, and only in the User
model.

cheers,

Jérôme


2013/12/6 Ricardo 

> Ok
>
>
> Em quinta-feira, 5 de dezembro de 2013 17h54min44s UTC-2, Ricardo escreveu:
>
>> I have a model "Cliente" and in it a field "password".
>> In forms.py file, I am using ModelForm, but put in the password field
>> Password = forms.CharField (widget = forms.PasswordInput (render_value =
>> True))
>> It turns out that the admin password field appears readable, and I do not
>> want that to happen.
>> I tried to put in set_password. Models but did not succeed.
>> Now if I put in the admin:
>> form = FormCliente
>> Displays the password field and confirm password type password.
>> But I will not so I want to appear only the password hash.
>>
>> http://pastebin.com/AQnWR0W3
>> in line 19 does not generate the password hash, but the readable password
>>
>> Ricardo
>>
>  --
> 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/61ead39c-3c6c-437d-815b-37944df833b2%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/CAOLVUFf9dJOS6b_uwaurTfwfZeydAUt6px6sOVDD%3D8SPv9WdtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How is /admin/jsi18n/ created

2013-12-09 Thread Tom Evans
On Thu, Dec 5, 2013 at 4:05 PM, Vincent Hussey  wrote:
> Hi,
> We are looking at date formats for django and we are trying to figure out
> how django creates the localised formats found at the link below.
>
> After a bit of investigation we have found out how to set them using
> DATE_FORMAT, TIME_FORMAT etc. settings in settings.py, but we'd
>  like to figure out how this url is generated - it looks like a dynamically
> created link based on
> django/conf/global_settings.py, modified by
> django/conf/locale/xx/formats.py, but we are struggling to figure out the
> exact mechanism.
>
> 
>
> Thanks
> Vincent

https://docs.djangoproject.com/en/1.6/topics/i18n/translation/#internationalization-in-javascript-code

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1%2BzkfQLW_1k8uWcLYL1gJRhnDy40fjGRUDpXrSQems%2BZA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ManyToMany field creation problem

2013-12-09 Thread Tom Evans
On Fri, Dec 6, 2013 at 9:42 AM, Mrinmoy Das  wrote:
> I cant get the field
>
>
> unit_price = models.ManyToManyField(UnitType,through=UnitPrice, blank=True,
> null=True)
>
> in Property table.
>
> After adding the field, I tried doing a schemamigration, but output says
> "No change has been done"
>

This is because adding that field results in no change - no columns
need to be added to any tables, no columns need to be removed from any
tables and no tables need to be created.

Adding the unit_price field to Property simply informs Django to
create the appropriate properties on the python models so that you can
access the related models, and so South, being a tool for managing
database schema changes, has nothing to do.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1L4WqfCmhEZK4%2BqGVAbNOFdkfqqXqJ3HOqA567d1sRqxA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Why does the startproject command open a file instead of creating project folders

2013-12-09 Thread Tom Evans
On Sun, Dec 8, 2013 at 8:02 PM, Gideon Bar  wrote:
>
> Hello
>
>
> I am new to Django and followed this tutorial 
> https://docs.djangoproject.com/en/1.6/ref/django-admin/#django-admin-startproject
>
> I am using windows 7 64 bit and the startproject command on open a file 
> instead of creating project folders
>
> How can I create a project from the command line?
>

django-admin.py is a python file. Under windows, what happens when you
run a file is determined by it's extension, and on your system python
files have been configured to open in a text editor when "run",
instead of being run by the python interpreter.

You can either change this so that windows instead runs the python
interpreter, or you can explicitly run python, passing the full path
to the django-admin.py script as the first argument.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1LRH%3DGk_a4Eg9F%3DsamovQWuJV08A8eDgTygLPj5fdUEGA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django for in-house data

2013-12-09 Thread Robin

You haven't said what DB product you are connecting to.

However, why don't you use a tool that is designed to allow end users as 
well as syrems folk to interact with data - check out Pentaho - BI and 
DI applications and dashboards, reports etc. There is an open source 
version. You can implement security, if required.


Letting end users directly access the DB is quite wrong, especially if 
the DB is complex. In the latter case, many of the reports created will 
be wrong, and decisions will be made on misleading data.


Robin St.Clair


On 09/12/2013 09:01, Lachlan Musicman wrote:

On 9 December 2013 19:17, Mike Dewhirst  wrote:

On 9/12/2013 8:14am, Lachlan Musicman wrote:

To be fair, I think the best measure is the technical literacy of your
users. The Admin interface is powerful, but they could also
accidentally screw everything up.


Your point about technical literacy bears thinking about. Wouldn't you say
all users can screw things up whether they are technically literate or not?

Of course - I've even done it myself. But some users are more likely
to than others. More importantly, they are usually less able to
articulate exactly what it was they did to enact the data loss.



Cheers
L.





--
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/BLU0-SMTP4620FB3B74146705DC9690AE2D30%40phx.gbl.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django for in-house data

2013-12-09 Thread Lachlan Musicman
On 9 December 2013 19:17, Mike Dewhirst  wrote:
> On 9/12/2013 8:14am, Lachlan Musicman wrote:
>>
>> To be fair, I think the best measure is the technical literacy of your
>> users. The Admin interface is powerful, but they could also
>> accidentally screw everything up.
>
>
> Your point about technical literacy bears thinking about. Wouldn't you say
> all users can screw things up whether they are technically literate or not?

Of course - I've even done it myself. But some users are more likely
to than others. More importantly, they are usually less able to
articulate exactly what it was they did to enact the data loss.



Cheers
L.



-- 
>From this perspective it is natural that anarchism be marked by
spontaneity, differentiation, and experimentation that it be marked by
an expressed affinity with chaos, if chaos is understood to be what
lies outside or beyond the dominant game or system. Because of the
resistance to definition and categorisation, the anarchist principle
has been variously interpreted as, rather than an articulated
position, “a moral attitude, an emotional climate, or even a mood”.
This mood hangs in dramatic tension between utopian hope or dystopian
nihilism...
-
http://zuihitsu.org/godspeed-you-black-emperor-and-the-politics-of-chaos

-- 
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/CAGBeqiP2aX%2B9JfGwn3p0wOhzkE32Y7wUw2KPUshpkheGBYYJVw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django for in-house data

2013-12-09 Thread Mike Dewhirst

On 9/12/2013 8:14am, Lachlan Musicman wrote:

To be fair, I think the best measure is the technical literacy of your
users. The Admin interface is powerful, but they could also
accidentally screw everything up.


I agree that the Admin is not for general use. What I was thinking about 
was the speed of getting it up and getting feedback for building what 
might be required/desired. In other words, an interim prototype.


Your point about technical literacy bears thinking about. Wouldn't you 
say all users can screw things up whether they are technically literate 
or not?


Maybe group permissions in the admin can deliver read-only access to the 
data? Perhaps a small number of technically literate users can be given 
r/w permission for a restricted number of tables?


Doing that might or might not fit the scenario but it is worth considering.

Mike



Views (can) remove that opportunity

L.

On 9 December 2013 08:06, Mike Dewhirst  wrote:

On 8/12/2013 9:15pm, giuliano.bertole...@gmail.com wrote:


Hello,
I'm using Django to have people in my company access our database. Since
the application is not meant for public use, I was wondering how to best
struture it.
The admin framework seems to be well suited for manipulating tables via
web, while views (in my understanding) seem better for
presenting contents with limited database manipulation.
Since my app is not meant for public use, I'm wondering if it's worth
the effort to build views to mimic most of the admin features (are there
shortcuts?)
On the other hand, I'm not very happy to give everyone in my company
admin access simply to use the already built web interface.
Any suggestions?



I would go with the Admin interface and a sample of the database as a
prototype for user feedback. It will be much faster than building a fully
feathered application.

You can decide later if you want to stop there and rely on the admin or
press on and build your own user interface.

Mike



Thanks.
Giuliano.

--
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/1ab0c4ce-7e52-4764-bb7b-d653f0bef474%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
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/52A4DF4C.1070209%40dewhirst.com.au.

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






--
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/52A57CB5.6070300%40dewhirst.com.au.
For more options, visit https://groups.google.com/groups/opt_out.