forms

2010-07-19 Thread commonzenpython
hey guys, im trying to make a volunteer form which has several fields, like name, address, and other types of information about the volunteer, and i was wondering how i can make a form that saves the user input in the database (MySQL) , so far i now i have to create a forms.py file in the same dir

GAE + Django Authentication

2010-07-19 Thread Venkatraman S
Hi, Has anyone made inroads into django auth in GAE? I have been Googling around for sometime and havent found a credible link on this. Help would be great. Regards, -V -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: create table

2010-07-19 Thread Ian Lewis
Hi, On Tue, Jul 20, 2010 at 11:42 AM, pengbo xue wrote: > how can I create tables and foreignkey as below information. > > create a user object "models.User" and include kewords like this, > > username: modify the max_length of username to 32,default is 30. > email: > password: > is_staff: fals

Re: URL to specify when accessing subdomains using Django

2010-07-19 Thread nandu
Could someone please help me and answer my question in the last email? Thank you. Nanda On Jul 19, 9:52 pm, nandu wrote: > Dear All, > > I have now set up my subdomains as separate sites using the sites > framework but I have a few queries: > > 1. Does each site really require a separate django

Re: Import Confusion? Forms Confusion? Or just Confusion?

2010-07-19 Thread llanitedave
Thanks, Shawn. I believe the PYTHONPATH is fine, because other views and templates that didn't have forms were working correctly. But you're right about "addSample = sampleEntry(request.POST)" causing the error. I commented out those two lines and the error goes away, and the page displays. I s

Re: Google App Engine error with templates

2010-07-19 Thread Venkatraman S
On Tue, Jul 20, 2010 at 9:57 AM, Tereno wrote: > I'm experiencing this error: Module > "django.template.loaders.filesystem" does not define a "Loader" > callable template source loader > > and I can't figure out why at all. I've placed my templates dir in the > settings file and yet somehow it do

Google App Engine error with templates

2010-07-19 Thread Tereno
Hey there, I'm experiencing this error: Module "django.template.loaders.filesystem" does not define a "Loader" callable template source loader and I can't figure out why at all. I've placed my templates dir in the settings file and yet somehow it doesn't like it at all. Can anyone help me? I'm ru

Re: how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck

2010-07-19 Thread hiwd
Sorry Justin for the troubles I need to resolve that issue by updating the pip requirements (as you saw in the issue ticket on github). Also, thanks for everyone helping Justin out. On Jul 17, 11:10 am, justin jools wrote: > hunted down error > here:http://github.com/montylounge/django-mingu

permalink problem

2010-07-19 Thread vcarney
I'm having a problem getting a permalink to render an absolute url. Here is my template code: {{ post.title }} In models.py I have a Post class with: @models.permalink def get_absolute_url(self): return ('vblog_detail_month_numeric', (), { 'year': self.publish.year,

create table

2010-07-19 Thread pengbo xue
how can I create tables and foreignkey as below information. create a user object "models.User" and include kewords like this, username: modify the max_length of username to 32,default is 30. email: password: is_staff: false is_active: true is_superuser: false create object "profile" for sto

Re: problem with syncing sqlite3.6.22

2010-07-19 Thread john
Thank you for the quick reply. Seems to have worked! On Jul 19, 7:59 pm, Ben Atkin wrote: > I think you misunderstood the part where it said "If the file doesn't exist, > it will automatically be created". It says "file", not "filename". A file > name or path must be given. The file *at the pat

Re: problem with syncing sqlite3.6.22

2010-07-19 Thread Ben Atkin
I think you misunderstood the part where it said "If the file doesn't exist, it will automatically be created". It says "file", not "filename". A file name or path must be given. The file *at the path* doesn't need to exist, but the path needs to be specified. The quickest way to get started is to

problem with syncing sqlite3.6.22

2010-07-19 Thread john
When I run python manage.py syncdb I get the following error. I left the name field blank expecting Django to fill in the file name. Am I miss understanding the Name section of the intro? "NAME -- The name of your database. If you're using SQLite, the database will be a file on your computer; in

Re: Django memory requirements

