Re: Dumb newbie question

2012-02-17 Thread Babatunde Akinyanmi
I'm also a noob. If I had code that would use the same models then I would keep everything inside one app but divide them into modules On 2/17/12, Bob Carlson wrote: > I'm well into beginning building my actual app after going through the > tutorial, > but I have no feel yet for the answer to thi

Re: Dumb newbie question

2012-02-17 Thread Furbee
Yes, they just need to import the models from the module that they need. Be aware, of circular imports, though. That is when one module imports from another which also imports from the first one. Check the imports at the top to make sure the module from which you are importing classes, modles, defs

Dumb newbie question

2012-02-17 Thread Bob Carlson
I'm well into beginning building my actual app after going through the tutorial, but I have no feel yet for the answer to this question. Can apps share a set of models? My application neatly divides into three pieces, but all the pieces share the same data. Should these be 3 apps or 1? Can apps

Re: Newbie question on forms using ChoiceField and "choices" field...

2011-12-15 Thread Tom Evans
On Thu, Dec 15, 2011 at 8:27 PM, J. Marc Edwards wrote: > OK...I have the following model and form. > > class CmdString(models.Model): > >     name    = models.CharField(max_length=50) >     cmd = models.CharField(max_length=200) >     eda_app = models.OneToOneField(EDA_App, primary_key=True)

Newbie question on forms using ChoiceField and "choices" field...

2011-12-15 Thread J. Marc Edwards
OK...I have the following model and form. *class CmdString(models.Model): name= models.CharField(max_length=50) cmd = models.CharField(max_length=200) eda_app = models.OneToOneField(EDA_App, primary_key=True) def __unicode__(self): return self.cmd * *cl

Re: Newbie question - if I add "on delete cascade" to a foreign key on my MySQL db

2011-12-13 Thread Mike
Many thanks Jacob! On Dec 13, 8:57 pm, Jacob Kaplan-Moss wrote: > On Tue, Dec 13, 2011 at 7:22 PM, Mike wrote: > > will I still be able to use Django's ORM? > > Yes, please > seehttps://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.mo... > and in particular DO_NOTHING. > > Jacob -

Re: Newbie question - if I add "on delete cascade" to a foreign key on my MySQL db

2011-12-13 Thread Jacob Kaplan-Moss
On Tue, Dec 13, 2011 at 7:22 PM, Mike wrote: > will I still be able to use Django's ORM? Yes, please see https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.on_delete and in particular DO_NOTHING. Jacob -- You received this message because you are subscribed to

Newbie question - if I add "on delete cascade" to a foreign key on my MySQL db

2011-12-13 Thread Mike
will I still be able to use Django's ORM? TIA -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegrou

Re: Newbie question on re-defining an XML schema in my Django data model...

2011-11-29 Thread Brian Schott
Marc, There is a couple of ways to do this on top of the Django ORM. You probably want to use a many-to-many relationship with an extra index field. https://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships class SingularWorkFlow(models.Model):

Re: Newbie question on re-defining an XML schema in my Django data model...

2011-11-29 Thread Tom Evans
On Tue, Nov 29, 2011 at 3:44 PM, Marc Edwards wrote: > I need some help in resetting my thinking on creating my Django data > model. > > I have previously created an XML schema definition for my data model, > but am now trying to re-create this XML data model in a Django data > model. > > In my XM

Newbie question on re-defining an XML schema in my Django data model...

2011-11-29 Thread Marc Edwards
I need some help in resetting my thinking on creating my Django data model. I have previously created an XML schema definition for my data model, but am now trying to re-create this XML data model in a Django data model. In my XML schema, I had defined "collections" of XML complex types that esse

Re: newbie question on activating the automatic admin

2011-09-15 Thread Babatunde Akinyanmi
Cool On 9/14/11, nara wrote: > Finally! The admin interface worked, when I used the dev version > in a virtualenv. I cleaned every trace of Django in my system, > and I had to compile (requires python-dev package in > Ubuntu) and install MySQLdb into the virtualenv. > > Not sure what exactly was

Re: newbie question on activating the automatic admin

2011-09-14 Thread nara
Finally! The admin interface worked, when I used the dev version in a virtualenv. I cleaned every trace of Django in my system, and I had to compile (requires python-dev package in Ubuntu) and install MySQLdb into the virtualenv. Not sure what exactly was wrong before, but Babatunde's suggestion t

