Can't update extended user django model

2015-07-21 Thread Info Test
When I save my model, there is no effect in database. What is the problem? class Profil(models.Model): user = models.OneToOneField(User) in manage.py shell >>> p = models.Profil.objects.get(user__username='testname') >>> p.user.is_superuser False >>> p.user.is_superuser = True >>> p.user.i

Re: Can't update extended user django model

2015-07-21 Thread Info Test
Le mardi 21 juillet 2015 10:55:19 UTC+3, Info Test a écrit : > > When I save my model, there is no effect in database. > What is the problem? > > class Profil(models.Model): > user = models.OneToOneField(User) > > > in manage.py shell > > >>> p = models.Profil.objects.get(user__username='test

Re: Can't update extended user django model

2015-07-21 Thread James Schneider
You didn't call p.save() anywhere, so the change you made wasn't committed to the database. All you've done here is made a change to the object in memory you pulled out of the database, and then over wrote that change by pulling another copy out of the database. -James On Jul 21, 2015 12:55 AM, "

Re: Can't update extended user django model

2015-07-21 Thread Info Test
Even with p.save(force_update = True) , it doesn't work -- 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 thi

Re: Can't update extended user django model

2015-07-21 Thread James Schneider
Are you getting any sort of error when you run save()? Are the changes reflected in the database after the save() call? Can you perform the same operation directly on the user object? Also, this operation shouldn't require any arguments to save(). -James On Jul 21, 2015 1:43 AM, "Info Test" wrot

Re: Can't update extended user django model

2015-07-21 Thread Info Test
Any error appear on console, is it possible that only superuser can do that? -- 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...@googlegroup

Re: Can't update extended user django model

2015-07-21 Thread Sadaf Noor
Did you "python manage.py migrate"? 2015-07-21 15:07 GMT+06:00 Info Test : > Any error appear on console, is it possible that only superuser can do > that? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group

Re: Can't update extended user django model

2015-07-21 Thread Info Test
Thanks for all your answers. Solution : http://stackoverflow.com/questions/31534715/cant-update-extended-user-django-model -- 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

Re: django 1.8 + mysql + python 3.2

2015-07-21 Thread Tim Graham
That configuration is not officially supported as we don't run the Django test suite with that combination. You could try the unofficial fork of MySQLdb that we recommended in the past which clams 3.2 support: https://github.com/clelland/MySQL-for-Python-3 On Tuesday, July 21, 2015 at 2:46:18 A

SHOP APP

2015-07-21 Thread dravid rahul
Hi can anyone please help me with this.. I am newbie to django. PLEASE FIND BELOW ATTACHMENT Thanks in Advance Dravid -- 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

Differences between Django 1.1 and 1.8

2015-07-21 Thread Karthik Reddy
Hi experts, I am working on book Beginning Django Ecommerce(1.1).Based on this document i wanna develop applications in Django(1.8).Please help me getting the differences between 1.1 and 1.8 Thanks, Karthik -- You received this message because you are subscribed to the Google Groups "Django

Re: django 1.8 + mysql + python 3.2

2015-07-21 Thread Aron Podrigal
I've been using *mysql-connector-python==1.2.2* and *django 1.6.x* with no problems for the last couple of months. I had some issues before that after inactive interval the database connections are becoming invalid and was causing a server error. I added some lines into *django/db/backends/__ini

Re: Differences between Django 1.1 and 1.8

2015-07-21 Thread Lucas Klassmann
Hi, You can check the changes between versions in the release notes: https://docs.djangoproject.com/en/1.8/releases/ If you can, I think you should read a recent book or you will have to read each every difference between versions( And had many important changes). Cheers. On Tue, Jul 21, 2015 a

Re: Differences between Django 1.1 and 1.8

2015-07-21 Thread Karthik Reddy
Thank you Lucas Klassmann On Tuesday, July 21, 2015 at 8:16:58 PM UTC+5:30, Lucas Klassmann wrote: > > Hi, > > You can check the changes between versions in the release notes: > https://docs.djangoproject.com/en/1.8/releases/ > > If you can, I think you should read a recent book or you will have

Individual form element modification in Django

2015-07-21 Thread Rafer Johnson
Hi Guys, I would like to know how I can apply unique identifiers to individual form elements. Currently I am trying to apply unique classes to individual inputs in a form and finding it impossible based on what I know about Django form helpers. I was trying to apply a unique background to each

Re: Is there a plan to modernize Django-admin?

2015-07-21 Thread Lee Hinde
On Sat, Jul 18, 2015 at 12:25 AM, Stuart Longland < stua...@longlandclan.yi.org> wrote: > On 18/07/15 11:00, Ezequiel Bertti wrote: > > Do you already see this project? > > > > https://github.com/sshwsfc/django-xadmin > > Unfortunately their homepage just swears at me in Chinese. http://demo.xad

Re: Search Engine using Django-Python

2015-07-21 Thread Manoj Bawane
Hi Daniel, Yes, I read about Haystack and I am implementing it with Solr and Database I am using MySQL. While integrating it I am getting error for ManyToMany Model field. I am getting this error and I am not understand what is going wrong or what to do: Traceback (most recent call last): Fi

Re: Easy to use graphical reporting tools for SQL

2015-07-21 Thread Stefano Probst
Know the "non-developers" SQL? I guest not, but if you can try MySQL workbench .. -- 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

Thumbnails In Django

2015-07-21 Thread divyanshi kathuria
I am using Django Rest framework. I have three fields in my Pin Model : image,thumbnail_medium and thumbnail_small. I want to create two thumbnails from the image. How to do that? I tried the following code : But it's not working. from django.db import models from django.contrib.auth.models impo

Re: Easy to use graphical reporting tools for SQL

2015-07-21 Thread Vijay Khemlani
I guess any kind of report they want to generate will require some knowledge of relational databases. Considering that, I think Jasper Reports is a good tradeoff, It has a graphical interface to create the queries, and the reports can be accessed by anyone after it's query and design is done. On

Re: Easy to use graphical reporting tools for SQL

2015-07-21 Thread Lee Hinde
https://github.com/epantry/django-sql-explorer You can build the queries and they're available to whomever you want to give access. This assumes they have access to the django app. On Mon, Jul 20, 2015 at 2:09 PM, Kevin wrote: > In our office we have a Django application that uses a MySQL dat

Re: Thumbnails In Django

2015-07-21 Thread Sadaf Noor
In one of my projects I used sorl ( https://github.com/mariocesar/sorl-thumbnail) instead, it was super easy and best fit for my project. Every time it asks for a new thumbnail BUT if it exists in its cache, then that one is returned. If it doesn't, a new one is generated and stored, then returned.

Re: Differences between Django 1.1 and 1.8

2015-07-21 Thread aCHIAO
I am reading this book too 2015-07-21 23:08 GMT+08:00 Karthik Reddy : > Thank you Lucas Klassmann > > On Tuesday, July 21, 2015 at 8:16:58 PM UTC+5:30, Lucas Klassmann wrote: >> >> Hi, >> >> You can check the changes between versions in the release notes: >> https://docs.djangoproject.com/en/1.8/

Re: Thumbnails In Django

2015-07-21 Thread Robin Lery
Yes. I would like to add easy-thumbnails too. Both are great! On 22 Jul 2015 01:05, "Sadaf Noor" wrote: > In one of my projects I used sorl ( > https://github.com/mariocesar/sorl-thumbnail) instead, it was super easy > and best fit for my project. Every time it asks for a new thumbnail BUT > if i

Re: Thumbnails In Django

2015-07-21 Thread Ezequiel Bertti
easy-thumbnails +1 -- Ezequiel Bertti E-Mail: eber...@gmail.com Cel: (21) 99188-4860 -- 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...@

Re: SHOP APP

2015-07-21 Thread Russell Keith-Magee
On Tue, Jul 21, 2015 at 7:11 PM, dravid rahul wrote: > Hi can anyone please help me with this.. I am newbie to django. > > PLEASE FIND BELOW ATTACHMENT > > Thanks in Advance > Dravid > Dravid - we're not going to do your homework for you. You've been given a task for assessment purposes - th

Re: SHOP APP

2015-07-21 Thread Cesar Mojarro
hahaha! Can you do my homework? On Tue, Jul 21, 2015 at 4:59 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > > On Tue, Jul 21, 2015 at 7:11 PM, dravid rahul wrote: > >> Hi can anyone please help me with this.. I am newbie to django. >> >> PLEASE FIND BELOW ATTACHMENT >> >> Thanks

Re: SHOP APP

2015-07-21 Thread Gergely Polonkai
…anyways, I'm not really sure it can be done in mere 6 hours. Or if so, I wouldn't dare to deploy it to production :) On 22 Jul 2015 00:06, "Cesar Mojarro" wrote: > hahaha! > Can you do my homework? > > On Tue, Jul 21, 2015 at 4:59 PM, Russell Keith-Magee < > russ...@keith-magee.com> wrote: > >>

Re: Individual form element modification in Django

2015-07-21 Thread Russell Keith-Magee
Hi Rafer, I think what you're looking for is the "attrs" argument on a form widget. https://docs.djangoproject.com/en/1.8/ref/forms/widgets/#django.forms.Widget.attrs That page has some examples showing adding a class to a field as a specific example: class CommentForm(forms.Form): name = f

Using Django FormPreview the right way

2015-07-21 Thread Steve SanPietro
Hi All, I have a Django project with a form, and I want to display a preview page before the user submits. I can display a preview page using a Django FormPreview, but not all form data is displayed properly. Specifically, if I have a model field with choices, the string values of these choice

Re: Okay so has nothing to do with programming, and everything to do with the future of Humanity

2015-07-21 Thread JJ Zolper
Brandon, I think we may be talking about different aspects of running a website. Using a CMS is another topic in relation to what I was aiming for. I'm referring to the skills involved in managing the server infrastructure of a live website, not managing the content of a live website. I'm talki

Re: Okay so has nothing to do with programming, and everything to do with the future of Humanity

2015-07-21 Thread JJ Zolper
I do want to append to my remarks that I am very appreciative of some of the new documentation under performance, optimization, etc. I just think if say we could bring in some big guns that have dealt with big time websites in the wild that would be super dynamic for our community. People who kn

Re: Okay so has nothing to do with programming, and everything to do with the future of Humanity

2015-07-21 Thread Brandon Keith Biggs
Hello, I am talking about even more basic than this. ◾ Should I use Apache, Gunicorn, uWSGI or something else? Honestly I have only heard of Apache and have only seen Gunicorn in relation to Mezzanine. I have no idea what Gunicorn is! ◾ Where should I use caching to make things faster? I kno

Re: Differences between Django 1.1 and 1.8

2015-07-21 Thread Karthik Reddy
Hi Achiao, I am a little bit confused with small task given to me . Which is related to e-commerce shopping app.If you can do it i will give you the document On Wed, Jul 22, 2015 at 2:49 AM, aCHIAO wrote: > I am reading this book too > > 2015-07-21 23:08 GMT+08:00 Karthik Reddy : > >> Thank y

Re: SHOP APP

2015-07-21 Thread dravid rahul
Hi Russ, I am not asking to do my homework.But the thing is i cant find any document related to develop such application.If you can just help me how to approach the solution. Thanks Dravid On Wed, Jul 22, 2015 at 3:29 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > > On Tue, Jul 21,

Re: SHOP APP

2015-07-21 Thread dravid rahul
Hi Naco, I cant do your homework but i can tell you how to workout a problem if i am experienced On Wednesday, July 22, 2015 at 3:36:57 AM UTC+5:30, Naco wrote: > > hahaha! > Can you do my homework? > > On Tue, Jul 21, 2015 at 4:59 PM, Russell Keith-Magee < > rus...@keith-magee.com > wrote: > >

Re: Is there a plan to modernize Django-admin?

2015-07-21 Thread Ezequiel
On Monday, July 20, 2015 at 3:58:31 AM UTC-3, Derek wrote: > > You can also look at http://djangosuit.com/ - works very well. Free for > non-commercial projects. In the middle of an upgrade to Bootstrap 3. > Looks very good, but it is not responsive and suitable for mobile, right? Regards http

Re: Is there a plan to modernize Django-admin?

2015-07-21 Thread Ezequiel Bertti
I use djangosuit. It's great. I recommend. But is better skin with some new features for django admin. Not a new "django admin" On Wed, Jul 22, 2015 at 1:46 AM, Ezequiel wrote: > > On Monday, July 20, 2015 at 3:58:31 AM UTC-3, Derek wrote: >> >> You can also look at http://djangosuit.com/ -

Re: Problem rendering media files in template during development

2015-07-21 Thread charito.romeo
Never mind. I figured it out. For some reason, {{ MEDIA_URL }} doesn't work but {{ media_url }} does. Now all my movies and images are rendered. Cheers. :) On Monday, July 20, 2015 at 3:16:52 PM UTC+8, charito.romeo wrote: > > Hi django folks, > > I ran into a hiccup when I was rendering media

Re: Problem rendering media files in template during development

2015-07-21 Thread ltc.hotspot
Hi Charito, What tool did you use to insert your python codes into the marked fields below, i.e., settings.py, my models.py, etc? Regards, Hal Sent from Surface From: charito.romeo Sent: ‎Tuesday‎, ‎July‎ ‎21‎, ‎2015 ‎10‎:‎20‎ ‎PM To: django-users@googlegroups.com Never mind.

Re: Problem rendering media files in template during development

2015-07-21 Thread Charito Romeo
Hi Hal, I'm using the code icon right on top of the gmail textbox. Click on the { } icon which is last icon on the top right of your text box. On Wed, Jul 22, 2015 at 1:26 PM, wrote: > Hi Charito, > > What tool did you use to insert your python codes into the marked fields > below, i.e., sett