Re: south create_table doesn't work

2012-02-02 Thread Alessandro Candini
Nobody who has experience with south? On Feb 2, 5:14 pm, Alessandro Candini wrote: > I'm trying to use django-south-0.7.3 API's to create a table, following > this:http://south.aeracode.org/docs/databaseapi.html#accessing-the-api > > This is my code: > from south.db import dbs >

Re: Getting started with Django: New Udemy Class, free for a limited time

2012-02-02 Thread Shabda Raaj
I was hoping to get about 100 people in a month, but we already have 289 people signed up in a week. :). I wasn't expecting this. (You can verify this at Udemy.) Because I am still adding the content, I am keeping the price to $9 for the whole of February, and would raise once I am done with

Re: auth groups puzzle

2012-02-02 Thread Mike Dewhirst
I'm going to simplify the use case and live with users being in the same group for all companies. This is only a prototype. If a demand arises in production I'll worry about it then. Sorry to bother you Mike On 3/02/2012 4:58pm, Mike Dewhirst wrote: I want to use the built-in auth_groups

Re: Entering Text into a Database

2012-02-02 Thread Mario Gudelj
Hey dude, Let's say you have some model with fields defined. It's called Business. Looks something like this: class Business(models.Model): id = models.AutoField(primary_key=True) name = models.CharField("Business Name", max_length=NAME, blank=False) You create a ModelForm like this:

auth groups puzzle

2012-02-02 Thread Mike Dewhirst
I want to use the built-in auth_groups permissions system in a many-to-many sense but can't quite figure it out for my use case. Any help will be appreciated. The use case is: users have different types of access (r/o, r/w or admin) to different companies. Any single user can have r/o access

Re: about QuerySet

2012-02-02 Thread newme
so it means when i call user[1] after user[0], it is possible that i will get same record if someone else insert a new record into database between 2 calls. On Feb 1, 5:34 pm, akaariai wrote: > On Feb 1, 9:36 am, newme wrote: > > > do you mean that

Re: Entering Text into a Database

