Error downloading dia2django

2011-03-17 Thread mohaaron
Anyone know why I am getting the following error trying to download dia2django? me@computername:~$ wget --no-check-certificate https://svn.devnull.li/main/pythonware/dia2django/trunk/src/dia2django.py --2011-03-17 17:22:57--

Re: Error downloading dia2django

2011-03-17 Thread Matt Robenolt
Looks like the server is having an issue. Connections on https are timing out. And upon looking at the last modified date on the wiki page for it... it hasn't been updated in 3 years, so I'd safely say it no longer exists and definitely wouldn't work with any modern version of Django. -- You

Re: Cannot import models.py in views.py

2011-03-17 Thread Matt Robenolt
You shouldn't be running manage.py from within any other directory but the top level project directory. That will screw up your PYTHON_PATH and potentially cause conflicts. Without seeing anything, if you go up a directory into just ~/webservices and ran `python manage.py shell`, you should be

Add, Edit and Delete link using Forms (not templates) per row without using built django-admin functionality

2011-03-17 Thread django beginner
Hi Django users, I am having some dilemma over converting simple admin page Template (without having to use the built in django-admin functionality) by using forms, and not templates, I have the following sample Admin page that allows users to add, edit and delete record per row to Forms: (Edit

Add, Edit and Delete link using Forms (not templates) per row without using built django-admin functionality

2011-03-17 Thread djangodjango django
Hi Django users, I am having some dilemma over converting simple admin page *Template*(without having to use the built in django-admin functionality) by using forms, and not templates, I have the following sample Admin page that allows users to add, edit and delete record per row* to Forms*:

Re: django-admin-py?

2011-03-17 Thread Ovnicraft
On Thu, Mar 17, 2011 at 4:00 PM, gh wrote: > Hi > > I´m new to django and maybe this is a simple thing but I need some > advise what's wrong. > > I try to create a project and I have moved the dajango-admin.py to the > Python bin folder but I allways get this result when

Re: django-admin-py?

2011-03-17 Thread Sithembewena Lloyd Dube
Ramirez, you are right. It is django-admin.py, not manage.py. And yes, he's on Windows (C:\...) Oh hell! (cue Walter's voice from Jeff Dunham's comedy show)... Beats me how this doesn't work. Then again, Windows is full of (nasty?) surprises... Glenn, try manually adding django-admin.py to your

Re: Cannot import models.py in views.py

2011-03-17 Thread Ricardo F. Teixeira
Hi Shaw and Bill, Yeap, I already have done that with no luck. ricardo@vulcanus:~/webservices/reviewsapp$ python views.py Traceback (most recent call last): File "views.py", line 13, in from webservices.reviewsapp.models import * ImportError: No module named webservices.reviewsapp.models

Re: django-admin-py?

2011-03-17 Thread Mike Ramirez
On Thursday, March 17, 2011 03:16:44 pm Sithembewena Lloyd Dube wrote: > Hello Glenn, > > What operating system are you on? You seem to have tried to use manage.py > correctly, but I suspect this has to do with your Django installation > before you even tried to create a project. > > On Thu, Mar

Re: django-admin-py?

2011-03-17 Thread Sithembewena Lloyd Dube
Please also provide the Django version? Thanks. On Fri, Mar 18, 2011 at 12:16 AM, Sithembewena Lloyd Dube wrote: > Hello Glenn, > > What operating system are you on? You seem to have tried to use manage.py > correctly, but I suspect this has to do with your Django

Re: django-admin-py?

2011-03-17 Thread Sithembewena Lloyd Dube
Hello Glenn, What operating system are you on? You seem to have tried to use manage.py correctly, but I suspect this has to do with your Django installation before you even tried to create a project. On Thu, Mar 17, 2011 at 11:00 PM, gh wrote: > Hi > > I´m new to django

Re: Django templates: accessing list element attributes throws error

2011-03-17 Thread Nathanael Abbotts
Thanks, will try that once I get to my computer : ) -- 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

Re: Help with Apache/Nginx combo

2011-03-17 Thread Matt Robenolt
You set up a 'media.aplikacje' alias in your nginx config, but your media is still attempting to be pulled from 'aplikacje/media/', so at this point, your MEDIA_URL is wrong. MEDIA_URL needs to be 'http:// media.aplikacje/' Or, you can change the server{} config for nginx to have the alias /

Re: /admin weirdness

