Re: Some creating Forms from models snags.

2014-07-08 Thread Lachlan Musicman
On 9 July 2014 13:19, Don Fox wrote: > > > I should have mentioned that I already had this method in the models.py: > > class Article (models.Model): > pub_date = models.DateField() > headline = models.CharField(max_length = 30) > content =

Re: Some creating Forms from models snags.

2014-07-08 Thread Don Fox
On Tuesday, July 8, 2014 10:30:23 PM UTC-4, Lachlan Musicman wrote: > > There is no class Article in any of those blocks. That's why. > > Try adding this to models.py this: > > class Article(models.Model): > name = models.CharField(max_length=25) > body = models.TextField() > author =

Re: Some creating Forms from models snags.

2014-07-08 Thread Lachlan Musicman
Or something like this: https://docs.djangoproject.com/en/1.6/intro/overview/ L. On 9 July 2014 12:29, Lachlan Musicman wrote: > There is no class Article in any of those blocks. That's why. > > Try adding this to models.py this: > > class Article(models.Model): > name =

Re: Some creating Forms from models snags.

2014-07-08 Thread Lachlan Musicman
There is no class Article in any of those blocks. That's why. Try adding this to models.py this: class Article(models.Model): name = models.CharField(max_length=25) body = models.TextField() author = models.ForeignKey(Author) That should help. cheers L. On 9 July 2014 11:31, Don Fox

Re: Django newbie issues

