Re: count

2016-01-27 Thread aspellip
Which version of Django do you using? вторник, 26 января 2016 г., 23:14:03 UTC+2 пользователь suabiut написал: > > When i did that i got the error: > > 'dict' object has no attribute 'render_context' > > > > On Tue, Jan 26, 2016 at 7:25 PM, > wrote: > >> Try this >> def foreginexchange_view(reques

Re: Questions about session

2016-01-27 Thread Krishnakant
If you wish to keep some data always visible specially i the base template, then why not make the base template a single page app and then through ajax lode other pages? You can also use angular.js for such work. happy hacking. Krishnakant. On Wednesday 27 January 2016 03:36 AM, Lorenzo Berna

Re: Questions about session

2016-01-27 Thread Lorenzo Bernardi
Hello, I answered a very similar question to this a few days ago: https://groups.google.com/forum/#!msg/django-users/L3pUwDYs6jw/bSYVs81tEwAJ thanks for the link. I agree with you for the fact that updating sess

Re: Questions about session

2016-01-27 Thread Lorenzo Bernardi
Hello, If you wish to keep some data always visible specially i the base template, then why not make the base template a single page app and then through ajax lode other pages? I thought of using ajax but I'm not very familiar with it. But I didn't think of making the base page a single app

Reverse Foriegnkey filtering

2016-01-27 Thread Jonty Needham
I've found a need to do this and I'm struggling. Some info seems to indicate that django doesn't support this. How is it meant to be done? Basically to be clear, I need to filter one queryset on a reverse foriegnkey relation to another set of objects defined by a particualr filter. model1(Models.

Re: Reverse Foriegnkey filtering

2016-01-27 Thread Rafael E. Ferrero
why not filter model2 with select_related ?? (you already try to put a related_name in the foreignkey of model2?) cheers! Rafael E. Ferrero 2016-01-27 8:58 GMT-03:00 Jonty Needham : > I've found a need to do this and I'm struggling. Some info seems to > indicate that django doesn't support this

Re: Reverse Foriegnkey filtering

2016-01-27 Thread Michal Petrucha
On Wed, Jan 27, 2016 at 11:58:23AM +, Jonty Needham wrote: > I've found a need to do this and I'm struggling. Some info seems to > indicate that django doesn't support this. How is it meant to be done? > > Basically to be clear, I need to filter one queryset on a reverse > foriegnkey relation

Re: search page

2016-01-27 Thread Ilias Dimos
The easiest way i have used is this http://toastdriven.com/blog/2008/nov/09/quick-dirty-search-django/ On Tuesday, January 26, 2016 at 11:46:21 PM UTC+2, Xristos Xristoou wrote: > > hello, > > > i want to an easy way to create search page on my site to searching only > the titles. > who is the

help with ManyToMany

2016-01-27 Thread dave.l
Hi, I have recently returned to a Django project after a few years and I'm a little rusty on ManyToMany fields. Here's my very simple models: class Studio(models.Model): name = models.CharField(max_length=255, unique=True) class StudioGroup(models.Model): description = models.CharFiel

Django linking static content to dynamic content

2016-01-27 Thread Shekar Tippur
Hello, I have implemented authentication via django allauth. I am trying to link UI which is loosely coupled with django. I am able to get to the index page by all other static content throes a 404 error. Appreciate any help on this. I have gone thro https://docs.djangoproject.com/en/1.8/howto/s

Adding a field to a model after initial migration

2016-01-27 Thread ofeyofey
Hi, I forgot to add a field to a model and wish to add it now. I added the line to models.py but makemigrations and migrate aren't working now. Is this possible in Django or do i need to go directly tp the sqlite DB and do it using SQL? Thanks Currently following this tutorial https://www.youtub

Re: Adding a field to a model after initial migration

2016-01-27 Thread sum abiut
What error did your get? what command did you use? try python manage.py makemigrations python manage.py migrate On Wed, Jan 27, 2016 at 11:21 AM, ofeyofey wrote: > Hi, > I forgot to add a field to a model and wish to add it now. > I added the line to models.py but makemigrations and migrate are

Re: Django linking static content to dynamic content

2016-01-27 Thread James Schneider
On Wed, Jan 27, 2016 at 8:30 AM, Shekar Tippur wrote: > Hello, > > I have implemented authentication via django allauth. I am trying to link > UI which is loosely coupled with django. > I am able to get to the index page by all other static content throes a > 404 error. Appreciate any help on thi

Re: help with ManyToMany

2016-01-27 Thread Xristos Xristoou
your code is correct,where are the problem ?in the admin first add Studio and sfter this select on the field studio from class studiogroup one or more entries from the class studio so simple, christos Τη Τετάρτη, 27 Ιανουαρίου 2016 - 5:50:21 μ.μ. UTC+2, ο χρήστης dave.l έγραψε: > > Hi, > > I h

Re: Django linking static content to dynamic content

2016-01-27 Thread Shekar Tippur
James, Thanks for responding. This is just my development env. I have tried running collectstatic as well. I have included static file helpers. STATICFILES_FINDERS = [ 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', ] pr

Re: Adding a field to a model after initial migration

2016-01-27 Thread Xristos Xristoou
no the problem is your new field affect models rules...try the new field to have null=True or default=somathing and then run on mynage.py makemigration yourapp and after migrate yourapp christos Τη Τετάρτη, 27 Ιανουαρίου 2016 - 9:21:16 μ.μ. UTC+2, ο χρήστης ofeyofey έγραψε: > > Hi, > I forgot

Re: Adding a field to a model after initial migration

2016-01-27 Thread ofeyofey
Thanks for your reply. The model.py contains, class SignUp(models.Model): email = models.EmailField() full_name = models.CharField(max_length = 120, blank = True, null = True) timestamp = models.DateTimeField(auto_now_add = True, auto_now = False) updated = models.DateTimeField(

Re: Adding a field to a model after initial migration

2016-01-27 Thread Xristos Xristoou
work now ? Τη Τετάρτη, 27 Ιανουαρίου 2016 - 9:21:16 μ.μ. UTC+2, ο χρήστης ofeyofey έγραψε: > > Hi, > I forgot to add a field to a model and wish to add it now. > I added the line to models.py but makemigrations and migrate aren't > working now. > Is this possible in Django or do i need to go dir

Re: count

2016-01-27 Thread sum abiut
Version 1.7 On Wed, Jan 27, 2016 at 10:42 PM, wrote: > Which version of Django do you using? > > вторник, 26 января 2016 г., 23:14:03 UTC+2 пользователь suabiut написал: >> >> When i did that i got the error: >> >> 'dict' object has no attribute 'render_context' >> >> >> >> On Tue, Jan 26, 2016

Re: Adding a field to a model after initial migration

2016-01-27 Thread ofeyofey
Hi, I changed the line to updated = models.DateTimeField(auto_now_add = False, auto_now = True, null= True) But the same results, [pi@Huawei-HG658c-instalacion src]$ python manage.py makemigrations /home/pi/src/djangoTest/urls.py:20: RemovedInDjango110Warning: Support for string view argumen

Re: Adding a field to a model after initial migration

2016-01-27 Thread Xristos Xristoou
you add your app name after the run makemigration and migrate ?if your app name is a blog then you run* makemigration blog *and *migrate blog* Τη Τετάρτη, 27 Ιανουαρίου 2016 - 9:21:16 μ.μ. UTC+2, ο χρήστης ofeyofey έγραψε: > > Hi, > I forgot to add a field to a model and wish to add it now. > I

Re: Adding a field to a model after initial migration

2016-01-27 Thread ofeyofey
Ok I put the app name which is 'news' after the commands for makemigrations and for migrate. But I am still getting the same results. On Wednesday, 27 January 2016 19:21:16 UTC, ofeyofey wrote: > > Hi, > I forgot to add a field to a model and wish to add it now. > I added the line to models.py bu

Re: Adding a field to a model after initial migration

2016-01-27 Thread Xristos Xristoou
i dont know why sorry..try default value Τη Τετάρτη, 27 Ιανουαρίου 2016 - 9:21:16 μ.μ. UTC+2, ο χρήστης ofeyofey έγραψε: > > Hi, > I forgot to add a field to a model and wish to add it now. > I added the line to models.py but makemigrations and migrate aren't > working now. > Is this possible in

Re: Adding a field to a model after initial migration

2016-01-27 Thread ofeyofey
No problem. Thanks for your help. Maybe fields can't be added to a model with django. I will try dropping the table in the DB and see what happens. Thanks again, On Wednesday, 27 January 2016 19:21:16 UTC, ofeyofey wrote: > > Hi, > I forgot to add a field to a model and wish to add it now. > I add

Re: Adding a field to a model after initial migration

2016-01-27 Thread sum abiut
You should try running it as root. On Thu, Jan 28, 2016 at 8:29 AM, ofeyofey wrote: > No problem. Thanks for your help. > Maybe fields can't be added to a model with django. > I will try dropping the table in the DB and see what happens. > Thanks again, > > On Wednesday, 27 January 2016 19:21:16

Re: Adding a field to a model after initial migration

2016-01-27 Thread ofeyofey
Alas too late... I have dropped the table. But this link http://www.djangobook.com/en/2.0/chapter10.html to a Django Book for version 1.0 may hold some ideas under the section about adding fields. Thanks On Wednesday, 27 January 2016 19:21:16 UTC, ofeyofey wrote: > > Hi, > I forgot to add a field

Re: apps.populate deadlock

2016-01-27 Thread John Bazik
Following up, the discussion continued on other lists: https://groups.google.com/forum/#!topic/django-cms-developers/CNWHNviqS6Q https://groups.google.com/forum/#!topic/django-developers/YvEzdQU4qUU Problem ultimately resolved by a pending PR: https://github.com/django/django/pull/6044 John --