Re: Tough finding a form with dynamic fields out there

2012-05-30 Thread Daniel Roseman
So, compare this: def __init__(self, mailboxes, *args, **kwargs): > with how you're calling it: > form = MboxReg(request.POST, int(mailboxes)) > > and you should see why you're getting this: > Error: > Exception Value: > > int() argument must be a string or a number, not 'QueryDict'

Re: how to do this?

2012-05-26 Thread Daniel Roseman
On Saturday, 26 May 2012 15:03:47 UTC+1, doniyor wrote: > > the reason why i want to do this is this: > > the user should be able to select products from products table as many as > he wants, at each selection i will save the product information in db, then > the user clicks on "book" button,

Re: how to do this?

2012-05-26 Thread Daniel Roseman
On Saturday, 26 May 2012 09:08:47 UTC+1, doniyor wrote: > > Yeah, but then i dont create htmls. What i want is to create so many htmls > as the number of objects in db. Is it possible to go around the “return“ > till the end of loop? Then i will have all htmls created with rendered > values. Is

Re: django-crequest - New app announcement

2012-05-24 Thread Daniel Roseman
On Thursday, 24 May 2012 11:35:37 UTC+1, Alireza wrote: > > Hi > Yesterday i released an app for django. > *Basically it's just a middleware to access current request of your > django application from anywhere in your code.* > Other information described in the README and pypi page. > > pypi: >

Foreignkeys on multiple fields

2012-05-20 Thread Daniel Roseman
unique_together needs to be in the inner Meta class. But your model structure doesn't seem to make sense. Why have two ForeignKeys From Members to Intro? That means that a member could point to different entries for village and household number, which can't be right. The usual thing to do is

Foreignkeys on multiple fields

2012-05-20 Thread Daniel Roseman
unique_together needs to be in the inner Meta class. But your model structure doesn't seem to make sense. Why have two ForeignKeys From Members to Intro? That means that a member could point to different entries for village and household number, which can't be right. The usual thing to do is

Re: django forms - overriding constructor for changing field type depending by input

2012-05-20 Thread Daniel Roseman
On Sunday, 20 May 2012 12:49:28 UTC+1, luke lukes wrote: > > Hi. already tried this way --> fields are instantiated > () but are not > rendered in the template... > >> >> You should be assigning your new fields to `self.fields['fieldname']`, not `self.fieldname`. -- DR. -- You received this

Re: Newbie Stuck on Django Tutorial 3 - Django Template system

2012-05-17 Thread Daniel Roseman
On Thursday, 17 May 2012 19:39:53 UTC+1, Bob Loblaw wrote: > > I was cruising along fine, but am stuck now... Any help would be > greatly appreciated > > OS: Mac OS X Version 10.6.8 > Python: 2.6.1 > Django: 1.4 > > Issue: system throwing an error message during template rendering when >

Re: form resubmit on refresh problem

2012-05-14 Thread Daniel Roseman
On Monday, 14 May 2012 02:39:53 UTC+1, jondykeman wrote: > > Hello, > > I have a form submission problem I can't seem to figure out a way around. > > Normally, once a form was submitted I would HttpResponseRedirect() to the > main page. > > However, there is something I can't seem to make work

Re: New Install - django-admin.py ... just gives contest/options but doesn't run?

2012-05-09 Thread Daniel Roseman
On Wednesday, 9 May 2012 18:34:41 UTC+1, Robert G wrote: > > > I can't seem to find much about this error online - any suggestions? On the contrary, this is very much a FAQ. Your Windows installation is set to run scripts against Python, but without passing any arguments. Easiest way to fix

Re: Parse Custom html in custom template tags, django 1.4

2012-04-30 Thread Daniel Roseman
On Monday, 30 April 2012 09:03:56 UTC+1, 95felipe wrote: > > Hi. I've been struggling with this problem the whole night and just > couldn't find any solution. I've tried reverse engineering the > template/base.py file, but things are getting ugly. :S > > How can I, inside a custom tag class

Re: outdated django book

2012-04-28 Thread Daniel Roseman
Which, of course, is nothing to do with Django versions, and was true even when the Django book was new. On Saturday, 28 April 2012 03:30:26 UTC+1, jondbaker wrote: > > You need to import User from django.contrib.auth.models and login_required > from django.contrib.auth.decorators. Hope this

Re: cannot locate syntax error in urls.py

2012-04-23 Thread Daniel Roseman
On Monday, 23 April 2012 15:03:35 UTC+1, r0pewalker wrote: > > Hi everybody. I recently started working on a project involving heavy > Django usage. > I basically retrieve data in xml from a SOAP web service using suds, > parse the xml into a db and then (I should) popuate a web page. > I'm a