2014-07-08 Thread Lachlan Musicman
(GEdit and less/more shouldn't require too much learning - gedit is literally the equivalent of Notepad, less and more are what the 70s look like. L. On 9 July 2014 12:00, Janelle wrote: > Thanks, all, for the advice. > I am facing a number of learning curves, and I

Re: Django newbie issues

2014-07-08 Thread Janelle
Thanks, all, for the advice. I am facing a number of learning curves, and I appreciate that you all take time from the more advanced work you do to help me out. I'll seek someone local. On Tue, Jul 8, 2014 at 6:09 PM, Mike Dewhirst wrote: > On 9/07/2014 6:24 AM,

Some creating Forms from models snags.

2014-07-08 Thread Don Fox
In the Creating forms from Models documentation *https://docs.djangoproject.com/en/1.6/topics/forms/modelforms/ *I'm having some problems. First I'm placing the code from the first block (green section), where the class ArticleForms is defined in the shell in a *forms.py *file in a myapp app

Re: Django newbie issues

2014-07-08 Thread Lachlan Musicman
On 9 July 2014 06:24, Janelle wrote: > I've never worked in Ubuntu before, but from what I understand, there is no > text editor or Word or anything like that; everything is done through the > command line and there is no "desktop." > > So, how would I open settings.py with

Re: Django newbie issues

2014-07-08 Thread Mike Dewhirst
On 9/07/2014 6:24 AM, Janelle wrote: I've never worked in Ubuntu before, but from what I understand, there is no text editor or Word or anything like that; everything is done through the command line and there is no "desktop." So, how would I open settings.py with Ubuntu? You could try

Re: Full text search available on PostgreSQL?

2014-07-08 Thread jirka . vejrazka
Also, not directly tied to ModelAdmin, but you might want to take a look at django-watson. HTH Jirka -Original Message- From: Johannes Schneider Sender: django-users@googlegroups.com Date: Tue, 08 Jul 2014 09:26:07 To:

RE: Django newbie issues

2014-07-08 Thread Ilya Kazakevich
There are a lot of graphical user interfaces available for Linux, and Ubuntu bundles some of them. And there are a lot of text editos (like Sublime) In command line you could use some command line editor like "vim" or "nano" or "emacs" or "F4" in Midnight Commander. But I believe you need to

Re: Full text search available on PostgreSQL?

2014-07-08 Thread Bastian Kuberek
This looks promising. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to

Re: Django newbie issues

2014-07-08 Thread Janelle
I've never worked in Ubuntu before, but from what I understand, there is no text editor or Word or anything like that; everything is done through the command line and there is no "desktop." So, how would I open settings.py with Ubuntu? On Tue, Jul 8, 2014 at 12:47 AM, Lachlan Musicman

Re: gunicorn myproject.wsgi:application invalid now.

2014-07-08 Thread Yannick Morin
Did you found a solution because I have the same issue. On Thursday, June 19, 2014 9:27:32 AM UTC-4, Jacky wrote: > > I use gunicorn to deploy my project all the time, but today, in my new > project, it raise a error. > > I check here and there, google around, but it doesn't work. > > Maybe

Re: NameError name 'lang' is not defined, corresponds to name 'polls' is not defined,

2014-07-08 Thread Tom Evans
On Tue, Jul 8, 2014 at 6:54 PM, Rodrigo Caicedo wrote: > In your INSTALLED_APPS part in the configuration file, the registered > application is called 'langu', and not 'lang'. If you copied your code, > that's your problem. I don't think so, he has a project named

Re: NameError name 'lang' is not defined, corresponds to name 'polls' is not defined,

2014-07-08 Thread Rodrigo Caicedo
In your INSTALLED_APPS part in the configuration file, the registered application is called 'langu', and not 'lang'. If you copied your code, that's your problem. On Sunday, July 6, 2014 2:26:15 AM UTC-5, gintare wrote: > > I am trying to create a project "lang" according Django documentation

Re: django beginner

2014-07-08 Thread Mando
can you post the output when you run syncdb? On Tuesday, July 8, 2014 10:13:41 AM UTC-5, Mando wrote: > > Is there anything in your models for the other apps ex: photo, events, > etc... ? syncdb will not do anything with those until you create your > models. Besides that you just need to crate

Re: django beginner

2014-07-08 Thread Mando
Is there anything in your models for the other apps ex: photo, events, etc... ? syncdb will not do anything with those until you create your models. Besides that you just need to crate your view and a url pointer to it and you should get a response. On Tuesday, July 8, 2014 3:13:14 AM UTC-5,

Re: How do I add a Foreign Key Field to a ModelForm in Django?

2014-07-08 Thread Ram Ganesh
Thanks for your time On Tuesday, July 8, 2014 8:13:23 PM UTC+5:30, Shubham Pansari wrote: > > Add the following method in your class Mobile to make it return the name > of mobile object. > > def __unicode__(self): > return self.name > > This will return the name whenever a mobile object is

Re: How do I add a Foreign Key Field to a ModelForm in Django?

2014-07-08 Thread Ram Ganesh
Thanks for your time -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to

Re: How do I add a Foreign Key Field to a ModelForm in Django?

2014-07-08 Thread Shubham Pansari
Add the following method in your class Mobile to make it return the name of mobile object. def __unicode__(self): return self.name This will return the name whenever a mobile object is created. On Tue, Jul 8, 2014 at 7:46 PM, Ram Ganesh wrote: > > > it shows a

Re: How do I add a Foreign Key Field to a ModelForm in Django?

2014-07-08 Thread Tom Evans
On Tue, Jul 8, 2014 at 3:16 PM, Ram Ganesh wrote: > > > it shows a drop down menu which is have mobile objects. > How to get mobile name? https://docs.djangoproject.com/en/1.7/ref/forms/fields/#modelchoicefield """ The __str__ (__unicode__ on Python 2) method of the model

How do I add a Foreign Key Field to a ModelForm in Django?

2014-07-08 Thread Ram Ganesh
it shows a drop down menu which is have mobile objects. How to get mobile name? confused about - self.queryset = forms.ModelChoiceField(queryset=Mobile.objects.all(label="select mob") models.py class Mobile(models.Model): name = models.CharField(max_length=50) price =

Re: SWFL Django users

2014-07-08 Thread acheraime
I'm in Bradenton / Sarasota Sent from my iPhone > On Jul 8, 2014, at 6:12 AM, Larry Martell wrote: > >> On Tue, Jul 8, 2014 at 12:07 AM, Janelle O'Dea wrote: >> Anybody in Southwest Florida who uses Django? > > I am in Venice. > > -- > You

Re: django.core.exceptions.AppRegistryNotReady

2014-07-08 Thread Tom Evans
On Tue, Jul 8, 2014 at 11:54 AM, Frank Bieniek wrote: > Simply do not use get_user_model() in model definitions. The 1.7 relnotes should probably be updated with this instruction, afaict there is nothing about this in the "App-loading refactor" nor

Re: django.core.exceptions.AppRegistryNotReady

2014-07-08 Thread Marc Aymerich
On Tue, Jul 8, 2014 at 12:54 PM, Frank Bieniek < frank.bien...@produktlaunch.de> wrote: > Hi Marc, > > this should fix it: > > File "/home/orchestra/django-orchestra/orchestra/apps/accounts/models.py", >> line 9, in Account >> user = models.OneToOneField(get_user_model(), >>

Re: django.core.exceptions.AppRegistryNotReady

2014-07-08 Thread Frank Bieniek
Hi Marc, this should fix it: File "/home/orchestra/django-orchestra/orchestra/apps/accounts/models.py", line 9, in Account user = models.OneToOneField(get_user_model(), related_name='accounts') change it to: user = models.OneToOneField(settings.AUTH_USER_MODEL, related_name='accounts')

Re: Tango with Django chapter 7 Exercises

2014-07-08 Thread zuchie
try in step 2: action = "" leave it blank, the form will be posted in the same view. and in step 4: Add Page of course you have to insert url into the context dic this way in views/category(): category.url = category_name_url. I think your way the url will be processed as

Re: Django 1.6 + Mysql

2014-07-08 Thread Hataraku Meeru
I'm pretty new at Django but I think I have gotten this when I am using something that is undefined or doesn't have a value. Are you sure you want: self.connection.connection.converter._datetime_to_mysql(value)? Is there one too many ".connection" s there? On Tue, Jul 8, 2014 at 1:12 AM,

django.core.exceptions.AppRegistryNotReady

2014-07-08 Thread Marc Aymerich
Hi, Wanted to try 1.7 and I'm hit by an exception that don't know how to solve :) running current 1.7.x branch, here full runserver output: orchestra@orchestra:~/panel$ python manage.py runserver 0.0.0.0: /usr/local/lib/python2.7/dist-packages/djcelery/managers.py:77:

Re: SWFL Django users

2014-07-08 Thread Larry Martell
On Tue, Jul 8, 2014 at 12:07 AM, Janelle O'Dea wrote: > Anybody in Southwest Florida who uses Django? I am in Venice. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: Serving static files from another directory rather than "statics"

2014-07-08 Thread mulianto
Hi, Why not generate the new file under static folder. I use compressor but for big js css need time for generate the compress minify file when on production. Sent from my iPhone On 8 Jul 2014, at 10:35, carlos wrote: > Hi, maybe you need use this third party

Re: DateTimeField always returns None

2014-07-08 Thread William Granli
Changing the name of 'date' did not fix the issue. I have ended up changing the database field from DATETIME to TEXTFIELD. Not a good fix, but since there seems to be no clear solution to this I went ahead. It works at least. I have tried the Q-based queries too, by the way. (And other ways

Re: Python 3 Usage

2014-07-08 Thread Andreas Kuhne
The main problem that I have seen is that there are some plugins that don't support Python 3 (the biggest issue we are having is django-storages and boto). You can of course patch the plugins yourself and contact the authors to make a pull request. Often the difference is not that great. Regards,

Re: django beginner

2014-07-08 Thread ngangsia akumbo
yes -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to

Re: Full text search available on PostgreSQL?

2014-07-08 Thread Johannes Schneider
you could have a look at djorm-ext-pgfulltex. bg, Johannes On 28.06.2014 18:15, Bastian Kuberek wrote: Hi, Just saw that django.contrib.admin.ModelAdmin.search_fields full text search