Re: How To Create POST data without an actual POST?

2010-06-28 Thread Massimiliano della Rovere
or you can use python urllib2: http://docs.python.org/library/urllib2.html On Tue, Jun 29, 2010 at 02:15, Gabriel Gayan wrote: > Maybe trying with ajax? > jquery has some nice functions to deal with ajax post requests. > You can even send files via ajax. > From the server side, you could return J

Re: Caught ViewDoesNotExist while rendering: Could not import smsnotifications.views. Error was: No module named forms

2010-06-28 Thread Allen Machary
Environment: Request Method: GET Request URL: http://127.0.0.1:8000/ Django Version: 1.3 pre-alpha Python Version: 2.6.5 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.gis', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admi

Re: Caught ViewDoesNotExist while rendering: Could not import smsnotifications.views. Error was: No module named forms

2010-06-28 Thread Allen Machary
Sorry on that.. No i have not imported smsnotification.forms in the smsnotification model. i have from smsnotifications.forms import SmsNotificationForm in the views I further tried to import the smsnotifications.forms import SmsNotificationForm in the django shell it worked okey. but importing vi

Re: QuerySet Behaviour Question (Django 1.1)

2010-06-28 Thread Jeff
Yes I am using PostgreSQL and I didn't add an order by clause. Adding the order by clause fixed the problem. Thank you very much Karen! Jeff On Jun 28, 10:46 am, Karen Tracey wrote: > On Mon, Jun 28, 2010 at 10:37 AM, Jeff wrote: > > Hi, > > > I have a question concerning some queryset behaviou

Re: How To Create POST data without an actual POST?

2010-06-28 Thread Gabriel Gayan
Maybe trying with ajax? jquery has some nice functions to deal with ajax post requests. You can even send files via ajax. >From the server side, you could return JSON objects and parse them on the client (for validation). Cheers On Mon, Jun 28, 2010 at 4:22 PM, Margie Roginski wrote: > I'd li

Re: Autologin after activation in django-registration

2010-06-28 Thread Jason Mayfield
Backends are not in the version available via easy_install or pip, so either way you need to get the code from bitbucket. The latest code in the repository is perfectly stable. On Jun 28, 9:13 am, Alexandre González wrote: > I read in the snippet that actual code doesn't emmit signals, but I can

context porcessors request.context media_url breaks admin

