Re: excel file upload to MySQL database

2016-01-14 Thread girija sameera
 Ok will see that. Also I found this 
http://django-excel.readthedocs.org/en/latest/

Do you think it would work?

Thank you.

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/447f8e90-5daf-44c9-a376-e4fed8208972%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: excel file upload to MySQL database

2016-01-14 Thread François Schiettecatte
Why don’t you try and see.

François

> On Jan 14, 2016, at 4:52 AM, girija sameera  wrote:
> 
>  Ok will see that. Also I found this 
> http://django-excel.readthedocs.org/en/latest/
> 
> Do you think it would work?
> 
> Thank you.
> 
> -- 
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/447f8e90-5daf-44c9-a376-e4fed8208972%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/D8DA4A4B-AD87-4A86-BAB2-8D53621CAF3E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Access denied for MySQL user in Django

2016-01-14 Thread Galil


I have created a Django app and which uses MySQL. The settings.py file in 
the database sections is:

DATABASES = {
'cdraccess': {
'ENGINE': 'django.db.backends.mysql',
'NAME': os.environ.get('CDR_DB_NAME', 'portal2'),
'USER': os.environ.get('CDR_DB_USER', 'cdraccess'),
'HOST': os.environ.get('CDR_DB_HOST', '127.0.0.1'),
'CONN_MAX_AGE': 0,
'PASSWORD': os.environ.get('CDR_DB_PASSWORD', ''),
},
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'db.sqlite3',
}}

I run the app like:

CDR_DB_PASSWORD='password' CDR_DB_HOST='host_name' ./manage.py runserver

but I get the following error:

Access denied for user 'cdraccess'@'host_ip_here' (using password: NO)")

I tried to access the database from terminal, like:

   $ mysql --host=[host_name] --user=cdraccess -p portal2

and worked fine.

What is going wrong in here? And what does this "(using password: NO)" mean?

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e1c26a0d-a509-46eb-b496-f7f09161e606%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Showing BooleanField checkbox on left

2016-01-14 Thread Luis Zárate
Do you know django crispy forms ?

http://django-crispy-forms.readthedocs.org/en/latest/

El miércoles, 13 de enero de 2016, Sayse  escribió:
> I'm in the process of trying to minimize the amount of code I need to use
to render a form with bootstrap styling with the hope of rendering with
just {{ form }} but I haven't yet managed to find a way to render a
BooleanField with the checkbox before the text.
>
>
>
> from django.forms import Form, BooleanField
>
> class MyForm(Form):
> field = BooleanField(label='Test Label')
>
> MyForm().as_table()
>
>
>
> The above test code will output
>
>
>
> Test Label:
>
> But what I'm hoping to achieve is the same look and feel as shown in the
bootstrap docs.
>
>
>
> Test Label:
>
>  The problem in doing this is that the rendering is handled via the form,
where the label and the field are positioned/rendered separately as shown
in the source, , and I have yet to find a place to override that will allow
me to render the widget inside of the label...
>
>
>
> Any ideas how I can achieve 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/c92f9f04-6c72-4d2d-8ff4-6de34be9f00e%40googlegroups.com
.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
"La utopía sirve para caminar" Fernando Birri

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyMHJ09upgDbKKFT7vrfbiQfStjM-%2BhS%2BCRu%2BSqmXxmG2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


turn on "string_if_invalid" as a ‘development default’

2016-01-14 Thread guettli
I would like to do this:

  turn on "string_if_invalid" as a ‘development default’

The django docs say:

 While string_if_invalid can be a useful debugging tool, it is a bad idea 
to turn it on as a ‘development default’.

https://docs.djangoproject.com/en/1.9/ref/templates/api/#how-invalid-variables-are-handled

We were hit by some nasty bugs in production environment which were not 
detected in our continous integration plattform.

If "string_if_invalid" (or former TEMPLATE_STRING_IF_INVALID) would have 
been activated,
we would have noticed the bug, and the broken code would have gone live.