2011-03-17 Thread chris hendrix
admin models are registered in models.py for each app. Some people say to use an admin.py file but I've never had to do that before. currently using: Django 1.2.3 (mod_wsgi 3.2/Python 2.6) and hosting at webfaction There's nothing special about the model view. Here's one of them:

django-admin-py?

2011-03-17 Thread gh
Hi I´m new to django and maybe this is a simple thing but I need some advise what's wrong. I try to create a project and I have moved the dajango-admin.py to the Python bin folder but I allways get this result when I´m typing the following and even if I try django-admin.py --version

Re: Will mange.py use a current running Django instance if available?

2011-03-17 Thread Matt Robenolt
Actually, after snooping around, I was doing something odd to think it was sharing memory and isn't. Now, I guess the question stands: is a manage.py script lightweight enough to be hit frequently without using excess memory on the server? It looks to be pretty lightweight. On Mar 17, 4:40 pm,

Will mange.py use a current running Django instance if available?

2011-03-17 Thread Matt Robenolt
If I have Django running with a wsgi adapter, and I execute a manage.py command, will it spawn a new instance of Django just to execute the command, or will it use an existing running instance? I need to make a decision on writing a command that will be hit pretty frequently by a node.js

Re: Help with Apache/Nginx combo

2011-03-17 Thread Javier Guerra Giraldez
On Thu, Mar 17, 2011 at 3:04 PM, maciekjbl wrote: > Ok ... so my main problem is that it's my first Django, Apache, Nginx > instalation ever. I'd say keep it simple. specially on an intranet-only setup where you're unlikely to need the absolute maximum performance. the

File Upload fails

2011-03-17 Thread arapaho
Hi, Please scratch the previous question--I found template errors were the cause. Thanks, Bob -- 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,

Re: Help with Apache/Nginx combo

2011-03-17 Thread maciekjbl
Ok ... so my main problem is that it's my first Django, Apache, Nginx instalation ever. I just don't know where to look when it's about debugging, and not where in terms of places but order of search. What I know is mod_wsgi works because I have data in place. I know that proxy works because of

Re: Django templates: accessing list element attributes throws error

2011-03-17 Thread werefr0g
Hi, you can try {{ list.0.title }} Regards, -- 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

Re: /admin weirdness

2011-03-17 Thread Casey Greene
Where are you registering your models for the admin site and what does that code look like? Casey On 03/17/2011 03:14 PM, chris hendrix wrote: yeah the urls file looks fine... it only happens randomly but seems tied to DEBUG=False for some reason... not sure why that would make a difference.

Django templates: accessing list element attributes throws error

2011-03-17 Thread Nathanael Abbotts
I have a list of python objects with attributes, which is supplied to the django templating engine. I access the first element in the list, to get a particular attribute 'title', from it. Here is the code: {{ list|first.title }} The error given is: TemplateSyntaxError: Could not parse the

Re: Model with several ManyToManyFields - related_name problem

2011-03-17 Thread werefr0g
Hello, I believe you need related_name, for disambiguation at least. Maybe by setting a db_table you can bypass the related_name but I'm not convinced. Actually, I'm "parasiting" your post to ask when "[we]'d prefer Django didn't create a backwards relation"? Regards, -- You received this

Re: natural keys for auth.user and group

2011-03-17 Thread Rainy
I fixed the earlier issue, which was happening during serialization, by using add_to_class() class method, but now I'm running into an issue with deserialize(): [...] for deobj in deserialize(fmt, val, ensure_ascii=False, use_natural_keys=True): File

Re: /admin weirdness

2011-03-17 Thread chris hendrix
yeah the urls file looks fine... it only happens randomly but seems tied to DEBUG=False for some reason... not sure why that would make a difference. On 03/17/2011 03:09 PM, werefr0g wrote: Hi Bobby, Maybe some mistake on your url.py, for example if you have an app named "app" and a model

Re: File Upload fails

2011-03-17 Thread Matias Aguirre
You are missing the enctype form attribute needed for files input fields. Your form definition should be: Check http://www.w3.org/TR/html401/interact/forms.html#adef-enctype for details. Matías Excerpts from arapaho's message of Thu Mar 17 15:53:45 -0300 2011: > Hi, > > Rather new to

Re: /admin weirdness