Re: newbie question on activating the automatic admin

2011-09-11 Thread Babatunde Akinyanmi
And reply here if you don't see problems :) On 9/12/11, nara wrote: > ok, i am planning to remove all traces of all django installations > from my > system, and re-install the dev version (and if that still does not > work 3.1) > under virtualenv. > > Will repost here if I still see probl

Re: newbie question on activating the automatic admin

2011-09-11 Thread nara
ok, i am planning to remove all traces of all django installations from my system, and re-install the dev version (and if that still does not work 3.1) under virtualenv. Will repost here if I still see problems. Nara On Sep 10, 7:16 pm, Babatunde Akinyanmi wrote: > Hi nara, > Please post the de

Re: newbie question on activating the automatic admin

2011-09-10 Thread Babatunde Akinyanmi
Hi nara, Please post the debug output you get when you try to view the admin page from your browser. Meanwhile, while switching versions of django, you have to make sure you remove completely every file from the old version. Failure to do that will break django. On 9/10/11, nara wrote: > ok, I s

Re: newbie question on activating the automatic admin

2011-09-10 Thread nara
ok, I switched to the 1.3.1 released version of Django, and also tried Python2.6 instead of Python2.7 on the dev version of Django. Things are still majorly broken, see the following in the django shell on a fresh startproject, I could not import even the top level django module. Then, I set PYTHON

Re: newbie question on activating the automatic admin

2011-09-10 Thread nara
I'll get through this yet :) I tried the commands you have under the django shell, and I got 'example.com' on the django.Site query, and not an error. Also, interestingly, within the shell, I don't see django on the sys.path at all (shown below), but I do see my project mblog. This could be the ca

Re: newbie question on activating the automatic admin

2011-09-09 Thread Babatunde Akinyanmi
Hi nara, This error is normally thrown when the sites app is being used in a django project. I think it can also occur if the sites tables in the database is not properly created during django-admin startproject. Someone else reported that he was able to solve the problem by using a user name witho

Re: newbie question on activating the automatic admin

2011-09-09 Thread nara
yes, admin is in INSTALLED_APPS. BTW, the basic site works fine if I turn off all admin. admin is not strictly necessary, it is just a nicety. One strange thing though: I have had to set PYTHONPATH and explicitly set it to ~/mblog:~/mblog/apps:~/mblog/apps/myblog, even though __init__.py files exi

Re: newbie question on activating the automatic admin

2011-09-09 Thread Casey Greene
Is admin in INSTALLED_APPS? https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-INSTALLED_APPS Casey On 09/09/2011 07:04 PM, nara wrote: Hi, I am a newbie, and I am trying a very basic blog site to get familiar with the latest development release. I followed the directions in the

newbie question on activating the automatic admin

2011-09-09 Thread nara
Hi, I am a newbie, and I am trying a very basic blog site to get familiar with the latest development release. I followed the directions in the tutorial (part 2) to try and get the automatic admin going. However, here is what I get on the url localhost:8000/admin/ DoesNotExist at /admin/ Site ma

Re: Newbie question, I'm having difficulty getting the admin panel to work!

2011-06-24 Thread Rishi
Thanks guys, I'll try this and get back to you! Rishi -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Hu2mFOFBWckJ. To post to this group, send email to d

Re: Newbie question, I'm having difficulty getting the admin panel to work!

2011-06-24 Thread Eiji Kobayashi
Ah, yes. You may be right. It may be a simple problem with a simple answer. Maybe I just over complicated things with too much words and explanation. Eiji On Fri, Jun 24, 2011 at 6:11 PM, Nan wrote: > > The sporadicness may have to do with the way it's being served -- that > happens to me when

Re: Newbie question, I'm having difficulty getting the admin panel to work!

2011-06-24 Thread Nan
The sporadicness may have to do with the way it's being served -- that happens to me when running via FCGI if I save a change but don't restart the process. Depending on your server setup, that may mean touching the WSGI file or touching another special file or restarting your Apache process or s

Re: Newbie question, I'm having difficulty getting the admin panel to work!

2011-06-24 Thread Eiji Kobayashi
Hi Rishi, STATIC_ROOT, STATIC_URL, etc. are somewhat new additions to Django. I have troubles with the documentation myself because the new ones describing them are in English :). But I think everything that they considered static - javascript, css, img, and other media were to be inside a directo