How do you handle 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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a0227041-3836-471f-ac7f-63ae634b94e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: turn on "string_if_invalid" as a ‘development default’

2016-01-14 Thread James Schneider
On Jan 14, 2016 7:50 AM, "guettli"  wrote:
>
> I would like to do this:
>
>   turn on "string_if_invalid" as a ‘development default’
>
> The django docs say:
>
>  While string_if_invalid can be a useful debugging tool, it is a bad idea
to turn it on as a ‘development default’.
>
>
https://docs.djangoproject.com/en/1.9/ref/templates/api/#how-invalid-variables-are-handled
>
> We were hit by some nasty bugs in production environment which were not
detected in our continous integration plattform.
>
> If "string_if_invalid" (or former TEMPLATE_STRING_IF_INVALID) would have
been activated,
> we would have noticed the bug, and the broken code would have gone live.
>
> How do you handle this?
>

Why not have a second batch of tests that use a settings.py file with a non
default value for "string_if_invalid" that runs if the default settings
file passes? I've never dealt with a CI platform, but I'm assuming you can
do something like that.

- James

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXRm4rdwB-icDSsNFwqAhk-qYes9DieOKQXK%3D8mPVCGmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Access denied for MySQL user in Django

2016-01-14 Thread Fred Stluka

Galil,

I had a problem like this a couple years ago, and the solution
was to delete the anonymous MySQL guest user as:

mysql> use mysql;
mysql> delete from user where host='localhost' and 'user='';
mysql> flush privileges;

I'm not sure why Django 1.4 was trying to connect as the guest
user when it had a username and password that it was
supposed to be using, but for some reason it was.  Deleting
the guest user from MySQL fixed it for me, and is a good idea
for security reasons anyhow.

--Fred

Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.

On 1/14/16 7:11 AM, Galil wrote:


I have created a Django app and which uses MySQL. The settings.py file 
in the database sections is:


|DATABASES 
={'cdraccess':{'ENGINE':'django.db.backends.mysql','NAME':os.environ.get('CDR_DB_NAME','portal2'),'USER':os.environ.get('CDR_DB_USER','cdraccess'),'HOST':os.environ.get('CDR_DB_HOST','127.0.0.1'),'CONN_MAX_AGE':0,'PASSWORD':os.environ.get('CDR_DB_PASSWORD',''),},'default':{'ENGINE':'django.db.backends.sqlite3','NAME':'db.sqlite3',}}|


I run the app like:

|CDR_DB_PASSWORD='password'CDR_DB_HOST='host_name'./manage.py runserver|

but I get the following error:

Access denied for user 'cdraccess'@'host_ip_here' (using password:
NO)")

I tried to access the database from terminal, like:

|$ mysql --host=[host_name]--user=cdraccess -p portal2|

and worked fine.

What is going wrong in here? And what does this "(using password: NO)" 
mean?



--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e1c26a0d-a509-46eb-b496-f7f09161e606%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5697DFA4.20300%40bristle.com.
For more options, visit https://groups.google.com/d/optout.


Re: Showing BooleanField checkbox on left

2016-01-14 Thread Sayse
Yea I've heard of it. Have they managed to achieve this? I'd be interested to 
see how they've done it if so... 

I was hoping to find a way to do this with native django if possible 

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/75032216-188a-4b49-8c3f-d101380ac1ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to learn Django stepwise Effectively

2016-01-14 Thread Berbetto Nyamwamu
I am requesting one to advice on a way to learn Django effectively since it 
seems to be wide

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0354eb74-ea91-4f64-a717-28baf8a79109%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Coding retreat - Hack for food

2016-01-14 Thread Giorgos Papoutsakis
We are a small start up and we are developing a web application with Django 
and angular. We are hosting a coding retreat in Copenhagen based in those 
technologies. Join us for a day of coding, fun and learning. Snacks will be 
provided. For more information visit the facebook 
event https://www.facebook.com/events/1288716631153922/

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/170fcb36-edd8-4b1f-95ae-ffbedf53e902%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: apps.populate deadlock