2010-07-19 Thread Graham Dumpleton
On Jul 19, 11:41 pm, Tereno wrote: > Hi there, > > I have a few questions about Django deployment on production so > hopefully you can help me sort it out. > > Firstly, what's the minimum memory requirements for a Django + Apache > + mod_wsgi setup? It seems like my server ran out of memory when

Signals sent while running custom django-admin commands?

2010-07-19 Thread peppergrower
With Django 1.2.1 I'm finding that signals don't seem to get sent while running a custom manage.py command. Looking at the documentation[1], it looks like this may be the intended behavior; is the documentation saying that _only_ the post_syncdb signal gets sent when running django-admin commands,

Re: should i use django

2010-07-19 Thread jaymzcd
Oh, also, as you sound like you're a coder, the thing I normally try and sell my desktop-side friends to django for web development is that you have the entire python library sitting there for you. You can code however you like, the way you like. You just need to remember that your eventual output

could i set cookie with http 204 (no content) response?

2010-07-19 Thread ihome
Hi, I have one question regarding the set of cookie when we return http 204 code in the http response. If I set the response status code as 204 and also set the cookie in the response header, will the cookie be set on the client side or will this fail and get ignored by the browsers? Any thoughts

Re: should i use django

2010-07-19 Thread jaymzcd
If you dont really need to do anything web specific bar displaying some XML you could use something like cherrypy - its a python framework for building web apps very much from the ground up. That said, it's so easy to use django to handle a few urls and it won't add much overhead so it's a fine cho

Django setup tools

2010-07-19 Thread AdamTemple
Hello, We are a Django shop that built some setup tools to use internally. It saves us tuns of time every week. We FOSS-ified it last week an would love to have some feedback. http://blingnode.com/ , hosted at bitbucket. Here are some features: * Instant Django virtual env setup * Ru

Error when starting server

2010-07-19 Thread Vincent Davis
I am trying to host a django app at http://vprojects.org/pydocweb I think I have the .htaccess and pydocweb.fcgi file right but whn I try to run the server I get an error and I have little idea what the problem is. Thanks Vincent vproj...@vprojects.org [~/.local/lib/python2.6/site-packages/pydocw

Re: Django memory requirements

2010-07-19 Thread Nick Arnett
On Mon, Jul 19, 2010 at 10:01 AM, Tereno wrote: > Web Faction does look like an interesting option. However, looking at > the memory specs, how would I be able to tell if it's sufficient for > at least 2 Django applications? For example, if I got with Shared 1, I > get 80MB (180MB VPS) - I'm assu

Re: what kind i acces from django template variable?

2010-07-19 Thread owidjaya
yes that is what i meant. can i sort the related objects in the template? instead of passing another variable from the views.py other than that what other built in variables can i access from the template? On Jul 19, 11:37 am, Venkatraman S wrote: > On Mon, Jul 19, 2010 at 11:06 PM, owidjaya wro

Re: what kind i acces from django template variable?

2010-07-19 Thread Venkatraman S
On Mon, Jul 19, 2010 at 11:06 PM, owidjaya wrote: > How can i find out what variable is accessible from the template? > You need to pass the result of the query to the template. Or did you mean accessing the 'related' objects from the passed objects to the template? -V -- You received this me

Re: Django memory requirements

2010-07-19 Thread Venkatraman S
On Mon, Jul 19, 2010 at 10:31 PM, Tereno wrote: > Web Faction does look like an interesting option. However, looking at > the memory specs, how would I be able to tell if it's sufficient for > at least 2 Django applications? For example, if I got with Shared 1, I > get 80MB (180MB VPS) - I'm assu

Re: New tutorial added to Django by Example

2010-07-19 Thread Venkatraman S
On Mon, Jul 19, 2010 at 11:46 PM, Rainy wrote: > > >http://LightBird.net/dbe/ > > > > You rock ;) > > A small nit : make the site more search-friendly. Probably, add a few > > keywords/description etc? > > Thanks! Do you mean, to every page? That might > be a bit hard, I'm using Sphinx for si

Re: should i use django