Re: Newbie question, I'm having difficulty getting the admin panel to work!

2011-06-24 Thread Rishi
Thanks for trying to help me out, Eiji. I tried adding the Alias in the apache configuration file and changing settings.py, but to no avail. I still get the same error. What happens, specifically, is that when I go to the django project page, everything seems to work, I get the same light blue l

Re: Newbie question, I'm having difficulty getting the admin panel to work!

2011-06-23 Thread Eiji Kobayashi
Hello, I'm not exactly sure about your other problems, but the problem with not getting any styles seem to me like you didn't set your ADMIN_MEDIA_PREFIX correctly in your settings file and/or your web server configuration file. You must let it know how to access all the javascript, css and image

Newbie question, I'm having difficulty getting the admin panel to work!

2011-06-23 Thread Rishi
Hi everyone, I've just started using Django, and everything has been smooth sailing up until this part. I added 'django.contrib.admin' in settings.py for installed apps, and changed urls.py to allow for the admin page to work. However, the admin page works erratically. That is, at some points no ma

Re: Django Newbie Question (Exception Type: TypeError, Value: argument of type 'NoneType' is not iterable)

2011-05-24 Thread Alexandra
Ok I actually just figured it out. My issue was that I was calling the function instead of the actual instance of the form. I got confused because the variables were named almost identically. On May 24, 8:27 pm, Alexandra wrote: > Hi All, > > I am somewhat new to Django, although I have been prog

Django Newbie Question (Exception Type: TypeError, Value: argument of type 'NoneType' is not iterable)

2011-05-24 Thread Alexandra
Hi All, I am somewhat new to Django, although I have been programming in Python for a while. I installed Pinax and have been working on a site from one of the starter templates, and have an error I can't seem to wrap my head around. Exception Type: TypeError at /models/add Exception Value: argume

Re: Newbie question - modelform / dropdown list

2011-03-31 Thread Daniel Roseman
On Thursday, March 31, 2011 12:43:32 PM UTC+1, rune wrote: > > Hi all, > > I just started with Django, done the tutorial, now I'd like to create > a page were users can put > requests in a queue. Lets say the fields to display are user, date, > filepath, date to load. > I can create this with

Re: Newbie question - modelform / dropdown list

2011-03-31 Thread Kenneth Gonsalves
On Thu, 2011-03-31 at 04:43 -0700, rune wrote: > I just started with Django, done the tutorial, now I'd like to create > a page were users can put > requests in a queue. Lets say the fields to display are user, date, > filepath, date to load. > I can create this with a modelform, but I'd like the u

Newbie question - modelform / dropdown list

2011-03-31 Thread rune
Hi all, I just started with Django, done the tutorial, now I'd like to create a page were users can put requests in a queue. Lets say the fields to display are user, date, filepath, date to load. I can create this with a modelform, but I'd like the user field to be a drop down list with values, re

Re: newbie question regarding passwords and service requests

2011-03-23 Thread Shawn Milochik
It's not possible to have a system that can access another, yet block access to the other system if hacked. This is why it is impossible to have unbreakable encryption in consumer devices. You can't make a Blu-Ray player that doesn't contain the capability to decrypt Blu-Ray discs. Therefore, all

newbie question regarding passwords and service requests

2011-03-23 Thread Danny Shevitz
Howdy, This is a newbie question on best practices of web design and django. I have the following problem: Imagine my django app is wonderful and secure and uses the auth module and all that. I need to run some other web service provided by other developers in my company on another platform

Re: Newbie Question

2011-02-14 Thread Kenneth Gonsalves
On Mon, 2011-02-14 at 02:14 -0800, zedkil wrote: > Thank you very much for your kind explanations. > > Another question on the admin UI, can I customize the user page in the > admin > gui and add him some capabilities do some actions like get statistics > see > some graph and so on, and do this

Re: Newbie Question

2011-02-14 Thread zedkil
Thank you very much for your kind explanations. Another question on the admin UI, can I customize the user page in the admin gui and add him some capabilities do some actions like get statistics see some graph and so on, and do this customization per level, or this is out of scope for the admin

Re: Newbie Question

2011-02-13 Thread Cal Leeming [Simplicity Media Ltd]
Okay er, there's a group model, where a group can belong to a parent group, and then the permissions for the children are inherited from the parent object, with the permissions specified on the child object being the overrides. I am looking to re-write this soon, so I will ask the client if they w