Re: Returning template data from a ManyToMany model

2012-04-17 Thread Daniel Roseman
On Tuesday, 17 April 2012 07:10:35 UTC+1, LJ wrote: > > I am having trouble figuring out how to query the database and return > the results in a format that my template can render appropriately. > I have a model that has a ManyToMany field: > > class Student() > ... > parents =

Re: How to change widgets for admin site?

2012-04-16 Thread Daniel Roseman
On Monday, 16 April 2012 06:24:54 UTC+1, Gchorn wrote: > > Hello, I'm trying to create a blog site using Django (with "Post" as > my main model and "text" as the attribute corresponding to the main > body of text for each post). On the admin page, when someone is > filling out fields to create

Re: Form Validation

2012-04-15 Thread Daniel Roseman
On Sunday, 15 April 2012 10:22:43 UTC+1, coded kid wrote: > > > def my_memb(request): > if request.method=="POST": > form=MembForm(request.POST) > if form.is_valid(): > data=form.cleaned_data > form.save()

Re: South tutorial is not working

2012-04-13 Thread Daniel Roseman
On Friday, 13 April 2012 22:51:06 UTC+1, alex3627 wrote: > > Hi, > > I added the following line in the section of INSTALLED_APPS of my > settings.py: > > 'south', > > then I ran "python manage.py syncdb" giving this error: > > Error: No module named adminsouth > > > Any ideas I have done

Re: no such column: jobs_job.mainloc

2012-04-13 Thread Daniel Roseman
On Friday, 13 April 2012 21:25:06 UTC+1, alex3627 wrote: > > Hi, > > before even thinking to use 'South', I want to get it to work quick and > quick. I don't care about existing databases, I have no information in the > database anyway. Is there a way to just recreate a new, empty database from

Re: Working Hello World Ajax example via django pleeeease

2012-04-13 Thread Daniel Roseman
On Friday, 13 April 2012 17:04:49 UTC+1, Eli_West wrote: > > Thanks, I tried to stay clear of posting code because I've tried maybe > 20 different ways and nothing seems to work. I have used the {% url %} > tag and yesterday competed - a 'ajax_user_search' tut using django Q > still no luck.

Re: no such column: jobs_job.mainloc

2012-04-13 Thread Daniel Roseman
On Friday, 13 April 2012 19:33:07 UTC+1, alex3627 wrote: > > Here is a repetition of what exactly I have done: > > 1. Add this field in my models.py > > 2. Run " python manage.py sql jobs" (jobs is the name of the directory); > in this step the field in question is explicitly written to stdout >

Re: Working Hello World Ajax example via django pleeeease

2012-04-13 Thread Daniel Roseman
On Friday, 13 April 2012 08:08:19 UTC+1, Eli_West wrote: > > I've been attempting the most basic ajax call (.load() ) through > django for over a month now - each time trying a different method or > tutorial none with success. Can someone post a working paradigm for > whatever django csrf,

Re: DB queries at import time

2012-04-12 Thread Daniel Roseman
On Thursday, 12 April 2012 13:09:54 UTC+1, guettli wrote: > > Hi, > > sometimes it happens, that db queries get executed at import time (during > importing the file by the interpreter). > That's waste of time a resources. > Why? Imports only happen the first time a process accesses a module. A

Re: Django tutorial