2011-03-17 Thread werefr0g
Hi Bobby, Maybe some mistake on your url.py, for example if you have an app named "app" and a model named "model", you'll try to get this url to add a new "model" /admin/app/model/add/ Usually, you'll write your urls.py like this: (r'^app/', include('app.urls')), (r'^admin/',

File Upload fails

2011-03-17 Thread arapaho
Hi, Rather new to Django and using 1.2.5 and Windows, I am hung up trying to upload a file. I get a post request with request.FILES empty. My VIEW is: def intro(request): c = {} c.update(csrf(request)) if request.method == 'POST': #see if form submitted form =

Re: Not Printing stmt in for loop

2011-03-17 Thread Anurag Chourasia
This is a Python Question (not Django) How are you populating cr? Did you check if there are any rows at all before looping over the rows? Regards, Anurag On Fri, Mar 18, 2011 at 12:07 AM, NavaTux wrote: > Here I ahd a piece of code to execute my custom python function

Re: ModelChoiceField problems

2011-03-17 Thread Shawn Milochik
I believe you can filter them using ModelAdmin.formfield_for_choice_field. Check out the docs here: http://docs.djangoproject.com/en/1.2/ref/contrib/admin/ Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Not Printing stmt in for loop

2011-03-17 Thread NavaTux
Here I ahd a piece of code to execute my custom python function just i executed via python shell ,so i used print statement to know some values but it does't respond anything May i know the reason please? this is the code which i executed successfully ">>> for i in cr: ... tic,

Re: Cannot import models.py in views.py

2011-03-17 Thread Bill Freeman
Try: from webservices.reviewsapp.models import Category Bill On Thu, Mar 17, 2011 at 1:44 PM, Ricardo F. Teixeira wrote: > Hi list : ) > > I'm having a strange problem. I'm developing a webservice that > communicate with a database. > In my views.py file I'm trying

Re: Cannot import models.py in views.py

2011-03-17 Thread Shawn Milochik
Try changing from: from reviewsapp.models import Category to: webservices.reviewsapp.models import Category It's all about the PYTHONPATH. When you use manage.py it configures your environment which allows you to import in your Django app and the shell. Shawn -- You received this

Cannot import models.py in views.py

2011-03-17 Thread Ricardo F. Teixeira
Hi list : ) I'm having a strange problem. I'm developing a webservice that communicate with a database. In my views.py file I'm trying to import models.py to manage some queries but I got an error in views.py when I import models.py. ricardo@vulcanus:~/webservices/reviewsapp$ python views.py

ModelChoiceField problems

2011-03-17 Thread Thiago Carvalho D' Ávila
Hi, I'm making one app with 3 classes: emploee, company and department. 1- When I edit an emploee I need to know his company, and after to have a field with all the departments from the selected company. But when I use ModelChoiceField I see all departments from all companies. 2- Another problem

Re: How can I create Django web page to connect Facebook login and registration?

2011-03-17 Thread Calvin Spealman
Nge, You should check out the excellent django-socialauth project, which can provide all the hookup you need to authenticate via Facebook (or twitter, linkedin, and others). Here is a good article to get started:

Re: How To Specify Initial/Default/Empty Entry For Dropdown Using the forms.Select Widget

2011-03-17 Thread hank23
Thanks I took a look and since I tried to initialize my select widget several different ways while trying the options shown in the initial portion of the forms fields document I was unable to do it successfully, without an actual axample which uses a select widget. I found a way around it anyway

Model with several ManyToManyFields - related_name problem

2011-03-17 Thread George Lund
I have a model with more than one (3 in fact) ManyToManyFields which point to the same other model. As long as I specify distinct related_names for each, all is well. But the documentation [1] suggests that if I don't need the backwards relation, then specifying '+' as the related_name should

Re: Generating fieldsets

2011-03-17 Thread Vinicius Massuchetto
2011/3/17 Vinicius Massuchetto : > Is it possible to generate different fieldsets for admin forms? I > would like to retrieve different fieldsets for different users. I managed doing this according to this procedure:

/admin weirdness

2011-03-17 Thread Bobby Roberts
when i login to my /admin area, I can see my models on the main model listing. When I click on a model to add/edit/delete data, I'm getting a 404. No errors are being thrown. Has anyone else run into something like this? -- You received this message because you are subscribed to the Google

Re: Django projects, apps, and git repos

2011-03-17 Thread Jason Culverhouse
Ben, You should a have a look at https://github.com/bueda/django-boilerplate "django-boilerplate is an attempt to set up a standard convention for Django app layouts, to assist in writing utilities to deploy such applications. A bit of convention can go a long way." It's very similar to what