Re: Newbie Question

2011-02-13 Thread zedkil
Could you elaborate please ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more o

Re: Newbie Question

2011-02-13 Thread Cal Leeming [Simplicity Media Ltd]
-repost- Hey, I did this *exact* same thing for a requirement of one of our clients. We used an inherited permissions model, but it will require you to make substantial changes to the authentication system, and doesn't just work "out of the box". Best thing to do is to write it up from scratch, t

Newbie Question

2011-02-13 Thread zedkil
Hi all, I'm not sure if its the right place to ask, so if it not can someone direct me to the right place. I'm newbie to django I'm planning new web App and I've some question since I'm not sure if what i'm planning is possible at all. Short description of my app: I have hierarchy of: Company

Re: Newbie Question

2011-02-13 Thread Cal Leeming [Simplicity Media Ltd]
Hey, I did this *exact* same thing for a requirement of one of our clients. We used an inherited permissions model, but it will require you to make substantial changes to the authentication system, and doesn't just work "out of the box". Best thing to do is to write it up from scratch, then monke

Newbie Question

2011-02-13 Thread meni
I'm planning new web App. Short description of my app: I have hierarchy of: Company then under it the company subsidiary and each subsidiary as few clients each client has few sites and in each site I have few Apps. Company-> subsidiary1-> ClientX |

Re: newbie question about paths

2011-01-31 Thread bruno desthuilliers
On 29 jan, 17:00, Brian Craft wrote: > Suppose the project is /var/www/django/project. Following the django > with wsgi docs, you would add /var/www/django to the path, and > DJANGO_SETTINGS_MODULE would be project.settings. > > However, in that case, the path scheme described in the tutorial > d

newbie question about paths

2011-01-29 Thread Brian Craft
Suppose the project is /var/www/django/project. Following the django with wsgi docs, you would add /var/www/django to the path, and DJANGO_SETTINGS_MODULE would be project.settings. However, in that case, the path scheme described in the tutorial doesn't work, e.g. setting up admin.py for Polls as

newbie question: Error while using tddspry module

2010-12-13 Thread girish shabadimath
Hi all, Im working on djnago 1.2 i need to write tests for django models, what actually do i need to test in models? and also i found this link from google - http://playpauseandstop.github.com/tddspry/writing_tests.html#database-tests-with-databasetestcase

Re: Newbie question: many-to-many model creation

2010-12-10 Thread Marcos Moyano
http://www.djangoproject.com/documentation/models/many_to_many/ Rgds, Marcos On Fri, Dec 10, 2010 at 8:54 AM, girish shabadimath < girishmss.1...@gmail.com> wrote: > Thanks for the reply,, > Here are my models > > class Checkers(models.Model): >name = models.CharField(max_length = 100) >

Re: Newbie question: many-to-many model creation

2010-12-10 Thread girish shabadimath
Thanks for the reply,, Here are my models class Checkers(models.Model): name = models.CharField(max_length = 100) weight = models.FloatField(default = 0) desc = models.CharField(max_length = 1000) class PrepCheckers(models.Model): name = models.CharField(max_length = 150) ABCchecke

Re: Newbie question: many-to-many model creation

2010-12-10 Thread Kenneth Gonsalves
On Fri, 2010-12-10 at 16:55 +0530, girish shabadimath wrote: > im new to django > > im using django 1.2 > i have a model that has one many-to-many relationship field > > How to create a object of this model ? > > what to pass for the field that has many-to-many relationship? please give some d

Newbie question: many-to-many model creation

2010-12-10 Thread girish shabadimath
Hi all, im new to django im using django 1.2 i have a model that has one many-to-many relationship field How to create a object of this model ? what to pass for the field that has many-to-many relationship? -- Girish M S -- You received this message because you are subscribed to the Google G

Re: newbie question: @login_required, can't get it to work

2010-12-09 Thread Charlietuna
Thank you sooo much. That was great. I was using a book base on Django .96. I couldn't fully understand the online documentation. You saved me a great deal of time. Steve On Dec 8, 11:20 pm, robin nanola wrote: > on your settings.py you can just add  LOGIN_URL = '/login/' > > On Thu, De

Re: newbie question: @login_required, can't get it to work