2012-04-10 Thread Daniel Roseman
On Tuesday, 10 April 2012 22:15:40 UTC+1, Ed McLaughlin wrote: > > DATABASES = { > 'default': { > 'ENGINE': 'django.db.backends.sqlite3', # Add > 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. > 'NAME': '/usr/local/mysql/data/mysite', # > Or

Re: Advice on installing Django in a fresh OSX Lion machine

2012-04-10 Thread Daniel Roseman
On Tuesday, 10 April 2012 00:00:32 UTC+1, Paulo wrote: > > So I follow your advice and did sudo easy_install pip and sudo pip install > virtualenvwrapper. > Then I instaled homebrew and wget as mentioned in the site. And then I hit > the wall. > When I tried to python setup.py install

Re: superclass SingleObjectMixin

2012-04-07 Thread Daniel Roseman
On Saturday, 7 April 2012 16:40:05 UTC+1, Dave wrote: > > Hi, I need to manipulate my pk when using new class based views. In > order to DRY I think what's needed is to superclass SingleObjectMixin. > > I have the following but it's not working. Greatly appreciate help/ > suggestions! > > In

Re: getting POST 500 (OK), when using $.ajax on that url

2012-04-01 Thread Daniel Roseman
On Saturday, 31 March 2012 23:23:26 UTC+1, Ahmad wrote: > > I trying to use jquery ajax to send json data to django > > sorry if providing javascript code but it may help solving my problem > > $("#send").click(function() { > events =

Re: strange problem deleting objects

2012-03-29 Thread Daniel Roseman
On Thursday, 29 March 2012 00:06:29 UTC+1, Marc Aymerich wrote: > > Hi!, > I've overrided the save() method of one of my ModelForms and I'm > performing a delete of some related objects depending on some form > fields values. The thing is I'm getting differents behaviours > dependening on how the

Re: IntegrityError at /register/ auth_user.username may not be NULL

2012-03-28 Thread Daniel Roseman
On Wednesday, 28 March 2012 20:31:09 UTC+1, laurence Turpin wrote: > > I'm getting the following error with my registration section of my > program. > > IntegrityError at /register/ > auth_user.username may not be NULL > > I am using django 1.3.1 and python 2.7.2 and I'm using sqlite3 as the

Re: Looking for a developer who knows Django well

2012-03-27 Thread Daniel Roseman
On Tuesday, 27 March 2012 12:34:46 UTC+1, MSSONI wrote: > > I have just started a company. The company is yet to be registered. We > have launched our product www.instashare.me. Our alpha has just > launched. We are looking for passionate developers. Our salary will > range from 15-25k

Re: User/UserProfile Queryset problem

2012-03-27 Thread Daniel Roseman
On Tuesday, 27 March 2012 02:15:04 UTC+1, bcrem wrote: > > Hello Django Nerds! > > So I have a (somewhat) complicated lookup I'm trying to do; here's the > gist of it: > > 1. I have a Store class, with a User ManyToManyField, Store.users > 2. I have a user profile class associated with

Re: Using _set.all in template when ForiegnKey is linked to Self

2012-03-22 Thread Daniel Roseman
On Thursday, 22 March 2012 01:12:21 UTC-7, Jam wrote: > > Hi All, > > I have a model where it can link to itself using ForeignKey('self'). This > is so I can have parent and child objects. > > I have called the parent and in the template I want to be able to access > all the child objects. > > I

Re: Session resets - help me find the bug.

2012-03-21 Thread Daniel Roseman
On Wednesday, 21 March 2012 11:12:09 UTC-7, Daniel Sokolowski wrote: > > Hi All, > > I have the following code: http://dpaste.com/719654/ for a session > based cart implementation I've created. I run into an odd bug/issue > that I can't figure out, when I create or retrieve the Cart instance >

Re: usage of url template tag

2012-03-21 Thread Daniel Roseman
On Wednesday, 21 March 2012 03:01:23 UTC-7, larry@gmail.com wrote: > > > I'm very new to django. The rest of the URL comes from the index > function in views.py. I wasn't sure if it violated the DRY principle > to hardcode it. > Fine, but you can't reverse a URL that does not exist. If you

Re: usage of url template tag

2012-03-20 Thread Daniel Roseman
On Tuesday, 20 March 2012 15:27:27 UTC-7, larry@gmail.com wrote: > > I'm trying to generate a URL that looks something like this: > > > /report/faloom/EventLog/?message=EventSearchString_ids=13_1=Tool_2=Time_3=Module_4=Message_preview=Generate+Report > > I have the values for the arguments

Re: how to display development server page

2012-03-16 Thread Daniel Roseman
On Friday, 16 March 2012 22:23:43 UTC-7, Alex Glaros wrote: > > Newbie trying to run Django for the first time. > > I'm using a hosted Linux server; I run python manage.py runserver, and > get: > > Validating models... > > 0 errors found > Django version 1.3.1, using settings

Re: How can I print form errors from inside the test

2012-03-14 Thread Daniel Roseman
On Wednesday, 14 March 2012 16:43:12 UTC-7, somecallitblues wrote: > > Thanks Daniel and Karen, > > Karen, I;'m not entirely sure what an unbound form is. :) > Then you must not have read the documentation[1], which goes into great detail about bound and unbound forms. That's pretty much a

Re: Jquery .load() function not responding with django

2012-03-14 Thread Daniel Roseman
On Wednesday, 14 March 2012 09:21:29 UTC-7, Eli_West wrote: > > I've ran into in issue where jquery .load() will load extra content by > directly opening html file in a browser but if served through Django > devel server the jquery load() is ignored. Have no idea what could be > happening but

Re: How can I print form errors from inside the test

2012-03-13 Thread Daniel Roseman
On Tuesday, 13 March 2012 19:06:13 UTC-7, somecallitblues wrote: > > I preload the data into the form and when I validate it returns False. > > *How* do you "preload" the data? How do you validate it? -- DR. -- You received this message because you are subscribed to the Google Groups "Django

Re: external urls

2012-03-11 Thread Daniel Roseman
On Sunday, 11 March 2012 18:27:33 UTC, hack wrote: > > How can I use an external URL in a django template? For example, I have a > CharField in the database/model and I want to display it on a template page > as an external link. However, when I do something like the following and > click the

Re: How to interpret error messages

2012-03-10 Thread Daniel Roseman
On Saturday, 10 March 2012 07:31:16 UTC, Rico wrote: > > I'm trying to learn Django and have been following several online > tutorials hoping to understand how to create my own projects. > > I'm having trouble interpreting the error messages that are given when I > do something wrong.

Re: serialization in Django

2012-03-06 Thread Daniel Roseman
On Tuesday, 6 March 2012 19:14:55 UTC, angel wrote: > > I am new to django and doing my course project. I am searching for a > solution for iterating JSON dictionary in html page. My django view > is the following: > > def do_GET(self, offset): >

Re: How do you use a link as a post request?

2012-03-03 Thread Daniel Roseman
On Saturday, 3 March 2012 10:21:39 UTC, leaks wrote: > > How do you use a link as a post request? > this is a thing that I have never done before... maybe use it inside a > form? > I searched and didn't find anything similar in django... > > Thanks in advance! > You can't. A link is a GET, by

Re: Error on Tutorial Part 3 - https://docs.djangoproject.com/en/1.3/intro/tutorial03/

2012-03-02 Thread Daniel Roseman
On Friday, 2 March 2012 21:47:54 UTC, Django_for_SB wrote: > > Thank you everyone for your very insightful and helps remarks. I had 2 > issues with my code: > > 1) I didn't properly separate my directory strings with commas and > 2) I need to code the directory structure, and the absolute path

Re: Caught TypeError while rendering: __init__() got an unexpected keyword argument 'maxlength'

2012-03-02 Thread Daniel Roseman
On Friday, 2 March 2012 09:56:26 UTC, Vipulb wrote: > > I tried to enable admin and i got this error... > > I am running Django on Ubuntu 11.10 and installed Django using apt-get... > > > > Exception Value: > > Caught TypeError while rendering: __init__() got an unexpected keyword > argument

Re: Error on Tutorial Part 3 - https://docs.djangoproject.com/en/1.3/intro/tutorial03/

2012-02-29 Thread Daniel Roseman
On Wednesday, 29 February 2012 20:03:21 UTC, Django_for_SB wrote: > > Hi Anoop, > > Thank you for the kind reply, I've tried that already. Here are the 3 > variations that I've attempted so far within settings.py in TEMPLATE_DIRS: > >

Re: Going crazy with WSGI

2012-02-27 Thread Daniel Roseman
tOn Monday, 27 February 2012 14:40:37 UTC, atlastorm wrote: > > I am a newbie to Django and web development in general, and I've > completed the django tutorial and am working my way through the > practical django projects book. I have a simple app that I wanted to > try out: basically a form

Re: Using query set in views.py

2012-02-26 Thread Daniel Roseman
> > On Sunday, 26 February 2012 10:33:32 UTC, St@n wrote: > > Sorry if i have misled anyone. > > Here's a better view on what i'm asking. > > def get_keyword(): >return Keyword.objects.all() > > That method above returns me a list of Keyword items correct? > > How then do i get a specific

Using query set in views.py

2012-02-26 Thread Daniel Roseman
Your question is not at all clear. You can use whatever you like in your view. What problem are you having? -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: Response problem

2012-02-15 Thread Daniel Roseman
On Wednesday, 15 February 2012 19:02:51 UTC, Hans wrote: > > I'm using a form for my webpage that returns values with simillar key > values. Now for backend compatibility reasons I cannot change the key > variables. > > This is the query dictionary returned from the HTML file. >

Re: Comments Not Displaying

2012-02-14 Thread Daniel Roseman
On Tuesday, 14 February 2012 12:02:58 UTC, coded kid wrote: > > Hi guys, I'm using Django.contrib.comments in my Django web app. After > installing django comments and setting up all other things, I decided > to give it a try by commenting on my status. > > I commented and I was redirected to

Re: is my UserProfile ManyToMany wrong?

2012-02-12 Thread Daniel Roseman
On Sunday, 12 February 2012 11:06:32 UTC, richard wrote: > > Hi im having difficulty looping over my mantomany in my template. A > user has a 1to1 with UserProfile and the UserProfile has a manytomany > with interests. But displaying the form field without looping over it > displays a model

Re: django error

2012-02-09 Thread Daniel Roseman
On Thursday, 9 February 2012 13:41:31 UTC, anand jeyahar wrote: > > > Hi > > > > >> There's no searching going on here. You create a lock instance, >> passing two positional arguments, which Django interprets as the first >> fields, ID and name. >> >> That's why you should never use positional

Re: django error

2012-02-09 Thread Daniel Roseman
On Thursday, 9 February 2012 11:29:52 UTC, anand jeyahar wrote: > > Hi, >Am rather new to django and this error makes no sense to me.. > > > Traceback (most recent call last): > File "", line 1, in > File "/usr/local/lib/python2.7/dist-packages/django/db/models/ > base.py", line 460,

Re: Import a custom py file into views.py

2012-02-09 Thread Daniel Roseman
On Thursday, 9 February 2012 10:21:29 UTC, Alessandro Candini wrote: > > Hi list. > In my project named STO I have the 'jsonopenlayers' app with the > following structure: > > STO > ├── __init__.py > ├── jsonopenlayers > │ ├── ingestion > │ │ └── ingestShp.py > │ ├── __init__.py > │ ├──

Re: about QuerySet

2012-02-07 Thread Daniel Roseman
On Tuesday, 7 February 2012 11:36:04 UTC, newme wrote: > > thank you. > then a basic python question. > how does queryset implement it? > does python also allow operator (e.g. []) overloading? > > It's not usually called overloading in Python, but yes. Classes can define a `__getitem__`

Re: Django Server impacts path-rules ???

2012-02-04 Thread Daniel Roseman
On Saturday, 4 February 2012 18:48:08 UTC, doniyor wrote: > > Hi everyone, > > i have a small problem which makes me worry. i have a normal html file > with fotos to see in. and i have created a project and started the > server with "manage.py runserver". this is the point! : > > if i open the

Re: Rooting my application at the base (/) of the URL

2012-02-03 Thread Daniel Roseman
On Thursday, 2 February 2012 20:14:57 UTC, Johan wrote: > > Hi > > I have deployed my application on Apache using WSGI, using > WSGIScriptAlias / /var/www/site/django.wsgi. Everything looks very > good. My actual application lives at http:///application. So > with the setup above when I

Re: Using Context Processor as form with HttpResponseRedirect

2012-02-01 Thread Daniel Roseman
On Wednesday, 1 February 2012 01:34:03 UTC, richard wrote: > > Hi i have seen alot of people saying to use a context processor to > include forms in multiple page. I have written a context processor > login form that just returns the django Authentication form and > everything works great

Re: Django Model Errors : TypeError: 'class Meta' got invalid attribute(s): using

2012-02-01 Thread Daniel Roseman
On Tuesday, 31 January 2012 19:22:27 UTC, Subhodip Biswas wrote: > > Hi all, > I am newbie in django and while trying to write a database router for > using multiple database I did something like : > > class Meta: > using = 'somedatabasename' > > in Django models.py. > > However

Re: about QuerySet

2012-02-01 Thread Daniel Roseman
On Wednesday, 1 February 2012 08:34:14 UTC, akaariai wrote: > > On Feb 1, 9:36 am, newme wrote: > > do you mean that queryset will query database every time i call > > user[0]? > > Yes. That is exactly what happens: > In [7]: qs[0] > Out[7]: > In [9]: print

Re: Problem with admin

2012-01-31 Thread Daniel Roseman
On Tuesday, 31 January 2012 20:04:33 UTC, Kolbe wrote: > > Hi guys, I created a new app and within that app, I also specified a > new admin.py file. Is that how the admin portion for that app is > managed? > > Anyway, after I created my models and syncdb, then run server, I have > been unable

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-31 Thread Daniel Roseman
On Tuesday, 31 January 2012 18:38:18 UTC, JJ Zolper wrote: > > Sam, > > Since I'm on Ubuntu know with my Python and Django I'm wondering which > CPython I should download? > > I saw stackless python on the python.org site but I'm not sure if that's > what CPython version I would need. I thought

Re: ChoiceField Help

2012-01-29 Thread Daniel Roseman
On Saturday, 28 January 2012 21:41:13 UTC, Squant wrote: > > Hello, > I've created a simple ChoiceField for my app with two items. I need to > somehow query which choice was made from the user so I can pass the > appropriate context to my template. What would be an example of how I > can do

Re: passing context data to inherited templates

2012-01-29 Thread Daniel Roseman
On Sunday, 29 January 2012 05:34:50 UTC, Mike wrote: > > In a project I'm working on I have a status bar at the top of the webpage > that will render data using template tags. The status bar will be > displayed on all of my views, so I want to put the html code in my base > template. The base

Re: Confused with django model Limit and Offset Implementation

2012-01-23 Thread Daniel Roseman
On Monday, 23 January 2012 04:40:31 UTC, Swaroop Shankar wrote: > > Hi, > Am trying to create a custom pagination for my project, but am seriously > struck with the django implementation of Limit and offset. I went through > the documents, instead of making me understand how it works, i ended up

Re: Django Form - This field is required.What am I missing.

2012-01-22 Thread Daniel Roseman
On Sunday, 22 January 2012 10:42:53 UTC, Johan wrote: > > Hi I have a form that has a required email field. This due to the fact > that the model requires an email. However, I don't display the email > field on the form. So when the post gets back into my view the email > field is empty. I then

Re: Handling copy on a small project

2012-01-20 Thread Daniel Roseman
On Friday, 20 January 2012 04:39:44 UTC, Jeremy Boyd wrote: > > Hi all, > > For my side project, we have the need to rapidly iterate on the app's > copy. As I see it, we have two options: make copy db-driven, or hardcode it > into the templates. I'm leaning toward putting text in the db for now

Re: Could someone please give some suggestions about how to set up email sending settings on production.

2012-01-19 Thread Daniel Roseman
On Thursday, 19 January 2012 02:45:09 UTC, Chen Xu wrote: > > Hi, everyone: > > Could someone please give some suggestions about how to set up email > sending settings on production. > > I know on local, you can do either: > python -m smtpd -n -c DebuggingServer localhost:1025 > > EMAIL_BACKEND

Re: not sure how to unpack a list within a tuple within another list inside the template

2012-01-12 Thread Daniel Roseman
On Wednesday, 11 January 2012 21:33:48 UTC, somecallitblues wrote: > > Hi Djangoers, > > I have a default dict variable final_d = defaultdict(list) that looks like > this: > > [(order1, [customer2, customer1]), (order2, [customer3, customer5, > customer6]) ] > > I've tried everything possible

Re: Help me with django Form

2012-01-12 Thread Daniel Roseman
On Thursday, 12 January 2012 01:49:40 UTC, coded kid wrote: > > Hi guys, I’ve been trying to signup using the django form I created. > Whenever I signup, the form is always saving the id no and not other > fields like names, username.pasword,email etc. Below are the codes; > In views.py: >

Re: How to avoid "no such column" error when I add a new property to a model?

2012-01-11 Thread Daniel Roseman
On Wednesday, 11 January 2012 10:26:32 UTC, callum wrote: > > I created an "Article" model with a few simple properties. I ran > syncdb, and set up the Django admin site, and added > "admin.site.register(Article)" in admin.py. Using the Django admin > site, I created an article by filling in

Re: Could someone who has experience on both Django and Bottle please tell me what are the some differences between those two

2012-01-09 Thread Daniel Roseman
I haven't used Bottle, but it's definitely a micro-framework. It doesn't do much beyond URL routing and a very basic template language. It doesn't have ORM, forms, authentication, commenting... all these have to be provided by external projects. With Django, you get all that included. Now

Re: Having trouble passing a parent table record “id” to a new record in a child table

2012-01-06 Thread Daniel Roseman
On Friday, 6 January 2012 15:12:29 UTC, BillB1951 wrote: > > I am having trouble passing a parent table record “id” to a new record > in a child table. My urlconf calls add_childtable in my views.py and > passes the parenttable_id to it. I have excluded the parenttable from > my

Re: UnicodeDecodeError

2012-01-05 Thread Daniel Roseman
On Thursday, 5 January 2012 11:18:52 UTC, Hassan wrote: > > Dear ALL, > > i am trying to do render_to_response('index.html') , and i keep geting > this dont know why ? its a normal html page ??!! what to do ? > You need to post some code. However 99 times out of 100, when you see this error

Re: Apache RewriteRule for django

2012-01-02 Thread Daniel Roseman
On Monday, 2 January 2012 02:39:00 UTC, Bob Kline wrote: > > I'm moving a django site to a shared hosting server, where I'll need > to use fastcgi (the site on the original server is using mod_python, > which isn't available on the shared hosting server). I have found the > instructions for

Re: reverse() is not working.

2011-12-28 Thread Daniel Roseman
On Wednesday, 28 December 2011 18:43:06 UTC, Nirmal Kumar wrote: > > I am trying to pass the id to thanks view through reverse. But it's not > working. I'm getting this error > > Reverse for 'reg.views.thanks' with arguments '(20,)' and keyword > arguments '{}' not found. > > I posted the

Re: question about django-admin.py

2011-12-25 Thread Daniel Roseman
On Sunday, 25 December 2011 15:03:38 UTC, Chen Xu wrote: > > No, I made a mistake in my previous email: > It generates something like: > > project/ > __init__.py > manage.py > settings.py > urls.py > project/ > __init__.py > wsgi.py > settings.py >

Re: How to handle callback urls

2011-12-23 Thread Daniel Roseman
On Friday, 23 December 2011 17:17:50 UTC, lankesh87 wrote: > > Hi, > > I am trying to handle a callback url. Following is the code in my > urls.py file: > > -- > > > urls.py:- >

Re: Standalone Django scripts

2011-12-23 Thread Daniel Roseman
On Friday, 23 December 2011 11:22:55 UTC, Ganesh-Bugcy wrote: > > Hi guys, > I am new to django, I trying to develop standalone script (shell > script), it's working fine in development version, How to can I deploy > host application to my server, > any help guys. In development version I have

Re: forms.CharField() remove text

2011-12-22 Thread Daniel Roseman
On Thursday, 22 December 2011 09:09:16 UTC, @timkofu wrote: > > Also, I just found out from here > https://docs.djangoproject.com/en/1.3/topics/forms/ that i can just: > > {{form.field_name}} > > which makes things even more flexible. > Don't forget that you will need to render the validation

Re: Jython zxJDBC / Python cx_oracle wrong number or types of arguments when calling to oracle's stored procedure

2011-12-21 Thread Daniel Roseman
On Wednesday, 21 December 2011 05:41:53 UTC, Akira Kir wrote: > > > > {stackoverflow xposted} > > Answered on SO. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: Satchmo + Django: mod_wsgi problems

2011-12-19 Thread Daniel Roseman
On Monday, 19 December 2011 07:42:33 UTC, Anthony Navarro wrote: > > Hi folks, > > I'm running a micro ec2 instance with Linux(Ubuntu), Apache Web > Server, and MySQL. I've been having problems getting started with > Satchmo (www.satchmoproject). In a nutshell, after going through all > the steps

Re: Iterable check boxes

2011-12-16 Thread Daniel Roseman
On Thursday, 15 December 2011 14:16:00 UTC, CrabbyPete wrote: > > According to the documentation I can iterate radio buttons > {% for radio in myform.beatles %} > > {{ radio }} > > {% endfor %} > > I want to do the same for checkboxes, but get > TemplateSyntaxError > Exception Value: > >

Re: ERP in DJango; what's available? — I'm thinking of writing a DJango wrapper to OpenERP

2011-12-14 Thread Daniel Roseman
On Wednesday, 14 December 2011 16:55:58 UTC, Alec Taylor wrote: > > What's available in terms of ERP on DJango? > > If there isn't anything that is maintained and has a strong > feature-set, I'm thinking of writing a DJango wrapper to OpenERP (and > would be happy to release this under FreeBSD

Re: ignore case order by in Django

2011-12-09 Thread Daniel Roseman
On Friday, 9 December 2011 05:04:23 UTC, ziggi wrote: > > Hi! > > I found only way to ordering query results ignorecase by using : > > Spam.objects.extra(select={'eggs_upper':'uppper(eggs)',order_by['eggs_upper']}) > > Maybe has another way to do this? > In MySQL, you can set the collation of

Re: urlresolver and custom Site model?

2011-12-07 Thread Daniel Roseman
On Wednesday, 7 December 2011 12:49:47 UTC, aleksandra...@googlemail.com wrote: > > Hello everyone > > Becuase I do not use django database at all my application currently > can't be deployed to a custom location different from "/" quite > simply. I use {% url ... %} template tags within

Re: add project directory path to python path permanently

2011-12-01 Thread Daniel Roseman
On Thursday, 1 December 2011 10:59:15 UTC, Nikhil Verma wrote: > > > Hi all, > > I want to add my django project directory path to PYTHONPATH. I am a > newbie in ubuntu 11.10 > Please tell me step by step. When i do > >>>import sys > >>>sys.path.append(''project_directory path") > It does append

Re: Website Statistics - What should I use to have Google Analytics in Django?

2011-12-01 Thread Daniel Roseman
On Thursday, 1 December 2011 10:32:11 UTC, Gelonida N wrote: > > Out of curiousity: > > Is there anything similiar which does work well in an intranet > environment or an environment, where one does not want to send data to a > third party server? > I've used django-request for this - it's

Re: Unable to load application to production environment

2011-12-01 Thread Daniel Roseman
On Thursday, 1 December 2011 07:16:50 UTC, Ganesh-Bugcy wrote: > > Hi guys, > > I am trying to load to my application to production environment, > It will work on test server, How to do this please guide me. > > my settings file:- > 'registration', > 'fileupload', >

Re: Installation of Django

2011-11-24 Thread Daniel Roseman
On Thursday, 24 November 2011 16:52:00 UTC, JJ Zolper wrote: > > Tom, > > 7zip works great. I am able to unzip the .tgz file and I have my .tar > file. Now it is on to installation of it. > > .tar is stil an archive. You need to extract that as well - 7zip should be able to do the job. -- DR.

Re: Installation of Django

2011-11-24 Thread Daniel Roseman
On Thursday, 24 November 2011 16:55:06 UTC, JJ Zolper wrote: > > JoeLinux, > > Oh interesting. It seems the 64 bit version is sort of unclear. Any > help there? > > Would I be able to install my Python is well with a smaller command? I > am back at ground zero because I had to adjust the Python

Re: cannot connect to postgresql database

2011-11-24 Thread Daniel Roseman
On Thursday, 24 November 2011 09:39:58 UTC, Tanya wrote: > > Page not found (404) > Request Method: GET > Request URL: http://127.0.0.1:8000/ > > Using the URLconf defined in mysite.urls, Django tried these URL > patterns, in this order: > >1. ^hello/$ > > The current URL, , didn't match any

Re: ModelChoiceFields and verbose names

2011-11-22 Thread Daniel Roseman
On Tuesday, 22 November 2011 21:40:29 UTC, James wrote: > > Hello all: > > This is my first question posted to this group! I am also a noob, so > please be gentle. > > So, my issue is, I have a ModelForm, which looks like this: > > class UAssumptionsForm(ModelForm): > primary_le = >

Re: Accessing Model Property from Admin Index Page

2011-11-22 Thread Daniel Roseman
On Tuesday, 22 November 2011 22:32:04 UTC, Lee wrote: > > DR - thanks for your reply. I need to display the model method result > (property) on index.html. Our index.html is heavily customized, and is > currently just a switchboard into the database tables via links like > this: > > {{

Re: Accessing Model Property from Admin Index Page

2011-11-22 Thread Daniel Roseman
On Tuesday, 22 November 2011 03:13:00 UTC, Lee wrote: > > I've opened a hundred docs/postings and can't find the correct syntax > for this simple task. > > In my model I have a method and a property to return the result of the > method: > > class MyModel(models.Model) > ... >def

Re: How many read operations is the get() method causing?

2011-11-13 Thread Daniel Roseman
On Saturday, 12 November 2011 23:04:44 UTC, Emil Sandin wrote: > > Hi, I am running a Django app on appengine, but I am constantly > hitting the roof with read operations. > I have not found an easy way to find what's causing this, so I am > trying to find it out myself. > To me, it seems that

Re: Unable to load render_to_response module

2011-11-11 Thread Daniel Roseman
On Friday, 11 November 2011 13:49:08 UTC, Ganesh-Bugcy wrote: > > Hi , > > I have tried to load render_to_response module. it's through error. I > have tried download and install the module > https://github.com/jgorset/django-shortcuts > installed sucessfully, But not load any one of you help me

Re: template information in django view

2011-11-08 Thread Daniel Roseman
On Tuesday, 8 November 2011 18:39:12 UTC, jay K. wrote: > > > Hello, > > Is there any way I could retrieve information about a template, > such as template name, url, etc inside a view? is there built-in > object that represents the template object? > > thanks > > regards > > You seem

Re: Which is the best way of query a database view(no from Django model)

2011-11-03 Thread Daniel Roseman
On Thursday, 3 November 2011 20:04:30 UTC, Andre Lopes wrote: > > Hi, > > I'm a new to Django... > > I have a database schema that stores me information that I want to > show in a Django website. This database schema have nothing to do with > a Django App... > > Which is the best way of doing this

Re: tutorial error

2011-11-02 Thread Daniel Roseman
On Wednesday, 2 November 2011 07:24:39 UTC, rihad wrote: > > It says at the end of part 3 of the Django tutorial: > > "The idea behind include() and URLconf decoupling is to make it easy > to plug-and-play URLs. Now that polls are in their own URLconf, they > can be placed under "/polls/", or

<    1   2   3   4   5   6   7   8   9   10   >