Re: How can I create Django web page to connect Facebook login and registration?

2011-03-17 Thread Shawn Milochik
It's easy to create an authentication backend: http://docs.djangoproject.com/en/1.2/topics/auth/#writing-an-authentication-backend If you know (or can figure out) what code you have to write in order to authenticate against Facebook, just drop that code into your custom authentication backend

How can I create Django web page to connect Facebook login and registration?

2011-03-17 Thread Nge Nge
Hi All! I want to create Django web project. I have to connect from my Django project to Facebook via login and registration when user login or register on my web site. Please guide what need for me because I am a beginner on Django and Python. Although I read via online about Django connect

Generating fieldsets

2011-03-17 Thread Vinicius Massuchetto
Is it possible to generate different fieldsets for admin forms? I would like to retrieve different fieldsets for different users. Thanks -- Vinicius Massuchetto -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Help with Apache/Nginx combo

2011-03-17 Thread Javier Guerra Giraldez
On Thu, Mar 17, 2011 at 7:53 AM, maciekjbl wrote: > My problem is in the intranet this site > won't see the world :) why is this a problem? you can use the same setup. the main difference (at least for my own intranet-only apps) is that usually you don't get as many

Re: How To Specify Initial/Default/Empty Entry For Dropdown Using the forms.Select Widget

2011-03-17 Thread Tom Evans
On Thu, Mar 17, 2011 at 2:58 PM, hank23 wrote: > Is it possible to specify a default selected option for the > forms.Select widget of a forms.CharField form field? If so how is it > coded? Here is my current widget's code from my form definition: > >

How To Specify Initial/Default/Empty Entry For Dropdown Using the forms.Select Widget

2011-03-17 Thread hank23
Is it possible to specify a default selected option for the forms.Select widget of a forms.CharField form field? If so how is it coded? Here is my current widget's code from my form definition: widget=forms.Select(attrs={ 'name': 'rptlist', 'id': 'rptlist', 'size': '1', 'select-one':

Re: About using Django Auth with my app, Auto saving the User

2011-03-17 Thread Shawn Milochik
Here's an alternative way to do it. Something like (in view): post.save(user = request.user) And in your save override: user = kwargs.pop('user') self.user = user super(Post, self).save(*args, **kwargs) The reason you pop off the 'user' value instead of just reading it is that

Re: About using Django Auth with my app, Auto saving the User

2011-03-17 Thread AJ
My apologies, I guess that was a rude thing to write but believe me, my intention was not to be rude at all. I know that no one here owes me an answer and I respect that folks still help. Please accept my apologies if I came off as a rude person in my last message. Thanks a lot for your help.

Re: About using Django Auth with my app, Auto saving the User

2011-03-17 Thread Daniel Roseman
On Thursday, March 17, 2011 2:33:50 PM UTC, AJ wrote: > > No one? > > On Mar 16, 10:05 pm, AJ wrote: > > I have a model like this: > > > > class Post (models.Model): > > name = models.CharField(max_length=1000, help_text="required, name > > of the post") > >

Re: About using Django Auth with my app, Auto saving the User

2011-03-17 Thread AJ
No one? On Mar 16, 10:05 pm, AJ wrote: > I have a model like this: > > class Post (models.Model): >     name = models.CharField(max_length=1000, help_text="required, name > of the post") >     description = models.TextField(blank=True) >     custom_hashed_url =

Re: IOError: request data read error

2011-03-17 Thread Tom Evans
On Thu, Mar 17, 2011 at 1:51 PM, Komkov Alexander wrote: > Hi, >       We have a web app running on Django 1.3.0. I get emails about > IOError as below: > > Traceback (most recent call last): > >  File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/ >

IOError: request data read error

2011-03-17 Thread Komkov Alexander
Hi, We have a web app running on Django 1.3.0. I get emails about IOError as below: Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/ base.py", line 104, in get_response response = callback(request, *callback_args, **callback_kwargs)

Re: All views require login?

2011-03-17 Thread Shawn Milochik
Thanks for that. I wrote my own middleware for this, but the snippet is better-implemented than mine. Shawn -- 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

Re: How to work with views like classes