2010-12-09 Thread Charlietuna
Thank you sooo much. That was great. I was using a book base on Django .96. I couldn't fully understand the online documentation. You saved me a great deal of time. Steve On Dec 8, 11:22 pm, Martin Melin wrote: > On Thu, Dec 9, 2010 at 8:04 AM, Charlietuna wrote: > > Hi All, > > > I'm

Re: newbie question: @login_required, can't get it to work

2010-12-08 Thread Martin Melin
On Thu, Dec 9, 2010 at 8:04 AM, Charlietuna wrote: > Hi All, > > I'm a newbie. I would like to use the @login_required decorator, but I > don't want to redirect to the standard default accounts/login. I would > like to redirect to '/login/' > > The book says add the following to the end of the set

Re: newbie question: @login_required, can't get it to work

2010-12-08 Thread robin nanola
on your settings.py you can just add LOGIN_URL = '/login/' On Thu, Dec 9, 2010 at 3:04 PM, Charlietuna wrote: > Hi All, > > I'm a newbie. I would like to use the @login_required decorator, but I > don't want to redirect to the standard default accounts/login. I would > like to redirect to '/log

newbie question: @login_required, can't get it to work

2010-12-08 Thread Charlietuna
Hi All, I'm a newbie. I would like to use the @login_required decorator, but I don't want to redirect to the standard default accounts/login. I would like to redirect to '/login/' The book says add the following to the end of the settings.py file.: import django.contrib.auth django.contrib.auth.

Re: Newbie question: How should I structure my very simple project / app?

2010-10-20 Thread wawa wawawa
Just a quick response to thank everyone for the suggestions. I'll let you all know how I get on. ;-) (Actually, you'll probably guess from the quality or absurdity of my questions that may come up over the coming days / weeks) WZ On 20 October 2010 00:01, timc3 wrote: > Take a look at: > > h

Re: Newbie question: How should I structure my very simple project / app?

2010-10-19 Thread timc3
Take a look at: http://lincolnloop.com/django-best-practices/projects/layout.html After you have done the tutorials and stuff. Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups

Re: Newbie question: How should I structure my very simple project / app?

2010-10-19 Thread Mike Seidle
Waza - Django should be ideal for your project. It should be a snap once you figure out how Django's put together. *Skip Do as others have suggested and do the tutorial. It will help you better understand MVC. * Skip the AJAX stuff unitl you have the above figured out. The magic ponies some

Re: Newbie question: How should I structure my very simple project / app?

2010-10-19 Thread wawa wawawa
Hi Javier, Many thanks for your comments. On 19 October 2010 15:57, Javier Guerra Giraldez wrote: > first and foremost, yes, you have to read the manual, and do the > tutorial. ideally, you should forget about your specific project > while doing it. it's not too long, should take a few hours

Re: Newbie question: How should I structure my very simple project / app?

2010-10-19 Thread Javier Guerra Giraldez
On Tue, Oct 19, 2010 at 6:52 AM, wawa wawawa wrote: > So, given this paucity of requirements and the horrendously unclear > explanation above, what suggestions might you lot have? (Apart from "RTFM", > of course!) first and foremost, yes, you have to read the manual, and do the tutorial. ideally

Newbie question: How should I structure my very simple project / app?

2010-10-19 Thread wawa wawawa
Hi All, I'm new to Django (and to be honest, a little bit hazy on the subtleties of MVC, but if you don't try, you don't learn). I want to create a simple web frontend for a Python program I have already (mostly) written and I'd like to use Django (which may be overkill... not sure). - Users hav

Re: newbie question

2010-10-04 Thread mark jason
thanks guys mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, vis

Re: newbie question

2010-10-04 Thread Chris Lawlor
Also, one way to integrate scripts like this is to write them as django management commands, so you can run them as 'python manage.py yourcommand'. Management commands are pretty well documented in the django docs, you should have no trouble finding enough info to get started. Again, good luck C

newbie question

2010-10-04 Thread mark jason
hi I am quite new to django ..I have written a web app that takes user input and adds customer details to db. I store customer name,email ,a datetime value for each customer. When the application starts ,I want a utility program to check the db and if system datetime matches the datetime value

Re: newbie question

2010-10-04 Thread Martin Melin
On Mon, Oct 4, 2010 at 8:25 AM, mark jason wrote: > hi > I am quite new to django ..I  have written a web app that takes user > input  and adds  customer details to db. > I store customer name,email ,a datetime value for each customer. > > When the application starts ,I want a utility program to c

