Re: Django for a large social networking or photo sharing site?

2011-11-22 Thread Russell Keith-Magee
On Tue, Nov 22, 2011 at 9:02 AM, badlearner wrote: > Hello, > > [This is the first time I am using Google Groups and/or mailing lists, > so please bear with me if I do something wrong initially.] > > Is Django web framework apt for a large social networking or photo > sharing site? (Think one that

Re: How-to for static files?

2011-11-22 Thread Gchorn
Oh yes, I definitely have this in my INSTALLED_APPS list (as simply 'myapp'). Sorry I left it out; I thought this was necessary regardless of whether or not I was using static files, so I didn't include it in the list of settings I changed just to enable static files. I do want to reiterate that

django_auth_ldap cannot get group search to work

2011-11-22 Thread Michel30
Hi all, I am using django_auth_ldap to authenticate users. I want to limit them to members of a group 'MT' but I cannot get it to work even though it looks like I am doing things as http://packages.python.org/django-auth-ldap/ shows me :-( This is my relevant stuff from settings.py: import

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 get_my_property

Re: Editable datagrid

2011-11-22 Thread Mike Seidle
On Monday, November 21, 2011 03:46:49 AM Vikas Rawal wrote this and sent it to To: Django users :: > I am new to django and to web programming. I am trying to build a > database application for entering/querying/viewing data from a mysql > database. The data entry module needs to have datagrids

Re: Django for a large social networking or photo sharing site?

2011-11-22 Thread badlearner
Thank you Russ, for all the clarification. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.c

Re: How-to for static files?

2011-11-22 Thread xordoquy
On Tue, 22 Nov 2011 02:16:45 -0800 (PST), Gchorn wrote: > Oh yes, I definitely have this in my INSTALLED_APPS list (as simply > 'myapp'). Sorry I left it out; I thought this was necessary > regardless of whether or not I was using static files, so I didn't > include it in the list of settings I c

Re: How-to for static files?

2011-11-22 Thread Mike Dewhirst
On 22/11/2011 9:16pm, Gchorn wrote: Oh yes, I definitely have this in my INSTALLED_APPS list (as simply 'myapp'). Sorry I left it out; I thought this was necessary regardless of whether or not I was using static files, so I didn't include it in the list of settings I changed just to enable stati

Importing html from an external assets server to manage headers and footers

2011-11-22 Thread vanderkerkoff
Hello everyone I've done some initial digging and found some solutions that I can't seem to get working for a variety of reasons, thought I'd ask here. We've got an external assets server that spews out html. I need to load up that html in the base.html template. Something like {% render_html

Re: os.listdir() not returning unicode

2011-11-22 Thread Marc
Thanks Tom for your post. I had read an interesting thread on that subject on groups.google.com/group/modwsgi/browse_thread/thread/ ac729cc408ca516b/ but could get any success trying to put some locale related environment variables in /usr/sbin/envvars. In fact the only required variable to return

Re: os.listdir() not returning unicode

2011-11-22 Thread Tom Evans
On Tue, Nov 22, 2011 at 12:33 PM, Marc wrote: > Thanks Tom for your post. > > I had read an interesting thread on that subject on > groups.google.com/group/modwsgi/browse_thread/thread/ > ac729cc408ca516b/ > but could get any success trying to put some locale related > environment > variables in /

Re: Importing html from an external assets server to manage headers and footers

2011-11-22 Thread Tom Evans
On Tue, Nov 22, 2011 at 12:14 PM, vanderkerkoff wrote: > Hello everyone > > I've done some initial digging and found some solutions that I can't > seem to get working for a variety of reasons, thought I'd ask here. > > We've got an external assets server that spews out html.  I need to > load up t

Starting Your Project With Django-Structurer

2011-11-22 Thread Felipe Arruda
Hi there everyone I've done this app a while ago to use here in my company, and decided to share with you guys. It helps to build your project using a more elaborated structure then the one that is created using django-admin.py. And if you want you can configure and create your own project structu

Re: Importing html from an external assets server to manage headers and footers

2011-11-22 Thread vanderkerkoff
Thanks Tom I went for option 2. Here's what I've done so far, works ok at the moment, will need some tidying up and caching. geturl.py in my mytags/templatetags folder from django import template from django.template import Library, Node register = Library() class GetUrlNode(Node): de

Re: How-to for static files?

2011-11-22 Thread Ivo Brodien
> Finally, I have another question. In my settings.py file, there is actually > no section for TEMPLATE_CONTEXT_PROCESSORS. I have noticed in the > documentation yes. put this in there: ("django.contrib.auth.context_processors.auth", "django.core.context_processors.debug", "django.core.cont

Re: How-to for static files?

2011-11-22 Thread Tom Evans
On Tue, Nov 22, 2011 at 2:42 PM, Ivo Brodien wrote: > > Finally, I have another question. In my settings.py file, there is actually > no section for TEMPLATE_CONTEXT_PROCESSORS. I have noticed in the > documentation > > yes. > put this in there: > > ("django.contrib.auth.context_processors.auth"

Re: Importing html from an external assets server to manage headers and footers

2011-11-22 Thread Tom Evans
On Tue, Nov 22, 2011 at 2:26 PM, vanderkerkoff wrote: > Thanks Tom > > I went for option 2.  Here's what I've done so far, works ok at the > moment, will need some tidying up and caching. > > geturl.py in my mytags/templatetags folder > > from django import template > from django.template import L

Re: How-to for static files?

2011-11-22 Thread Ivo Brodien
>> "django.core.context_processors.tz", > > ISTR that this context processor (tz) only exists in trunk. So if he > puts this literal block in, he will almost certainly have other > issues. True. sorry, since this is the default it should be there anyways. my mistake. And yes, it was copied accid

Re: Django for a large social networking or photo sharing site?

2011-11-22 Thread Steven Elliott Jr
Yes > Hello, > > [This is the first time I am using Google Groups and/or mailing lists, > so please bear with me if I do something wrong initially.] > > Is Django web framework apt for a large social networking or photo > sharing site? (Think one that has to easily and seamlessly scale to > the

Re: LFS 0.6 beta 1 released

2011-11-22 Thread bob
good 2011/11/22 Tim Makobu > From the demo, it looks pretty neat. > > > On Mon, Nov 21, 2011 at 11:09 AM, Kai wrote: > >> Hi, >> >> I'm happy to announce the release of LFS 0.6 beta 1. >> >> LFS is an online shop based on Django and jQuery. >> >> If you want to read more information please refe

IOError at / [Errno 13] Permission denied

2011-11-22 Thread marjenni
Hi all, I have been writing a django app, and testing locally using runserver. Now I am in the process of moving this app to an online server, but am having some problems. On initialisation the app initialises itself with a .csv file I have created, but with the online version I keep getting:

Re: How-to for static files?

2011-11-22 Thread Ivo Brodien
Does your generated HTML source say: ?? In your settings the TEMPLATE_CONTEXT_PROCESSORS should have: “django.core.context_processors.static” The CSS File should go into a folder: myapp/static/stylesheet.css > urlpatterns += staticfiles_urlpatterns() I think you don’t need this. If you hav

how to uninstall django version

2011-11-22 Thread ram
using this website i was downloaded latest official version.after that when iam writing a command like "python manage.py runserver"then iam getting an error like ""raise InvalidTemplateLibrary("Template library %s does not have a variable named 'register'" % taglib_module) django.template.base.Inv

how to uninstall the django version

2011-11-22 Thread ram
i want to uninstall my django version (1.3.1) and again i want to install the same version.can any one say me how to solve it. -- 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

Re: How-to for static files?

2011-11-22 Thread Guillaume Chorn
Hm, this might be something. I never thought of viewing the source for my HTML page. Actually, what I get when I do that is the following: And then when I click on the "stylesheet.css" hyperlink, I get what looks like another source page, but this one is some kind of error page (just to clarif

Re: how to uninstall the django version

2011-11-22 Thread Nikhil Verma
Hey ram If you are in ubuntu (linux/unix) you need to got to 1) /usr/local/lib/python2.6/dist-packages 2) when you do ls there will be directory called django. 3) do rm -rf django. By doing this django will be removed.Now you can install any version of django you want. If you are windows you nee

Re: how to uninstall the django version

2011-11-22 Thread Andre Terra
Ideally, after removing django, you should NOT install it on your site-packages this time around. Instead, install virtualenv[1] and proceed from there. Learn it. It will pay off! Bonus points if you use pip[2][3] as well. Cheers, AT [1] http://pypi.python.org/pypi/virtualenv [2] http://pypi.

Re: IOError at / [Errno 13] Permission denied

2011-11-22 Thread Anoop Thomas Mathew
Hi, What about the permissions of cache folder? Thanks, Anoop atm ___ Life is short, Live it hard. On 22 November 2011 16:05, marjenni wrote: > Hi all, > I have been writing a django app, and testing locally using > runserver. > > Now I am in the process of moving this app to an online serv

Re: Beginner: how to display the list of records with subrecords? (solved)

2011-11-22 Thread Petr Přikryl
My appology, Javier, > Javier Guerra Giraldez write >>Petr Přikryl wrote: >> I tried the tutorial, and I like it, but it is too much of new things >> for me. > >but all these new things are needed to solve your problem. I did study the tutorial, but I had picked only the things that I could dir

Re: IOError at / [Errno 13] Permission denied

2011-11-22 Thread Tom Evans
On Tue, Nov 22, 2011 at 10:35 AM, marjenni wrote: > Hi all, >   I have been writing a django app, and testing locally using > runserver. > > Now I am in the process of moving this app to an online server, but am > having some problems. > > On initialisation the app initialises itself with a .csv f

How to specify a group by field set?

2011-11-22 Thread Joshua Russo
Is there a way to select a list of group by columns? The aggregation methods seem only apply to a single model but I want to use fields from different models to group by. select org.id as organization_id, dep.id as department_id, cat."catId", max(cat.name) as name,

Re: Django for a large social networking or photo sharing site?

2011-11-22 Thread Simon Schmid | FEINHEIT
Hi Badlearner Basically, i totally agree with Russ. But i think, one question is not answered yet: There are many tools for django, that you can use and start to build up a social network style site. have a look at: http://pinaxproject.com/ My suggestion is: just start your project and do not car

Error in GeoDjango Tutorial- Help

2011-11-22 Thread Antonio Rocha
Greetings I'm following this tutorial (https://docs.djangoproject.com/en/dev/ref/ contrib/gis/tutorial/) (Great Workd by the way) but I got this error in load.run() Failed to save the feature (id: 0) into the model with the keyword arguments: {'iso2': u'AG', 'name': u'Antigua and Barbuda', 'area':

Multiple references to same field

2011-11-22 Thread Dejan Noveski
Hi, I am wondering if I can dynamically add multiple references to a same field in a django model. Let's say I have this model: class Entry(models.Model) parent = models.ForeignKey('Entry', null = True, related_name = 'children') ... entry = Entry.objects.get(id=0) Now, I want entry.pos

Looking for my replacement (Lead Developer at a Start-up)

2011-11-22 Thread Kurtis
Hey Guys, I am the lead developer at fireflie.com. The site is going through a total site-rebuild using Django. I'm taking a research position early next month and need to find a replacement very quickly. I can't go into too many details without an Non-Disclosure Agreement. I will point out th

ModelChoiceFields and verbose names

2011-11-22 Thread James
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 = forms.ModelChoiceField(queryset=models.Mortality.objects.none()) secondary_le = fo

Re: Accessing Model Property from Admin Index Page

2011-11-22 Thread Lee
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: {{ app_list.1.models.21.admin_url }} I'm hoping for a similarly simple way to sho

Large Queryset Calculation In Background?

2011-11-22 Thread Nan
Hi folks -- I need to run a fairly CPU-intensive calculation nightly over a dataset that's already large and growing quickly. I'm planning to run this via a cron job, but would like to make sure that it neither eats up the entire CPU nor locks the database, so that my site can continue functionin

Re: Accessing Model Property from Admin Index Page

2011-11-22 Thread creecode
Hello Lee, I think what we are trying to get to is when you say index page are you talking about the admin page that lists the apps and their databases or are you talking about the change list for a particular database. If it's the latter then you might be able to do something with the list_di

Re: Large Queryset Calculation In Background?

2011-11-22 Thread Nikolas Stevenson-Molnar
I wouldn't expect it to lock the database (though someone with more database expertise should address that). I /would/ expect it to consume significant CPU. If you're on UNIX, you could address this issue by making your process 'nice': http://docs.python.org/library/os.html#os.nice The nicer a proc

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: > > {{ app_list.1.m

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 = > forms.Model

Re: How-to for static files?

2011-11-22 Thread Guillaume Chorn
Thank you Ivo. Your suggestion makes a lot of sense so I tried it out. Unfortunately, after adding TEMPLATE_CONTEXT_PROCESSORS and its associated tuple into the settings.py file, I tried to restart the development server to see if it worked and it didn't. I checked the page source again and it's

Re: How-to for static files?

2011-11-22 Thread Ivo Brodien
In your original post you had the url like this: > (r'^home/$','myapp.views.homepage'), than your the url starts with view instead of home so there might be something wrong. just paste these files into somthing like dpaste.com - settings.py - myapp.views.homepage - urls.py cheers On Nov 23,

Re: Large Queryset Calculation In Background?

2011-11-22 Thread Andre Terra
You will definitely need to look into caching those results, perhaps "permanently" in a database. My recommendation is redis[1] and possibly tools like sebleier's django-redis-cache[2]. Cache invalidation is a pain, I know, but it's pretty much the only way to go. Long term, you will need to prof

How do determine which {% load %} item is missing?

2011-11-22 Thread Joshua Russo
I've noticed that instead of generating an error, if a filter or tag is used that is not found in a {% load %} item, the include that contains the error is just skipped. Is there anyway to debug which filter/tag is failing? -- You received this message because you are subscribed to the Google G

Re: Large Queryset Calculation In Background?

2011-11-22 Thread Nan
Thanks, Nik: that looks very handy. I didn't realize you could renice a process from within! So now we just have to figure out whether it blocks database queries at all, since if it does, then the longer it runs the bigger a problem we have. Andre: yes, that's why I'm doing the calculation over

Re: How-to for static files?

2011-11-22 Thread Guillaume Chorn
Sorry, I think I made something confusing. In my original file, I only pasted the URL pattern for the site homepage. However, this is not the page I'm trying to style (or link to the CSS file). The page I'm trying to link to the CSS file is a separate one, which I have previously referred to as

Re: Large Queryset Calculation In Background?

2011-11-22 Thread Tim Chase
On 11/22/11 17:04, Nikolas Stevenson-Molnar wrote: I wouldn't expect it to lock the database (though someone with more database expertise should address that). I /would/ expect it to consume significant CPU. If you're on UNIX, you could address this issue by making your process 'nice' There's a

Django : CSRF and variable handling in a view

2011-11-22 Thread Nolhian
Hello, I've got a subscription form and this view : def index(request): c = RequestContext(request) if request.user.is_authenticated(): return render_to_response('index.html', {'has_account': True}) if request.method == 'POST': form = Signup

Re: How-to for static files?

2011-11-22 Thread Ivo Brodien
Hi, looks fine. yes, show your views.py and you can also hardcode the STATIC_URL in the template to see if the path: src=“/static/stylesheet.css” works. or simply open http://127.0.0.1:8000/static/stylesheet.css in your browser. Again: Where is that CSS file on your disk? On Nov 23, 2011, a

Error while debugging the code in "class file editor source not found" in Runtime.class file

2011-11-22 Thread srinivasan shanmugam
Dear All, I am facing the problem as "class file editor source not found" in Runtime.class file, while running the code in eclipse on android could any body please do the needful in proceeding further As am new to this, pls help me as soon as possible, Thanks, Srinivasan S -- You received thi

Re: Django : CSRF and variable handling in a view

2011-11-22 Thread DrBloodmoney
On Tue, Nov 22, 2011 at 6:54 PM, Nolhian wrote: > Hello, > > I've got a subscription form and this view : > > def index(request): >        c = RequestContext(request) >        if request.user.is_authenticated(): >                return render_to_response('index.html', {'has_account': True}) >    

Widgets

2011-11-22 Thread michael.grant
I'm about to embark on a project that's well suitable to a web framework. I've had my eye on django for a couple years now but haven't done anything more than work through the basic tutorial so far. There's a handful of things I need to do over and over and I'm not sure if these are part of dj

Re: Django : CSRF and variable handling in a view

2011-11-22 Thread Nolhian
So : return render(request,'index.html', {'form': form}) instead of ( in my 2nd question ) : c = RequestContext(request, {'has_account': False,'form': form}) return render_to_response('index.html', c) That answers my two first questions. Thanks :) What about passing a variable set to False ? Sho

Re: Widgets

2011-11-22 Thread Mengu
there are tons of django apps. you can search them, install and use in your application without any problems. for example for your rich text editor need, you can use django- ckeditor application. it also gives you the possibility of browse and upload images on the fly. for the rest of your needs

Re: django tutorial versions

2011-11-22 Thread Derek
This seems to keep happening. It would be incredibly helpful if the Django webpages could add the version number (or dev reference) in dark, bold lettering in the light green toolbar (right near the top of the page, next to the words "Django documentation)! On Nov 21, 9:18 pm, Jesse Aldridge wr