2011-03-17 Thread Isaac XxX
Thanks for your responses. The problem here is that there are some "dirty" solutions to this problem, but i'm sure there is a good way to proceed with it. This issue should be really simple to resolve if django make use of classes instead of functions for views, and then, template would be

Re: Help with Apache/Nginx combo

2011-03-17 Thread maciekjbl
Nate it looks really interesting but I see the same problem that I already have. Most of help about setting up Django is base on assumption that it will be site in the internet. My problem is in the intranet this site won't see the world :) . I know it should be less work to do and less problems

Re: All views require login?

2011-03-17 Thread Gonzalo Delgado
El 17/03/11 09:30, galgal escribió: I need to make an application in which all views require login. Is there any good way to do that and not to use @login_required() decorator with all methods? Yes there is: http://djangosnippets.org/snippets/1220/ -- Gonzalo Delgado

All views require login?

2011-03-17 Thread galgal
I need to make an application in which all views require login. Is there any good way to do that and not to use @login_required() decorator with all methods? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: How to work with views like classes

2011-03-17 Thread Daniel Roseman
On Thursday, March 17, 2011 11:35:55 AM UTC, chubz wrote: > > What I've found as a solution, though I don't know how much it is > recommended as a programming practice is to have your variable defined in a > "custom" request context and then use that request context instead of the > default

Re: How to work with views like classes

2011-03-17 Thread Borislav Petrović
What I've found as a solution, though I don't know how much it is recommended as a programming practice is to have your variable defined in a "custom" request context and then use that request context instead of the default one. You create you request context and based on the default context then

Re: file upload size problem

2011-03-17 Thread vamsy krishna
Yes Tom, thanks. That makes sense. And yes it works like a charm on Opera. On Mar 17, 2:47 pm, Tom Evans wrote: > On Thu, Mar 17, 2011 at 6:51 AM, vamsy krishna wrote: > > That is true Michal. My understanding is that the server does send > >

Re: my assertRases test does not call the clean() method

2011-03-17 Thread Kenneth Gonsalves
On Thu, 2011-03-17 at 03:26 -0700, Daniel Roseman wrote: > > > This has nothing to do with the use of assertRaises. Creating a model > programmatically does *not* call clean(), as clearly specified in the > documentation >

getting u'string' at the beginning of each item in a list

2011-03-17 Thread cuteangel
def search_mov(movie_name): try: from django.db import connection, transaction cursor = connection.cursor() cursor.execute("select query from Winteract_Wogmainteract where query like %s",['%'+movie_name+'%']) row = cursor.fetchall()

Re: getting u'string' at the beginning of each item in a list

2011-03-17 Thread Daniel Roseman
On Thursday, March 17, 2011 9:55:49 AM UTC, cuteangel wrote: > > def search_mov(movie_name): > try: > from django.db import connection, transaction > cursor = connection.cursor() > cursor.execute("select query from Winteract_Wogmainteract > where

Re: getting u'string' at the beginning of each item in a list

2011-03-17 Thread Tom Evans
On Thu, Mar 17, 2011 at 9:55 AM, cuteangel wrote: >  def search_mov(movie_name): >        try: >            from django.db import connection, transaction >            cursor = connection.cursor() >            cursor.execute("select query from Winteract_Wogmainteract > where

Re: my assertRases test does not call the clean() method

2011-03-17 Thread Daniel Roseman
On Thursday, March 17, 2011 9:47:50 AM UTC, lawgon wrote: > > hi, > > I have a test like this: > > > self.assertRaises(ValidationError,Costtocompany.objects.create,profile=self.profile1, > company_laptop = True, > ctc_pa=1, >

my assertRases test does not call the clean() method

2011-03-17 Thread Kenneth Gonsalves
hi, I have a test like this: self.assertRaises(ValidationError,Costtocompany.objects.create,profile=self.profile1, company_laptop = True, ctc_pa=1, ctc_pm =1,

Re: file upload size problem

2011-03-17 Thread Tom Evans
On Thu, Mar 17, 2011 at 6:51 AM, vamsy krishna wrote: > That is true Michal. My understanding is that the server does send > back a 413 response as soon as it finds the huge mismatch in the > upload limit and the actual upload size. Also I think the server > immediately

Re: file upload size problem

2011-03-17 Thread vamsy krishna
That is true Michal. My understanding is that the server does send back a 413 response as soon as it finds the huge mismatch in the upload limit and the actual upload size. Also I think the server immediately terminates the connection for the request. The problem however is that the browser