Re: Newbie question: can foreign key fields used as search fields on admin page?

2010-08-26 Thread Kenneth Gonsalves
On Wed, 2010-08-25 at 21:49 -0700, Joe Z wrote: > class BookAdmin(admin.ModelAdmin): > list_display = ('title', 'author', 'publisher') > search_fields = ('first_name', 'last_name') > > Is it possible to add 'publisher' into search_fields so that in admin > page books showed can be narrow d

Re: Newbie question: can foreign key fields used as search fields on admin page?

2010-08-25 Thread Dennis Kaarsemaker
On wo, 2010-08-25 at 21:49 -0700, Joe Z wrote: > Is it possible to add 'publisher' into search_fields so that in admin > page books showed can be narrow down by a specific publisher? I tried > it but got the following exception: Not as such, but you can add publisher__name (assuming publisher has

Newbie question: can foreign key fields used as search fields on admin page?

2010-08-25 Thread Joe Z
On http://www.djangobook.com/en/2.0/chapter06/ in models.py: class Book(models.Model): title = models.CharField(max_length=100) authors = models.ManyToManyField(Author) publisher = models.ForeignKey(Publisher) publication_date = models.DateField() def __unicode__(self):

Re: Newbie question about url and seo

2010-08-20 Thread Karim Gorjux
On Fri, Aug 20, 2010 at 18:19, David Euzen wrote: > Hello, > > you should think of it in terms of ressource, not of file. URLs are > about ressources not about files even if sometimes ressources are > files. Thanks for your answer. Was very useful! Have a nice day. -- Karim Gojux www.karimblog

Re: Newbie question about url and seo

2010-08-20 Thread David Euzen
Hello, you should think of it in terms of ressource, not of file. URLs are about ressources not about files even if sometimes ressources are files. Django's way to build URLs is flexible. URLs built this way can make much more sense that URLs built upon file path. ie www.yourdomain.com/articles/2

Newbie question about url and seo

2010-08-20 Thread Karim Gorjux
Hi all! This is my first post here in the list, I'm new in django and python but I really found it fun and exciting so here we are! My first question is pretty simple. I noted that the url I create using urls.py are cleaned and pretty but there is no index.html or simila. It seems that every url po

Re: MySQL Newbie question

2010-08-17 Thread Xavier Ordoquy
Hi, On top of the package found on mysql, you have to check that mysql_config is in the path (it is provided by the package). In a shell just run the command. If you just installed the mysql package for osx, you will want to open a new shell to get an updated path. Regards, Xavier. Le 16 août

Re: MySQL Newbie question

2010-08-16 Thread David
mysql_config is usually part of the MySQL client library (not to be confused with the Python/MySQL library). You can get the full mysql package from http://dev.mysql.com/downloads/mysql On Aug 16, 12:21 pm, Bradley Hintze wrote: > Hi all, > > I'm trying to install MySQL for Python on Snow Leopar

MySQL Newbie question

2010-08-16 Thread Bradley Hintze
Hi all, I'm trying to install MySQL for Python on Snow Leopard and I get : sh: mysql_config: command not found Traceback (most recent call last): File "setup.py", line 15, in metadata, options = get_config() File "/Users/bradleyhintze/Desktop/MySQL-python-1.2.3/setup_posix.py", line 43,

Re: Newbie Question: Syntax Error - Form Class, trying to set e-mail field to required=False

2010-07-22 Thread strayhand
S. Thanks! I'm completely new to Python (guess I should have paid more attention to variable names). I might have tried removed the dash sooner but I was following how it was typed in the book. I'll have to file a type with the author. Thanks again. On Jul 22, 5:56 am, Simon Holness wrote: > "e-

Re: Newbie Question: Syntax Error - Form Class, trying to set e-mail field to required=False

2010-07-22 Thread Simon Holness
"e-mail" can't have a hyphen in it. Python thinks you're "assigning" to the operation e - mail just type into a shell to see. e-mail = "blah" SyntaxError: can't assign to operator rename to e_mail or email or something and you should be good to go On 22 July 2010 06:10, strayhand wrote: > I ap

Newbie Question: Syntax Error - Form Class, trying to set e-mail field to required=False

2010-07-22 Thread strayhand
I apologize in advance if i'm posting this question in the wrong area. I'm learning about django's form class in "The Definitive Guide To Django" and for some reason that's beyond me I keep getting a syntax error. I've been over my code a dozen times and I'm hoping that someone can point me in the

Newbie Question - django-jython - how to "run" the app?

2010-07-01 Thread Victor Hooi
heya, I've trying to get my Django app to run on a Tomcat 5.x server, using django-jython. I'm a bit of a newbie in the Java/Tomcat world though. Firstly, I'm currently using PostgreSQL. However, to make things easier on the target server, I was just going to use SQLite3 - the app will only be us

Re: Newbie Question about django-admin.py startproject

2010-06-22 Thread Sam Lai
'import django' is a command for the Python interpreter. 'django-admin.py startproject testsite' is a standard shell command. Just open up a console window, and type the latter into it. If it doesn't work, it means your PATH variable doesn't contain the Django sources. On 23 June 2010 15:27, Jac

Newbie Question about django-admin.py startproject

2010-06-22 Thread Jacob Shiach
Ok, I am trying to start a project with Django and failing miserably. I open Python IDLE, Type "import django" then type "django-admin.py startproject testsite" and get a SyntaxError:invalid syntax. Does anyone know where I am going wrong here? Note: I installed both Python 2.6.5 and Djang 1.1.

Re: Newbie Question? Why I can not use _set?

2010-05-23 Thread Daemoneye
Sorry My opera mail downIt makes sth wrong to send out 3 mails I'm too late to stop it Thanks for helping me 在 Mon, 24 May 2010 02:08:34 +0800,Daniel Roseman 写道: On May 23, 6:39 pm, 伟泓 徐 wrote: class People(models.Model): GenderChoice=( (u'M', u'Male'), (u'F', u'F

Re: Newbie Question? Why I can not use _set?

2010-05-23 Thread Daniel Roseman
On May 23, 6:39 pm, 伟泓 徐 wrote: > class People(models.Model): >     GenderChoice=( >         (u'M', u'Male'), >         (u'F', u'Female'), >     ) >     PositionChoice=( >         (u'S',u'Student'), >         (u'A',u'Admin'), >     ) >     Schoolnum=models.IntegerField(primary_key=True) >     Gend

Newbie question about _set

2010-05-23 Thread Daemoneye
class People(models.Model): GenderChoice=( (u'M', u'Male'), (u'F', u'Female'), ) PositionChoice=( (u'S',u'Student'), (u'A',u'Admin'), ) Schoolnum=models.IntegerField(primary_key=True) Gender=models.CharField(max_length=100,choices=GenderCh

Newbie Question? Why I can not use _set?

2010-05-23 Thread 伟泓 徐
class People(models.Model): GenderChoice=( (u'M', u'Male'), (u'F', u'Female'), ) PositionChoice=( (u'S',u'Student'), (u'A',u'Admin'), ) Schoolnum=models.IntegerField(primary_key=True) Gender=models.CharField(max_length=100,choices=GenderChoic

Re: Newbie question regarding User and Anonymous user

2010-04-06 Thread zenr
In my case, I store the instance of the User class along with some other information. If the user is logged in, I used request.user to get the instance and store it. The problem happens when the user is Anonymous. I finally fixed the problem by checking if the user is authenticated and setting the

Re: Newbie question regarding User and Anonymous user

2010-04-06 Thread Karen Tracey
On Mon, Apr 5, 2010 at 3:32 PM, zenr wrote: > In my application, I used django-registration to allow users to > login. Authenticated users can use all features of the site while > Anonymous user should be able to use some portion of the site. When > django makes a request for an authenticated us

Newbie question regarding User and Anonymous user

2010-04-05 Thread zenr
Hi In my application, I used django-registration to allow users to login. Authenticated users can use all features of the site while Anonymous user should be able to use some portion of the site. When django makes a request for an authenticated user, it creates a request.user object that is deri

Re: Newbie question: value inequality in Manager Method?

2010-03-19 Thread BobAalsma
Thanks to both: I felt I was missing something but couldn't find where to look :-) Bob On Mar 19, 3:55 pm, Bill Freeman wrote: > To expand on DR's answer slightly, the '=' in 'filter(crcWaarde=0)' is > not a comparison > operator.  All arguments to filter need to be of the form > "'leagal_identi

Re: Newbie question: value inequality in Manager Method?

2010-03-19 Thread Bill Freeman
To expand on DR's answer slightly, the '=' in 'filter(crcWaarde=0)' is not a comparison operator. All arguments to filter need to be of the form "'leagal_identifier'=value". This is python syntax, nothing to do with django. Think of this '=' as being more akin to assignment. The answer to your

Re: Newbie question: value inequality in Manager Method?

2010-03-19 Thread Daniel Roseman
On Mar 19, 1:22 pm, BobAalsma wrote: > In models.py, when I use > class GevondenManager(models.Manager): >         def get_query_set(self): >                 return > super(GevondenManager,self).get_query_set().filter(crcWaarde > = 0) > I get proper answers. > > However, I want to filter on "not

Newbie question: value inequality in Manager Method?

2010-03-19 Thread BobAalsma
In models.py, when I use class GevondenManager(models.Manager): def get_query_set(self): return super(GevondenManager,self).get_query_set().filter(crcWaarde = 0) I get proper answers. However, I want to filter on "not equal to" and this does not seem to work. How to procee

Re: Newbie question: upgrade to python 2.6: cannot (re)connect to Django?

2010-03-10 Thread BobAalsma
YES! Thank you very much. Amazing how simple things can be blocking if the context is missing ;-) Regards, Bob On Mar 10, 11:12 am, Jirka Vejrazka wrote: > Hi Bob, > > > MacPro1:Downloads$ ls > > Django-1.1.1.tar > >   You have not unpacked the Django archive. You need to run: > $ tar xf Django

Re: Newbie question: upgrade to python 2.6: cannot (re)connect to Django?

2010-03-10 Thread Jirka Vejrazka
Hi Bob, > MacPro1:Downloads$ ls > Django-1.1.1.tar You have not unpacked the Django archive. You need to run: $ tar xf Django-1.1.1.tar It will create a subdirectory (named "Django-1.1.1" probably), then you need to move to that subdirectory $ cd Django-1.1.1 and then run the $ python set

Newbie question: upgrade to python 2.6: cannot (re)connect to Django?

2010-03-09 Thread BobAalsma
On this machine (MacPro, OS X 10.5.8) I have installed and started working with Django. I wanted to upgrade to Pyhton 2.6. Installed from http://www.python.org/download/ (downloaded 2.6.4 Mac Installer Disk Image). Seems to work properly. Then wanted to use Django again. Can't seem to connect to th

Re: Newbie Question - How to Get Javascript Loaded?

2010-02-03 Thread x13
Did you configure your Django webapp (settings.py) for serving static files? Take a look here: http://docs.djangoproject.com/en/dev/howto/static-files/ May be this resolve your problem. x13 On Feb 3, 8:02 pm, jpuopolo wrote: > Hi, All... > > Experienced engineer, new to Django. > > In a sampl

Re: Newbie Question - How to Get Javascript Loaded?

2010-02-03 Thread cootetom
Hi John, Django doesn't server static files. It leaves that up to the web server software. Have a read here http://docs.djangoproject.com/en/dev/howto/static-files/ Most people have a condition URL for serving static files through django whilst in development. In production you can serve through

Newbie Question - How to Get Javascript Loaded?

2010-02-03 Thread jpuopolo
Hi, All... Experienced engineer, new to Django. In a sample Web app that I'm developing, I have a basic template that includes (attempts to) a javascript file: Header Subheader {% block content %} {% endblock %} When this template is rendered, the resulting HTML page contains the script

Re: Newbie question : passing control from one view function to another. I get a function does not return an HttpResponse object error

2010-01-18 Thread harijay
Thanks Karen.. Did not realize that "Running of the end of the code" in python results in returning a None and not the last evaluated expression. I wrote a small test case and realized what you said that without an explicit return , python returns a None even though the evaluated expression retur

Re: Newbie question : passing control from one view function to another. I get a function does not return an HttpResponse object error

2010-01-18 Thread Karen Tracey
On Sun, Jan 17, 2010 at 11:47 PM, Benjamin Welton < benjamin.r.wel...@wmich.edu> wrote: > Since the call structure goes similar to this Django Internals -> > view_func1 -> authenticate_user. That return is required so that the Django > internals see the HttpResponse Class. Without this return al

<    1   2   3   4   5   >