2010-07-19 Thread gary_p
On Jul 16, 9:56 pm, gary_p wrote: > On Jul 16, 7:46 pm, uday wrote: > > > Hi, > > >    I need to design a simple web app that would mostly display data > > from an xml file in different forms(like graphs,charts etc) after some > > processing.I have to do this in two weeks > >    I don't have an

Re: can foreign key fields be empty?

2010-07-19 Thread Emily Rodgers
On Jul 19, 3:00 pm, rmschne wrote: [snip] > The pointer you gave, thanks very much, explains how to set the data > model to allow nulls, which I've done already.  Further, as I > originally mentioned, I'm not using Django to control data entry, so > the None=True in the data model doesn't really

Re: New tutorial added to Django by Example

2010-07-19 Thread Rainy
On Jul 19, 1:49 pm, Venkatraman S wrote: > On Mon, Jul 19, 2010 at 11:06 PM, Rainy wrote: > > I've added a new tutorial: A Simple Forum to my Django by Example > > site.  As always, feedback is appreciated. > > >    http://LightBird.net/dbe/ > > You rock ;) > A small nit : make the site more se

Re: New tutorial added to Django by Example

2010-07-19 Thread Venkatraman S
On Mon, Jul 19, 2010 at 11:06 PM, Rainy wrote: > I've added a new tutorial: A Simple Forum to my Django by Example > site. As always, feedback is appreciated. > >http://LightBird.net/dbe/ > You rock ;) A small nit : make the site more search-friendly. Probably, add a few keywords/descripti

Viewing user profile fields in the admin

2010-07-19 Thread Colleen A Josephson
I have a user profile to collect and store additional information about my users. I would like to be able to view (and sort by) these attributes when I look at a list of my users in the admin. With the way my admin.py is written now, I can see the addition attributes when I create/modify an ind

what kind i acces from django template variable?

2010-07-19 Thread owidjaya
Hi All, How can i find out what variable is accessible from the template? If I have 2 models Model A: Name = text Model B: Name = text a = ForeignKey(A) how can i order the list of "objectA.b_set.all" from the template? -- You received this message because you are subscribed to the Google

New tutorial added to Django by Example

2010-07-19 Thread Rainy
I've added a new tutorial: A Simple Forum to my Django by Example site. As always, feedback is appreciated. http://LightBird.net/dbe/ -ak -- 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...@

Re: Which Python are people using on OSX?

2010-07-19 Thread Shawn Milochik
I definitely prefer to compile and altinstall Python or install it somewhere in my home directory, then use virtualenv for all my Django and Python projects. I'm currently using 2.6.5 and 2.7 for my Django projects, without interfering with any OS X defaults. As has been mentioned you'll need Xco

Re: Which Python are people using on OSX?

2010-07-19 Thread Steve Holden
And don't consider replacing the OS X standard Python with your own, as there is no guarantee that any other version will run standard OS X functionality. regards Steve On 2/6/2009 2:05 PM, Graham Dumpleton wrote: > > > > On Feb 6, 9:27 pm, "Adam Radestock" wrote: >> I've been using Python o

Re: Django memory requirements

2010-07-19 Thread Tereno
Web Faction does look like an interesting option. However, looking at the memory specs, how would I be able to tell if it's sufficient for at least 2 Django applications? For example, if I got with Shared 1, I get 80MB (180MB VPS) - I'm assuming that's not going to be enough right? Of course it doe

Re: URL to specify when accessing subdomains using Django

2010-07-19 Thread nandu
Dear All, I have now set up my subdomains as separate sites using the sites framework but I have a few queries: 1. Does each site really require a separate django instance or can I run all the subdomains on one instance? I have seven subdomains and running seven django instances seems wasteful.

How can you use RadioSelect widget in modelform?