2012-02-02 Thread Python_Junkie
Not sure if this will help, but I have diverted from the standard method of database updates taught in the tutorial. I take a more traditional sql methodology for example in any view that I am using. I collect the data elements via a request and then build a sql statement for example (The

Re: Entering Text into a Database

2012-02-02 Thread ajohnston
On Feb 2, 2:30 pm, ds39 wrote: Is there any page, outside of the > official documentation, that gives an example from beginning to end > regarding how to save ModelForms in your database using views.py > rather than the shell (including sample URLs) ? Also, how would I >

Django Snippet imports?

2012-02-02 Thread Jesramz
What would I have to import to use the following snippet (source: http://djangosnippets.org/snippets/847/)? @register.filter def in_group(user, groups): """Returns a boolean if the user is in the given group, or comma- separated list of groups. Usage:: {% if

Re: Routing to database based on user

2012-02-02 Thread akaariai
On Feb 3, 1:30 am, Tom Eastman wrote: > Here is my solution, I wonder if you could just tell me if you think > there's a major problem with it. > > In simplistic terms, the goal is "whenever a model from wxdatabase is > accessed, route the query to the database specified

Re: problem installing PIL

2012-02-02 Thread Mike Dewhirst
This might help ... http://stackoverflow.com/questions/2088304/installing-pil-python-imaging-library-in-win7-64-bits-python-2-6-4 On 3/02/2012 10:40am, NENAD CIKIC wrote: I came across this problem (the problem is that i can not install PIL on my windows 7 64 bit machine) when I have tried to

problem installing PIL

2012-02-02 Thread NENAD CIKIC
I came across this problem (the problem is that i can not install PIL on my windows 7 64 bit machine) when I have tried to use ImageField. I have first tried to use C++ Express but I came across http://bugs.python.org/issue7511. Then I have tried to use mingw and cygwin but the gcc complied

Re: create users from /etc/passwd?

2012-02-02 Thread Mike Dewhirst
On 3/02/2012 7:00am, Tim wrote: Thanks for all this great information. Thorsten, I do have hope that 'pam' will solve the problem, but if I get nowhere with that, Furbee's links and info will help me go further; I just didn't want the user to have to sign on twice when I don't really care about

Re: Routing to database based on user

2012-02-02 Thread Tom Eastman
On 31/01/12 11:45, akaariai wrote: > On Jan 31, 12:01 am, Tom Eastman wrote: >> Hey guys, >> >> I'm writing a django project that will require me to route queries to >> certain large databases based on who the logged in user is. >> >> So all the tables for

Re: admin list_filter: limit choices to model values?

2012-02-02 Thread Micky Hulse
On Wed, Feb 1, 2012 at 1:59 PM, Micky Hulse wrote: > Anywho... Anyone know when Django 1.4 is scheduled to be released? [quote] The Django 1.4 roadmap Before the final Django 1.4 release, several other preview/development releases will be made

Entering Text into a Database

2012-02-02 Thread ds39
Hello Everyone, I've just started web programming and using Django, and I'm still not sure how to enter text into a database via a page. From everything I've read, the suggestion seems to be that a ModelForm should be used. I've tried to implement this on a simple example model, but I'm sure I'm

advice needed using a form in one app in another

2012-02-02 Thread richard
I have two apps one called mysite and one called register which is a nested app to mysite that handles registration. In mysite app views i have a view that imports the register form from register app and renders to home.html and home.html includes another template called register.html. So the

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

2012-02-02 Thread Johan
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 browse to http://http://groups.google.com/group/django-users?hl=en.

Re: create users from /etc/passwd?

2012-02-02 Thread Tim
Thanks for all this great information. Thorsten, I do have hope that 'pam' will solve the problem, but if I get nowhere with that, Furbee's links and info will help me go further; I just didn't want the user to have to sign on twice when I don't really care about authentication, just user

Re: Newbie django/python with C++ background wants enums

2012-02-02 Thread ajohnston
I'm straying a bit off-topic here, but I forgot to mention that other way I've seen people do 'enum' in Python is: >>> class Colors(object): ... RED, GREEN, BLUE = range(3) ... >>> c = Colors() >>> c.RED 0 >>> c.BLUE 2 >>> c.GREEN 1 Not sure this helps much in this particular case though.

Re: django-mptt compared w/ django-treebeard

2012-02-02 Thread creecode
Hello Aljosa, I wouldn't assume that just because something hasn't been updated for awhile that it isn't good. It simply could be that the app does what it needs to and there hasn't been a reason to change it. You might want to contact the app authors and ask if their projects are actively

[django-taggit] Recording additional tagging metadata with the admin

2012-02-02 Thread Lorenzo Franceschini
Hi, I have a question about ``django-taggit`` and the admin site. I have written a custom intermediate model [1] for storing additional tagging metadata, i.e. the user doing the tagging and when the tagging happen: class TaggedItem(GenericTaggedItemBase, TaggedItemBase): tagger =

Re: Need help regarding url patterns

2012-02-02 Thread akaariai
On Feb 2, 4:57 pm, ankitrocks wrote: > Please take a look at the following files: > > http://pastebin.com/F86G9XJn > > http://pastebin.com/p6gArpuG > > http://pastebin.com/zxNHVHbV > > http://pastebin.com/Rf9Kg9jf > > Now my problem is that, I want all the logout links in

Re: create users from /etc/passwd?

2012-02-02 Thread David Fischer
Depending on your intranet, you may already have an LDAP directory. If you do, I would use a combination of Apache, mod_ldapand Django's RemoteUserMiddleware . -- You received

Re: Newbie django/python with C++ background wants enums

2012-02-02 Thread ajohnston
I would probably do it Bruno's way, since it is more explicit, but just so you know, there are some enumeration tools in Python. Just not an 'enum' type: >>> base_choices = ['No', 'Yes'] <-- transform this any way you want: >>> choices = list(enumerate(base_choices)) >>> choices [(0, 'No'), (1,

Need help regarding url patterns

2012-02-02 Thread ankitrocks
Please take a look at the following files: http://pastebin.com/F86G9XJn http://pastebin.com/p6gArpuG http://pastebin.com/zxNHVHbV http://pastebin.com/Rf9Kg9jf Now my problem is that, I want all the logout links in the templates point to polls/login and this change should also be reflected in

Re: Newbie django/python with C++ background wants enums

2012-02-02 Thread NENAD CIKIC
thanks, to all. I have now some code to study and understand. Nenad -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/WZCA-XCSg_IJ. To post to this group,

base.css 404ing on Django 1.4a1

2012-02-02 Thread Alec Taylor
Trunk version cannot load Admin CSS. First I tried setting the ADMIN_MEDIA_PREFIX to MEDIA_PREFIX, when that didn't work I tried manual replacing. Yes, I know it has been depreciated and that the css are stored in django\django\contrib\admin\static\admin\css, however it did not work when omitted

Re: Help Me With omab/django-socialauth

2012-02-02 Thread Thorsten Sanders
I took your config and its working fine, maybe your twitter api key is wrong? On 02.02.2012 11:22, coded kid wrote: I'm getting a redirect loop error. Whats the probs? On Feb 1, 1:22 pm, Thorsten Sanders wrote: Some sort of error traceback/description would be

Re: ImportError at /accounts/login/

2012-02-02 Thread Miten
Hi, Thanks for reply. I sought help from irc django channel and they asked for the same. Actually in urls.py in url call we cannot include views. I corrected it to plain url string and it worked. Regards, Miten. On Feb 2, 8:49 pm, akaariai wrote: > I don't think we are

Re: create users from /etc/passwd?

2012-02-02 Thread Thorsten Sanders
https://bitbucket.org/maze/django-pam/ maybe that helps? On 02.02.2012 16:47, Tim wrote: I'm running Django 1.3.1 on FreeBSD + Apache2.2 inside an intranet. I do not grok authentication, so here is my problem and a question about how I can solve it (maybe). What I need is the name of the

Re: create users from /etc/passwd?

2012-02-02 Thread Furbee
Hi Tim, I'm not totally sure, but I don't think this will work. You could parse the passwd file to get the usernames, but the passwords are encrypted. Since you don't have the system's decryption key, you would not be able to determine the password. If you just used what is in /etc/shadow it

south create_table doesn't work

2012-02-02 Thread Alessandro Candini
I'm trying to use django-south-0.7.3 API's to create a table, following this: http://south.aeracode.org/docs/databaseapi.html#accessing-the-api This is my code: from south.db import dbs dbs['lc'].create_table('test', [ ('id', models.AutoField(primary_key=True)), ('name',

Re: ImportError at /accounts/login/

2012-02-02 Thread akaariai
I don't think we are able to help you without more detail. The browser window should contain the lines which caused the error (when run with settings.DEBUG=True). Include those lines, and it is more likely that you get an answer. Including full stack trace of the ImportError is even better. -

create users from /etc/passwd?

2012-02-02 Thread Tim
I'm running Django 1.3.1 on FreeBSD + Apache2.2 inside an intranet. I do not grok authentication, so here is my problem and a question about how I can solve it (maybe). What I need is the name of the user who hits the application. I don't care about the password, I just need to know who they

ImportError at /accounts/login/

2012-02-02 Thread Miten
Hi, I am trying simple generic view + auth and get exception as below. The dpaste shows traceback. Please guide what am I missing. From manage shell I am able to import login view fine but when I runserver and try to go to url it gives the error. Let me know if need more info.

Startup seeks Python dev for large scale scraping / data mining

2012-02-02 Thread Cal Leeming [Simplicity Media Ltd]
Hi all, If anyone is interested in the below spec, please feel free to contact me on cal.leem...@insurancezebra.com Cheers Cal InsuranceZebra, an Innovation Works, Inc. AlphaLab company seeks a Python developer to join its exciting entrepreneurial team - on a remote working basis with

Re: ANN: Releasing Django Media Tree, a media file management application for the Django admin

2012-02-02 Thread Gabriel - Iulian Dumbrava
Hi Samuel, thanks for the update. Is there an easy way to use it within TinyMCE? I have used filebrowser in the past, but I would like to use yours instead. Thanks! Gabriel On 28 ian., 07:03, Samuel Luescher wrote: > Hi, > > I just pushed a massive update

Re: Newbie django/python with C++ background wants enums

2012-02-02 Thread Pavlo Kapyshin
https://github.com/daevaorn/turbion/blob/master/turbion/bits/utils/enum.py -- 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 Me With omab/django-socialauth

2012-02-02 Thread coded kid
I'm getting a redirect loop error. Whats the probs? On Feb 1, 1:22 pm, Thorsten Sanders wrote: > Some sort of error traceback/description would be helpful, from a quick > look it seems all right. > > On 01.02.2012 13:23, coded kid wrote: > > > > > Hey guys, I'm facing a

Re: template error in html forms

2012-02-02 Thread TANYA
thanks, the template error went away but adding this code to views.py still gives search error. def search(request): error = False if 'q' in request.GET: q = request.GET['q'] if not q: error = True else: books =

Re: template error in html forms

2012-02-02 Thread TANYA
os.path.join(PROJECT_PATH, 'templates'), solved the error but the old error with search is still there. On Wed, Feb 1, 2012 at 3:00 PM, yati sagade wrote: > I've never run in to a TemplateError for anything other than what I > pointed out - maybe in the settings module

Re: Newbie django/python with C++ background wants enums

2012-02-02 Thread bruno desthuilliers
On Feb 1, 10:45 pm, NENAD CIKIC wrote: > Hello, the subject expresses my discomfort with certain python > characteristics, given my background, and my lack of python knowledge. > Specifically lets say that I have a model with a Text field and char field. > The char field is