2016-01-14 Thread John Bazik
Thanks Shai.  I'm waiting for a comment from the django-cms people.

John

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ee0a0bd0-6129-4d3d-9335-90a3e6a54f13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Upgrading to 1.9 - Any Easy Guide ?

2016-01-14 Thread Vibhu Rishi
Thanks Andre!

On Tue, Jan 12, 2016 at 7:04 PM, André Jarussi 
wrote:

> Hello,
>
> I recently had to upgrade from Django 1.4 to 1.8 (not quite ready for 1.9)
> ... I made the upgrade with the minor realeases .. I didn't had much
> trouble with the patches ..
>
> basically .. 1.4 to 1.5 .. deploy .. see whats wrong .. 1.5 to 1.6 ..
> deploy .. see whats wrong ..  until you reach the version you wanna stay.
>
> It's a lot less painfull .. and boring.
>
> Read the release notes before starting any upgrade. It really helps you
> have an understading on what's changing and how that affects you.
>
> https://docs.djangoproject.com/en/stable/releases/1.5/
>
>
> Good luck!!
>
>
> On Tuesday, January 12, 2016 at 10:36:28 AM UTC-2, Vibhu Rishi wrote:
>>
>> Hi Tom
>>
>> So essentially you are saying to go with upgrade to 1.7 - fix issues and
>> then to 1.8 etc ?
>>
>> V.
>> On Jan 11, 2016 11:45 PM, "'Tom Evans' via Django users" <
>> django...@googlegroups.com> wrote:
>>
>>> On Mon, Jan 11, 2016 at 4:36 PM, Vibhu Rishi  wrote:
>>> > Hi
>>> >
>>> > I work on a hobby project on and off which is based on django. After a
>>> long
>>> > gap, I picked up the work again. In the meantime, it seems that django
>>> has
>>> > been evolving faster than I have been working. I am currently on 1.6
>>> (which
>>> > I think i had upgraded from 1.4 or 1.3 as my starting base). However,
>>> the
>>> > current new version of Django is 1.9
>>> >
>>> > I created a new virtual environment and used pip to get the latest
>>> version
>>> > of django.
>>> >
>>> > Now I am getting a lot of errors.
>>>
>>> That is the hard way.
>>>
>>> >
>>> > Is there an easy way to upgrade django ? Or a howto for best practices
>>> ?
>>> >
>>>
>>> (Releases have version components: "1.9.1" is major release 1, minor
>>> release 9, minor-minor release 1)
>>>
>>> If you are on release 1.N, update to release 1.N+1.Y (with Y being the
>>> highest released minor-minor version), and step through its release
>>> notes dealing with all the things which have changed or been
>>> deprecated, and update them accordingly. Run your test suite to
>>> determine if anything has been broken (pro tip: tests are useful - you
>>> might want to write some if you don't already test your most common
>>> features)
>>>
>>> Then, do the next minor release until you reach the latest release.
>>>
>>> A more complete process would be to update to 1.N+1, ensure tests pass
>>> and deprecated behaviour handled, THEN subsequently to 1.N+1.Y, ensure
>>> tests pass and only then go to the next minor version. That can be a
>>> bit paranoid, as (deliberately) not much functionality or breaking
>>> changes are added in minor-minor releases of django.
>>>
>>> Release notes are here:
>>> https://docs.djangoproject.com/en/1.9/releases/
>>>
>>> Cheers
>>>
>>> Tom
>>>
>>> PS: Best practices are not to fall that far behind!
>>>
>>> --
>>> 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 https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAFHbX1LiKM3pzb1bAFTk88iLmbJKWpEaa3NTMdsVw3WJ%2BRwbdw%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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3f247925-dc62-4109-8add-379ce704b8c5%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPiONwkjke%2BzbUjWERMxNhju9gkF4YvoamGoTmL-hO2JgJ1P3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.