2010-07-19 Thread rupert
Hello Django Users! I am trying to implement a form that uses the Radio select widget so users can choose from 5 available choices. Does anyone know how I can implement this using ModelForm? I have provided code snippets at the bottom, and the choices are in models.py (RESPONDANT_CHOICES = ('Very

Re: Import Confusion? Forms Confusion? Or just Confusion?

2010-07-19 Thread Shawn Milochik
> > > When I comment out the import views above, it gives me the following > error: > > Exception Type: NameError at /QC_THISSS_01/samples/create/ > Exception Value: name 'request' is not defined > > > This is because when you import the file it attempts to actually execute the line "addSample = sa

Re: How can I program multiple drop-down menus at one time by Django?

2010-07-19 Thread Boyle Yang
Thanks very much! This is solved by SelectDateWidget. Boyle Yang 2010/7/19 vjimw > I think you would want to make a custom widget for the birthday field > in your model. > > http://docs.djangoproject.com/en/dev/ref/forms/widgets/#customizing-widget-instances > > You can then set up your form in

Re: URL problem

2010-07-19 Thread Stephan Huiser
Many thanks, that did the trick! On 07/19/2010 03:44 PM, Tim Sawyer wrote: I think the problem is your regular expression: ^(?P\d{4})/(?P[a-z]{3})/(?P\w{1,2})/(?P\w+)/$ This says - four digits for a year (2010 - ok) - slash - three letters from a-z for month (jul - ok) - slash - one or two let

Import Confusion? Forms Confusion? Or just Confusion?

2010-07-19 Thread llanitedave
I'm trying to set up a simple modelform. I have a projects with a models.py, a views.py, a urls.py, and a forms.py. All of these are in a single directory. My urls.py is set up like so: urlpatterns = patterns('myProject.views', (r'^$', 'intro'), ... (r'^samples/query/$', 'sample_quer

Re: how to develop cms on django

2010-07-19 Thread Joao Silva
This is why i like a lot the django community. It's leaders set and lead by example well done Mr Russ Magee. With regards to the topic in hand just do it. Build a CMS it's a great learning exercise but you have time constraints go for Django-cms. Good luck. On Jul 19, 1:00 pm, Russell Keith-Ma

Re: Django memory requirements

2010-07-19 Thread David De La Harpe Golden
On 19/07/10 14:41, Tereno wrote: > Hi there, > > I have a few questions about Django deployment on production so > hopefully you can help me sort it out. > > Firstly, what's the minimum memory requirements for a Django + Apache > + mod_wsgi setup? It seems like my server ran out of memory when I

Re: Django memory requirements

2010-07-19 Thread Venkatraman S
On Mon, Jul 19, 2010 at 7:11 PM, Tereno wrote: > > I find that all this configuration and memory monitoring for Django is > abit tiring and I am no expert so I am wondering if there any hosts > that you would recommend? I am considering Google App Engine. > I would recommend GAE if you want to d

Re: can foreign key fields be empty?

2010-07-19 Thread rmschne
thanks. I've read almost all the documentation at least three or for times (or more) and I go back to it constantly. Plus I have a couple of books that I read all the time (I esp. like the book by Forcier, Bissex, and Chun). Neither the documentation nor this book gives, far as I can tell, an exam

Re: Django memory requirements

2010-07-19 Thread Franklin Einspruch
Regarding the hosting question, I recommend Webfaction. They have install-by-clicking Django instances and they're fans of Python. Franklin On Mon, Jul 19, 2010 at 9:41 AM, Tereno wrote: > Hi there, > > I have a few questions about Django deployment on production so > hopefully you can help me

Re: How can I program multiple drop-down menus at one time by Django?

2010-07-19 Thread vjimw
I think you would want to make a custom widget for the birthday field in your model. http://docs.djangoproject.com/en/dev/ref/forms/widgets/#customizing-widget-instances You can then set up your form instance to use this widget, which would include the three drop downs to make a birthdate selector

Re: URL problem

2010-07-19 Thread Tim Sawyer
I think the problem is your regular expression: ^(?P\d{4})/(?P[a-z]{3})/(?P\w{1,2})/(?P\w+)/$ This says - four digits for a year (2010 - ok) - slash - three letters from a-z for month (jul - ok) - slash - one or two letters for day (11 - not ok, this should be \d{1,2}) - slash - slug, made up of

Django memory requirements

2010-07-19 Thread Tereno
Hi there, I have a few questions about Django deployment on production so hopefully you can help me sort it out. Firstly, what's the minimum memory requirements for a Django + Apache + mod_wsgi setup? It seems like my server ran out of memory when I tried it and I think I may only have 256MB RAM.

Re: Multiple URLs, Common View

2010-07-19 Thread Zaheer Soebhan
Maybe make a pattern like r'(home|about|family|aviation|linux|etc)$' to match either home, about, family, etc? The "|" should work like the "OR"-operator. 2010/7/19 Ryan Osborn > You could try using this as your pattern: > > (?P[a-zA-Z0-9-]+) > > Ryan > > On Jul 19, 1:03 am, Phil Edwards wrote:

Re: django mailing list app

2010-07-19 Thread Ryan Osborn
How about this? http://www.freehackers.org/thomas/2010/04/03/announcing-colibri-10-alpha1-a-mailing-list-manager-with-a-django-based-web-interface/ Ryan On Jul 18, 10:34 am, James Hancock wrote: > I am looking for an app that can manage subscriptions to a mailing list for > a web app I am making

URL problem

2010-07-19 Thread Stephan Huiser
Hi, i have a strange problem with urls. Project name: erp Application name: blog (and some more) problem occurs with certain view of blog-application This URL works fine: http://erp/blog/ When I use the URL below, I get an 404-error. http://erp/blog/2010/jul/11/1ste-blog-post/ -

Re: Multiple URLs, Common View

2010-07-19 Thread Ryan Osborn
You could try using this as your pattern: (?P[a-zA-Z0-9-]+) Ryan On Jul 19, 1:03 am, Phil Edwards wrote: > On 18/07/2010 23:55, Phil Edwards wrote: > > > > > -begin- > > def servePage(request): > > if request.path[1:] == '': > > thisPage = Page.objects.get(name = unicode('home')) > > el

Inline formsets

2010-07-19 Thread Ryan Osborn
Hi, I am trying to create a form in which a user can fill out details and it will create a parent object and multiple child objects, much like the django admin does when you set up a model to be a tabuar inline in the admin.py. I think I have to use inline formsets for this, but when I do this, o

Re: prepopulated_fields - slug and underscores

2010-07-19 Thread Zaheer Soebhan
May I ask why you want to do that? Hyphens are preferred because of the way search machines work. You could override the save() method of your model and add self.page_slug = slugify(page_title).replace('-','_'), I think. Gr, Zaheer -- You received this message because you are subscribed to the

How can I program multiple drop-down menus at one time by Django?

2010-07-19 Thread Boyle Yang
Hello list, I am a new Djangoer. I am trying to program three drop-down menus in form of Django like the attachment at one time . How can I do? Thanks very much! Boyle Yang -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Django comment moderation error: AlreadyModerated at /

2010-07-19 Thread Groady
I'm trying to add the comments framework to a weblog I'm creating in Django. Adding the comments system appears to be working fine until I attempt to enable comment moderation. I add the following code to my models.py as per the instructions on the django website. My model is called Post which rep

Re: how to develop cms on django

2010-07-19 Thread Jonas Obrist
On 06/30/2010 10:57 AM, bruno desthuilliers wrote: On 29 juin, 12:29, samie wrote: sir i am a beginner in python and django.. i want develop a content management system using django.. plz help me wht shld i do from where shld i start.. I think the very first thing to do would be to

Re: primary key problem [solved]

2010-07-19 Thread Franklin Einspruch
The client's manual insertion of table id numbers, which was necessary to make the admin panel work with the table ids set to IntegerField in models.py, caused the sequence behind the serial field to go out of whack in postgres. This had to be fixed in postgres. SELECT SETVAL ('primary_key_seq', 3

Re: import model from other module

2010-07-19 Thread David De La Harpe Golden
On 18/07/10 20:58, Andreas Pfrengle wrote: > This should import a database-based timer I've written. In fact, code > from django_timer seems to be imported, since 'test' is printed when I > execute "manage.py syncdb" - however, the database table is not > created. Why? What would I need to change

Re: how to develop cms on django

2010-07-19 Thread Russell Keith-Magee
On Mon, Jul 19, 2010 at 6:06 PM, Kenneth Gonsalves wrote: > On Monday 19 July 2010 15:27:20 Mike Dewhirst wrote: >> At that point you will be in a position to look at the source code of >> the CMS you implemented via your hosting provider and make any >> configuration tweaks which suit your needs.

add 'wms_format' option to GeoModelAdmin

2010-07-19 Thread fher...@gmail.com
Hi, I need class FlatRecintoGeomAdmin(admin.GeoModelAdmin): fields = ('geometry',) wms_url = 'http://idecan2.grafcan.es/ServicioWMS/Callejero?' wms_layer = 'MUN' wms_name = 'Callejero' wms_format = 'image/png' but 'wms_format' is not available, so i do the following steps: i

Re: how to develop cms on django

2010-07-19 Thread Kenneth Gonsalves
On Monday 19 July 2010 15:27:20 Mike Dewhirst wrote: > At that point you will be in a position to look at the source code of > the CMS you implemented via your hosting provider and make any > configuration tweaks which suit your needs. > all this for a person who took a week and about 10 mails

Re: how to develop cms on django

2010-07-19 Thread Mike Dewhirst
On 19/07/2010 7:02pm, Dmitry Dulepov wrote: Hi! Julio Cesar Rodriguez Cruz wrote: sir i am a beginner in python and django.. i want develop a content management system using django.. It is a bit late to respond to this but I have to say it: you are going to fail this project. Why? Can you im

Re: URL to specify when accessing subdomains using Django

2010-07-19 Thread nandu
Thank you to all whohave replied. I will give the sites framework an honest effort and solve my problem. Thank you very much for your time and effort. :-) Nanda On Jul 19, 2:42 pm, jaymzcd wrote: > Like Daniel & Steve have said already, urls.py only deals with the > path component of the URL,

Re: URL to specify when accessing subdomains using Django

2010-07-19 Thread jaymzcd
Like Daniel & Steve have said already, urls.py only deals with the path component of the URL, not the domain. The sites framework is what you need to use, its pretty simple. All you really need to do is something like: 1. in urls.py match the URL you want that is common for both subdomains 2. in y

Re: Nginx-fcgi setup guidance needed to render certain views with HTTPS.[solved]

2010-07-19 Thread Sam Walters
Just to conclude this post. I was following a guide: http://www.redrobotstudios.com/blog/2009/02/18/securing-django-with-ssl/ After a long day. Concequently the nginx.conf had a rewrite rule(below) which passed to the url dispatcher... which got a view with a decorator which rewrote the header.

Re: how to develop cms on django

2010-07-19 Thread Dmitry Dulepov
Hi! Julio Cesar Rodriguez Cruz wrote: > sir i am a beginner in python and django.. > > i want develop a content management system using django.. It is a bit late to respond to this but I have to say it: you are going to fail this project. Why? Can you imagine yourself saying: "I need to develop

Re: How to get gallery thumbnails without multiple database queries

2010-07-19 Thread Martin Tiršel
On Mon, 19 Jul 2010 00:50:04 +0200, Martin Tiršel wrote: Hello, I have: class Gallery(models.Model): ... class Image(models.Model): gallery = models.ForeignKey(Gallery) ... Now, on some page, I am listing all galleries and I want for every gallery first three (o

Re: setlang is not working (solved)

2010-07-19 Thread Kenneth Gonsalves
On Monday 19 July 2010 12:38:32 Kenneth Gonsalves wrote: > hi, > > I have a site running on pre csrf (11603). In that I have a function to > change languages which calls setlang as per the docs. This language change > works perfectly. I am now trying to upgrade to the latest trunk, and > setlan

New Release of ibm_db_django(1.0) is out of beta

2010-07-19 Thread Rahul
IBM_DB_DJANGO-1.0 --- IBM_DB_DJANGO adaptor enables access to IBM databases from Django applications http://www.djangoproject.com/. The adaptor is developed and maintained by IBM. What's New? - Added IBM Dataservers backend support for Django 1

setlang is not working

2010-07-19 Thread Kenneth Gonsalves
hi, I have a site running on pre csrf (11603). In that I have a function to change languages which calls setlang as per the docs. This language change works perfectly. I am now trying to upgrade to the latest trunk, and setlang does not work. I click on the button to change the language, no err