2010-06-28 Thread justin jools
I am trying to use media_url with generic views: When I set context processors to media_url, with generic views it breaks Admin: Caught an exception while rendering: user settings.py TEMPLATE_CONTEXT_PROCESSORS = ('portfolio.context_processors.media_url',) context_processors.py def media_url(req

Re: Admin interface for model with optional 'self' relationship

2010-06-28 Thread Jeff Green
You need to also state that null=True. Also, you want to have ensure that the field defined in your db allows null values. On Mon, Jun 28, 2010 at 3:19 PM, Jonathan Hayward < christos.jonathan.hayw...@gmail.com> wrote: > I have a model with two foreign keys to itself: > > department = models.

Re: can't adapt type 'Decimal'

2010-06-28 Thread poupou
I confirm that everything is working fine now. Thank you again. On 25 juin, 13:12, poupou wrote: > Yes I'm running two sites on the same server.  Only difference with > you is that I'm running it with virtual host. > > I modifier my Apache config, now it looks like this : > > >   ServerName  si

How To Create POST data without an actual POST?

2010-06-28 Thread Margie Roginski
I'd like to find a way to let my users submit form data without submitting it via an actual web form. For example, I have users that would like to send their data via email, or perhaps provide it in an excel spread sheet, I'm trying to figure out how to do this and still leverage all the error che

Re: Looking for unavailable table?

2010-06-28 Thread Jonathan Hayward
P.S. This problem did not resurface after I made other changes discussed elsewhere in the thread; it seems to be secondary damage. On Mon, Jun 28, 2010 at 2:46 PM, Jonathan Hayward < christos.jonathan.hayw...@gmail.com> wrote: > Thanks for pointing me to South. I've glanced over it, but I did hav

Admin interface for model with optional 'self' relationship

2010-06-28 Thread Jonathan Hayward
I have a model with two foreign keys to itself: department = models.ForeignKey(u'self', blank = True, related_name = u'member') reports_to = models.ForeignKey(u'self', blank = True, related_name = u'subordinate') When I tried to save test data from the admin interface, leaving those items

Re: Looking for unavailable table?

2010-06-28 Thread Jonathan Hayward
Thank you. I've updated my PYTHONPATH and INSTALLED_APPS, and now a syncdb is reporting errors instead of silently passing on, which seems to mean it's hitting my code a little more deeply than before. On Fri, Jun 25, 2010 at 5:57 PM, Oleg Lomaka wrote: > Actually it depends on your PYTHONPATH.

Re: Looking for unavailable table?

2010-06-28 Thread Jonathan Hayward
Thanks for pointing me to South. I've glanced over it, but I did have one question: My understanding is that Django will introduce tables for models that have been added on a syncdb, but not alter tables for models that have been changed. And from a glance at the documentation, it looks like South

change displayed name of users object

2010-06-28 Thread Jacob Fenwick
Is there a simple way to change the displayed name of the users object in the auth package? I don't care about what it's called under the hood. I just want to change what the user sees. I'd like to avoid changing the code directly in the Django library as that will make upgrades difficult. I cam

Re: More than one primary key for a model

2010-06-28 Thread thusjanthan
Yes you are correct I am looking to implement the compounded primary keys. Well the problem is I would like to have a many to many(m2m) with two models that share a compounded primary key. However when I do the m2m join it randomly pics one of the compounded keys and tries to join them? :| Does the

Re: More than one primary key for a model

2010-06-28 Thread ringemup
By definition a database table can have only one primary key. I believe what you're looking to implement are compound primary keys. Depending on the database backend you're using, the unique_together Meta attribute may accomplish most of what you're looking to do. On Jun 28, 12:49 pm, thusjantha

More than one primary key for a model

2010-06-28 Thread thusjanthan
Can anyone tell me why django refuses to follow the rules and lesson we learn in our database courses? I have a table that I do not have control over. Suppose its called the phone table and it contains the number and the username as the primary key. But for some reason when I have more than one pr

Creating and binding more than one model to a from

2010-06-28 Thread thusjanthan
Hi, I have a Topic class I would like to create a form based on. BUT, I want many of these objects so Topics. How do I obtain such a feature. Suppose my form object is as follows: class TopicForms(ModelForm): class meta: model = Topic fields = ('topic_id','topic') I want to

Re: django csrf

2010-06-28 Thread Tom Evans
On Fri, Jun 25, 2010 at 6:31 PM, thusjanthan wrote: > The quick answer is you have to put the following in your template > right after the declaration: > >  {% csrf_token %} > > Cheers, > Nathan. > And how precisely will that make his browser submit the form in a manner that django can decipher?

Re: QuerySet Behaviour Question (Django 1.1)

2010-06-28 Thread Karen Tracey
On Mon, Jun 28, 2010 at 10:37 AM, Jeff wrote: > Hi, > > I have a question concerning some queryset behaviour in Django 1.1. > > In this example, I have an article model that can contain 1 or more > authors who are users registered through Django's auth system. > > I get the following output when

QuerySet Behaviour Question (Django 1.1)

2010-06-28 Thread Jeff
Hi, I have a question concerning some queryset behaviour in Django 1.1. In this example, I have an article model that can contain 1 or more authors who are users registered through Django's auth system. I get the following output when playing around with an article in a shell where I have three

Re: Deployment Permissions

2010-06-28 Thread Tom Evans
On Sun, Jun 27, 2010 at 10:50 AM, Rusty Shackleford wrote: > Hi, > > I'm about to deploy my first Django app, but I have a few questions > about permissions. > > The project container is at '/usr/local/sites' with '775 root www- > data'. > > I have the project stored at '/usr/local/sites/project'

Re: Error using inline displays with a user profile

2010-06-28 Thread derek
On Jun 27, 8:06 pm, Karen Tracey wrote: > On Sun, Jun 27, 2010 at 1:54 PM, derek wrote: > > File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/ > > options.py" in change_view > >  900.                 change_message = > > self.construct_change_message(request, form, formsets) > > F

Re: url template tag

2010-06-28 Thread Rufman
disregard. the problem solved itself...there must have been something left behind from before. after deleting all .pyc files and restarting the server it worked On Jun 28, 2:27 pm, Karen Tracey wrote: > On Mon, Jun 28, 2010 at 8:10 AM, Rufman wrote: > > for some reason i get a template syntax e

Re: Autologin after activation in django-registration

2010-06-28 Thread Alexandre González
I read in the snippet that actual code doesn't emmit signals, but I can do it changing the backend, but I don't know where can I start. Anyway... is it a good way to install a svn code in my production enviroment? I suppose that yes, because django-registration SVN will be better than my code (for

Re: Problem with static files (MEDIA_URL and MEDIA_ROOT)

2010-06-28 Thread nadae ivar badio
Hi do you speack french? 2010/6/27 Denis Ricardo > Hello people! I am having any problems with static files (images, CSS) > in Django. I configured the MEDIA_URL and MEDIA_ROOT in settings.py > and when I execute the server and I go see the webpage, the static > files doesn't are encountered (th

Re: Autologin after activation in django-registration

2010-06-28 Thread Jason Mayfield
As noted in the comments for the snippet you reference, the version of django-registration available via easy_install or pip does not emit signals. You need to grab the latest unreleased code from bitbucket: http://bitbucket.org/ubernostrum/django-registration/ On Jun 27, 10:34 pm, Alexandre Gon

Re: Jaspersoft or Pentaho with Django?

2010-06-28 Thread meitham
On Jun 25, 5:30 pm, zweb wrote: > Are there any Python equivalent of Jaspersoft/Pentaho? The guy who founded informatica is a python developer. He now runs his own ETL company and his solutions are Python built, its on https://www.snaplogic.org/trac I am a bit confused with your question, django i

Re: url template tag

2010-06-28 Thread Karen Tracey
On Mon, Jun 28, 2010 at 8:10 AM, Rufman wrote: > for some reason i get a template syntax error when i use the url tag: > > export > > export is the name of a url. I have added the url() function to all > url.py files. > The url tag certainly works, so the "some reason" lies in information you ha

url template tag

2010-06-28 Thread Rufman
for some reason i get a template syntax error when i use the url tag: export export is the name of a url. I have added the url() function to all url.py files. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Deployment Permissions

2010-06-28 Thread Scott Gould
As long as the last number is 4 or greater (at least read access for all) you should be fine. Regards Scott On Jun 27, 5:50 am, Rusty Shackleford wrote: > Hi, > > I'm about to deploy my first Django app, but I have a few questions > about permissions. > > The project container is at '/usr/local/

Re: Own template instead of a inline

2010-06-28 Thread Filip Gruszczyński
> You can just define `template` in your inlineadmin class: > >    class MyInlineAdmin(admin.InlineModelAdmin): >        template = 'mytemplates/myinlinetemplate.html' >        model = MyModel I'll try this. Thanks a lot. -- Filip Gruszczyński -- You received this message because you are subsc

Re: Own template instead of a inline

2010-06-28 Thread Daniel Roseman
On Jun 28, 12:16 pm, Filip Gruszczyński wrote: > I would like to inject my own admin template instead of a standard > inline for a certain model (this model has additional reference, that > can't be edited by traditional inline). Could someone suggest me, how > I could achieve this? You can just

Own template instead of a inline

2010-06-28 Thread Filip Gruszczyński
I would like to inject my own admin template instead of a standard inline for a certain model (this model has additional reference, that can't be edited by traditional inline). Could someone suggest me, how I could achieve this? -- Filip Gruszczyński -- You received this message because you are

Re: Djangoprojects tutorial

2010-06-28 Thread Allen Machary
Hi Eduan I looks like you have not added your polls app in the Settings.py file. Open your setting.py file find the installed apps.. which will look something like this. INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contr

Re: Admin Search Engline

2010-06-28 Thread Massimiliano della Rovere
Yes that's my idea. Can you tell me which class/method in the admin files is responsible for the search engine so that I can extend it? On Mon, Jun 28, 2010 at 10:27, euan.godd...@googlemail.com wrote: > I think that would be quite an undertaking as you would need to write > an expression parser

Re: Caught ViewDoesNotExist while rendering: Could not import smsnotifications.views. Error was: No module named forms

2010-06-28 Thread Daniel Roseman
On Jun 27, 1:26 pm, Allen Machary wrote: > Hi All, > i have a problem in import problem. in importing forms.py in views.py > here are my files both located in smsnotifications app >  -- smsnotifications/forms.py > from django.forms import ModelForm > from smsnotifications.models import SmsNotifica

Re: error at first page of django tutorial

2010-06-28 Thread Kenneth Gonsalves
On Monday 28 June 2010 13:51:28 samie wrote: > not able to fix it yet.. > > plz explain in detail.. > please go and learn the basics of python - as already suggested in this thread -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You received this message because you are su

Re: error at first page of django tutorial

2010-06-28 Thread Daniel Roseman
On Jun 28, 9:21 am, samie wrote: > On Jun 28, 12:55 pm, Daniel Roseman wrote: > > > On Jun 28, 8:49 am, samie wrote: > > > > sir m getting problem in running my first django tutorial > > > page..available athttp://docs.djangoproject.com/en/dev/intro/tutorial01/ > > > > i had already tried it for

Re: Admin Search Engline

2010-06-28 Thread euan.godd...@googlemail.com
I think that would be quite an undertaking as you would need to write an expression parser and monkey around with the search code in admin. If you succeed, I'd be interested to see the result. Euan On Jun 28, 8:36 am, Massimiliano della Rovere wrote: > I'd like to modify the default search engi

Re: not able to install django development version

2010-06-28 Thread samie
done thnx.. -- 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, visit thi

Re: not able to install django development version

2010-06-28 Thread samie
done thnx.. -- 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, visit thi

Re: Why is ModelAdmin to Model a 1-1 relationship?

2010-06-28 Thread euan.godd...@googlemail.com
That's a great solution. Much better than messing around with the metaclass :) On Jun 27, 5:47 am, Lee Hinde wrote: > On Fri, Jun 25, 2010 at 2:54 PM, patjenk wrote: > > In our application, we have a Model that has a boolean field named > > "deleted". When the delete() method is called, we set t

Re: error at first page of django tutorial

2010-06-28 Thread samie
On Jun 28, 12:58 pm, Kenneth Gonsalves wrote: > On Monday 28 June 2010 13:19:45 samie wrote: > > > IndentationError at admin > > unexpected indent (urls.py, line 5) > > go to line 5 of your urls.py file and fix the indentation > -- > Regards > Kenneth Gonsalves > Senior Associate > NRC-FOSS at A

Re: error at first page of django tutorial

2010-06-28 Thread samie
On Jun 28, 12:55 pm, Daniel Roseman wrote: > On Jun 28, 8:49 am, samie wrote: > > > > > > > sir m getting problem in running my first django tutorial > > page..available athttp://docs.djangoproject.com/en/dev/intro/tutorial01/ > > > i had already tried it for 3 times earlier.. but not making it

Re: Caught ViewDoesNotExist while rendering: Could not import smsnotifications.views. Error was: No module named forms

2010-06-28 Thread Allen Machary
anyone with any idea on this..? -- 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 mor

Re: error at first page of django tutorial

2010-06-28 Thread Kenneth Gonsalves
On Monday 28 June 2010 13:19:45 samie wrote: > IndentationError at admin > unexpected indent (urls.py, line 5) > go to line 5 of your urls.py file and fix the indentation -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You received this message because you are subscribed to

Re: error at first page of django tutorial

2010-06-28 Thread Daniel Roseman
On Jun 28, 8:49 am, samie wrote: > sir m getting problem in running my first django tutorial > page..available athttp://docs.djangoproject.com/en/dev/intro/tutorial01/ > > i had already tried it for 3 times earlier.. but not making it up to// > > i have installed django fromhttp://bitbucket.org/mi

error at first page of django tutorial

2010-06-28 Thread samie
sir m getting problem in running my first django tutorial page..available at http://docs.djangoproject.com/en/dev/intro/tutorial01/ i had already tried it for 3 times earlier.. but not making it up to// i have installed django from http://bitbucket.org/mirror/django-trunk that u earlier told me

Admin Search Engline

2010-06-28 Thread Massimiliano della Rovere
I'd like to modify the default search engine in the django admin interface so that is can search metadata too like values depending on sql COUNT() using google style prefixes in these cases. Can somebody help me telling which class/method in the admin files is responsible for the search engine so t