A fun little Django project [Robert Steckroth]

2012-10-12 Thread Robert Steckroth
Hey Gang, I have got my project up on Bitbucket --> https://bitbucket.org/surgemcgee/django_template3d It is a fun Django Project with some nice features. It is simple to get up in going and provides some abstract Django/HTML concepts. -- Bust0ut, Surgemcgee: Systems Engineer --- surgemcgee.com B

User can't edit model even after permissions are issued

2012-10-12 Thread Shawn H
I'm new to Django, and I'm using the admin site to manage my users. I have one app installed, and it has one model. I created a new user, issued that user add, change, and delete privileges (as app | model | privilege), but when I log on as that user, I get the "you don't have permission to ed

User can't edit anything

2012-10-12 Thread Shawn H
I'm new to django, and using the admin site for user management. I've created a new user, issued app | model | permission of add, change, and delete to this user for the app I've built, but when I logon as that user, I get the "you don't have permission to edit anything". The user is active (

Re: get_or_create gave IntegrityError: (1062, "Duplicate entry) error sometimes

2012-10-12 Thread Wei Wei
I am new to Django. But does the error message literally mean you have duplicated records against your unique_together constriction? On Sat, Oct 13, 2012 at 9:47 AM, Zheng Li wrote: > class AB(models.Model): > a = models.ForeignKey(A) > b = models.ForeignKey(B) > c = models.IntegerFi

get_or_create gave IntegrityError: (1062, "Duplicate entry) error sometimes

2012-10-12 Thread Zheng Li
class AB(models.Model): a = models.ForeignKey(A) b = models.ForeignKey(B) c = models.IntegerField(default=0) d = models.FloatField(default=0) e = models.IntegerField(default=0) f = models.FloatField(default=0) class Meta: unique_together = (('a', 'b'),) I have a

Re: perfectionists... motto doesn't fit

2012-10-12 Thread Russell Keith-Magee
On Fri, Oct 12, 2012 at 11:03 PM, bobhaugen wrote: > On Friday, October 12, 2012 7:56:52 AM UTC-5, Russell Keith-Magee wrote: > > Russell (and Jacob), > > I really appreciate the way you moderate the forum. The civility and > helpfulness of the community was one of the main reasons I picked Django

Re: Create table and load data

2012-10-12 Thread Kurtis Mullins
Whoops, sorry that was the master branch. Here you go: https://github.com/django/django/blob/1.4.1/django/core/management/commands/syncdb.py On Fri, Oct 12, 2012 at 4:24 PM, Kurtis Mullins wrote: > Good luck to you! The code is here if you want to start crawling through > it for a good point to p

Re: Create table and load data

2012-10-12 Thread Kurtis Mullins
Good luck to you! The code is here if you want to start crawling through it for a good point to place a breakpoint: https://github.com/django/django/blob/master/django/core/management/commands/syncdb.py On Fri, Oct 12, 2012 at 3:30 PM, Larry Martell wrote: > On Fri, Oct 12, 2012 at 12:22 PM, Kurt

Re: Create table and load data

2012-10-12 Thread Larry Martell
On Fri, Oct 12, 2012 at 12:22 PM, Kurtis Mullins wrote: > On Fri, Oct 12, 2012 at 2:09 PM, Larry Martell > wrote: >> >> >> So my client decided to use xml. I created the file and put it in >> fixtures/initial_data.xml. On my development machine, which is a Mac, >> it worked fine - running syncdb

Re: Create table and load data

2012-10-12 Thread Kurtis Mullins
On Fri, Oct 12, 2012 at 2:09 PM, Larry Martell wrote: > > > So my client decided to use xml. I created the file and put it in > fixtures/initial_data.xml. On my development machine, which is a Mac, > it worked fine - running syncdb loaded the data. But on my client's > machine, which is running Cen

Re: Create table and load data

2012-10-12 Thread Larry Martell
On Thu, Oct 11, 2012 at 4:51 AM, Larry Martell wrote: > On Thu, Oct 11, 2012 at 1:37 AM, Joseph Wayodi wrote: >> On Thu, Oct 11, 2012 at 2:23 AM, Larry Martell >> wrote: >>> I'm having trouble getting django to read my fixture file. I created it in >>> yaml: >>> >>> - model: cdsem.fields >>>

Re: django multi db routing doesnt work wich multiple schemas

2012-10-12 Thread Michał Nowotka
Anyway, look at the query that needs to be executed. This doesn't contain any joins. The only problem is that this perfectly correct query is send to wrong schema although the router suggests a good one. I don't know why, is there anyone who can explain this to me? -- You received this message be

Re: django multi db routing doesnt work wich multiple schemas

2012-10-12 Thread Michał Nowotka
Unfortunately not exactly. Schema in Oracle is a synonym of user so you need name and password. That's why it doesn't fit into tablespaces solution you pointed. There is open ticket about support for multiple schemas but it's still unfinished. This is why I was looking for solution that would work

Re: django multi db routing doesnt work wich multiple schemas

2012-10-12 Thread Tomáš Ehrlich
Sorry, I've just found that schema != tablespace, so my last response is irelevant... Cheers, Tom Dne pátek, 12. října 2012 19:26:53 UTC+2 Tomáš Ehrlich napsal(a): > > Hi Michał, > is "schema" the same as thing as "tablespace"? If so, you should define > them using > db_tablespace meta keywo

Re: django multi db routing doesnt work wich multiple schemas

2012-10-12 Thread Tomas Ehrlich
Hi Michał, is "schema" the same as thing as "tablespace"? If so, you should define them using db_tablespace meta keyword. https://docs.djangoproject.com/en/1.4/topics/db/tablespaces/ DATABASES creates new database connection and it's really not possible to make relations between databases. Cheer

Re: Unhandled exception during validation

2012-10-12 Thread Tomas Ehrlich
Well, in this case, I don't see problem in erroritself (that happens). I see problem in missing trackback (that's not usual). My assuption was that "something" suppress it (don't know if it's possible, but I assume it is). Cheers, Tom Dne Fri, 12 Oct 2012 17:00:01 +0100 Tom Evans napsal(a): >

Re: django multi db routing doesnt work wich multiple schemas

2012-10-12 Thread Michał Nowotka
First of all the error is not from django but from database. Secondly I'm not using different databases but different schemas so relations are possible. The error has nothing to do with foreign key or any relation. It just looks like django is ignoring router suggestion and directs sql query to wro

Re: django multi db routing doesnt work wich multiple schemas

2012-10-12 Thread Tom Evans
On Fri, Oct 12, 2012 at 4:54 PM, mnowotka wrote: > I have django running on oracle backend. I need to use two schemas - one for > a legacy DB, second one for all django related tables. > > So this is my settings.DATABASES: > > DATABASES = { > > 'default' : { > 'ENGINE': 'django.db.back

django multi db routing doesnt work wich multiple schemas

2012-10-12 Thread mnowotka
I have django running on oracle backend. I need to use two schemas - one for a legacy DB, second one for all django related tables. So this is my settings.DATABASES: DATABASES = { 'default' : { 'ENGINE': 'django.db.backends.oracle' 'NAME': 'django',

Re: Unhandled exception during validation

2012-10-12 Thread Tom Evans
On Fri, Oct 12, 2012 at 4:45 PM, Tomáš Ehrlich wrote: > Hello Oyvind, > that's weird, Django (or Python in general) usually provide very long and > descriptive trackback. > > Could you please provide more information? What version of Python do you > have? Does it fail when you run ./manage.py run

Re: Unhandled exception during validation

2012-10-12 Thread Tomáš Ehrlich
Hello Oyvind, that's weird, Django (or Python in general) usually provide very long and descriptive trackback. Could you please provide more information? What version of Python do you have? Does it fail when you run ./manage.py runserver? You've mentioned, the error is in local app, does that

Re: "Writing your first Django app" Tutorial Question

2012-10-12 Thread Tomáš Ehrlich
Hi Stefano, your understanding is incorrect. Django (neither Python) doesn't load (or import) anything by himself. Everything what you import is everything what you get. There are few exceptions, like Python builtin module (and default tags/templates in Django templates), but that's definitely n

Re: perfectionists... motto doesn't fit

2012-10-12 Thread bobhaugen
On Friday, October 12, 2012 7:56:52 AM UTC-5, Russell Keith-Magee wrote: > The reason I jumped on this was pre-emptive. We've had two threads on > Django-dev in a week, started by the same OP, which have quickly > degraded into *very* ugly territory. As Jacob has commented on the > other thread

Re: Image/Photo app

2012-10-12 Thread Javier Guerra Giraldez
On Fri, Oct 12, 2012 at 9:41 AM, Kurtis Mullins wrote: > I'm not sure about the syncing of tags between the GUI and Web Application; > I think that would completely depend on your ability to export or otherwise > use the tags created by the GUI application. If you can figure out how to > get ahold

Re: Image/Photo app

2012-10-12 Thread Kurtis Mullins
Hey Thomas, I'm not sure if you're on a deadline or what-not; but these are usually the kinds of apps I develop (personally) for fun. For example, you can extend your code-base to scan the images to pull in its EXIF data and what-not. If you're on a deadline, there's multiple Django Applications

Image/Photo app

2012-10-12 Thread Thomas Guettler
I have 40k photos (jpg) on my ubuntu PC and want to share them with my friends and family. I searched for a django app which can sync with a local application like digikam or shotwell. But none seem to be alive. Which django app do you use for photos? It would be great, if I could sync tags a

Re: perfectionists... motto doesn't fit

2012-10-12 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Oct 12, 2012 at 1:55 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Fri, Oct 12, 2012 at 7:47 PM, Cal Leeming [Simplicity Media Ltd] > wrote: > > > > > > On Fri, Oct 12, 2012 at 3:33 AM, Russell Keith-Magee > > wrote: > >> > >> On Fri, Oct 12, 2012 at 9:00 AM, Cal Leeming

Re: Facebook like button in django

2012-10-12 Thread Tomas Neme
> I want to create a website facebook like, but real simple and I want to have > a button that I can give to blogger to add them on their blog entries. It > have nothing to do with facebook. Ah! so you want your own "facebook button"! It'll be mostly a javascript task, rather than django-specifi

Re: Facebook like button in django

2012-10-12 Thread David Gomez
I want to create a website facebook like, but real simple and I want to have a button that I can give to blogger to add them on their blog entries. It have nothing to do with facebook. On Friday, October 12, 2012 9:03:26 AM UTC-4, David Gomez wrote: > > No the button is for my own website. > >

Re: "Writing your first Django app" Tutorial Question

2012-10-12 Thread Jan Bednařík
Hi, model Choice is related to model Poll by ForeignKey. All Choice objects related to specific Poll object can by returned by: my_poll.choice_set.all() And that is happening in the template in for loop: {% for choice in poll.choice_set.all %} ... More detailed info is here: https://docs.djang

Re: Facebook like button in django

2012-10-12 Thread David Gomez
No the button is for my own website. On Friday, October 12, 2012 12:41:30 AM UTC-4, Matteo Suppo wrote: > > You want to add a Facebook share button that lets people share things on > Facebook but also save what they are sharing on your database? > > On Thursday, October 11, 2012 9:50:54 PM UTC+2

Re: Social networking site

2012-10-12 Thread Manu S Ajith
if you are looking a ready made solution I suggest using ELGG - which is not Django by the way but a working solution in PHP or Dolphin. On Fri, Oct 12, 2012 at 2:23 PM, tojo cherian wrote: > Hi, > please help me to model a social networking site which has chats, > debates, polls, petitions,

Re: "Writing your first Django app" Tutorial Question

2012-10-12 Thread Jason Sibre
Hi Rick, I'll try to explain, but it's really more about Python than Django... (I'm not familiar with the tutorial app, so I'm basing my answers on what code you copied into your email.) That import of Poll that you see in details.py doesn't even enter into it. It's only used on the line that

Re: perfectionists... motto doesn't fit

2012-10-12 Thread Russell Keith-Magee
On Fri, Oct 12, 2012 at 7:47 PM, Cal Leeming [Simplicity Media Ltd] wrote: > > > On Fri, Oct 12, 2012 at 3:33 AM, Russell Keith-Magee > wrote: >> >> On Fri, Oct 12, 2012 at 9:00 AM, Cal Leeming [Simplicity Media Ltd] >> wrote: >> > Lets say you if you were given 1 day to build a shed.. >> > >> >

Re: Create table and load data

2012-10-12 Thread Larry Martell
On Fri, Oct 12, 2012 at 3:44 AM, wrote: > Hi Larry, > Do you have PyYAML installed? If not install it first and retry or > alternatively you could just serialize your fixture in (my personal favorite) > JSON. The client decide to use XML. -- You received this message because you are subscrib

Re: Create table and load data

2012-10-12 Thread bb6xt
Hi Larry, Do you have PyYAML installed? If not install it first and retry or alternatively you could just serialize your fixture in (my personal favorite) JSON. Cheers! Abraham. -- Sent from my mobile device -- You received this message because you are subscribed to the

Social networking site

2012-10-12 Thread tojo cherian
Hi, please help me to model a social networking site which has chats, debates, polls, petitions, etc It would be helpful if anyone can post some link which would help in developing a social networking site. Cheers Tojo -- You received this message because you are subscribed to the Google

Re: static files

2012-10-12 Thread acellam guy
Make sure that all your static settings are okay on your app. Since you mentioned that you are using apache; install *mod_wsgi* be sure to add some stuff to your httpd.conf file eg; #added by guy LoadModule wsgi_module modules/mod_wsgi.so SSLRandomSeed startup builtin SSLRandomSeed conn

"Writing your first Django app" Tutorial Question

2012-10-12 Thread Rick Chong
Hi, I have just started learning programming and I am following the creating a poll app tutorial at: https://docs.djangoproject.com/en/1.4/intro/tutorial03/ I hope that someone has attempted this tutorial and is able to help me on some very beginner questions: In this app, we defined 2 classes

Unhandled exception during validation

2012-10-12 Thread Oyvind Idland
Hello, I am currently trying to upgrade a site from 1.2.x to 1.4.1. When I try to start the app, I get this: Validating models... Unhandled exception in thread started by <__main__.NewThreadStartup instance at 0x03D13738> Since the output is very economical about info, I spent some time to tr

Re: perfectionists... motto doesn't fit

2012-10-12 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Oct 12, 2012 at 3:33 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Fri, Oct 12, 2012 at 9:00 AM, Cal Leeming [Simplicity Media Ltd] > wrote: > > Lets say you if you were given 1 day to build a shed.. > > > > PHP = build your own hammer/screwdriver from scratch, and then u

Re: perfectionists... motto doesn't fit

2012-10-12 Thread Juan Pablo Martínez
gooby pls :) On Fri, Oct 12, 2012 at 6:49 AM, Moonlight wrote: > > Some people make the argument of "whatever tool is right for the job".. >> >> Sure - you could make a handsome shed with your first born's plastic tool >> set, but for perfectionists it's not just about the end result, it's about

Re: Django setup with elsatic beanstalk

2012-10-12 Thread Stefano Tranquillini
Mmm. seems that i missing something. this is the log 2012-10-12 09:36:51,352 [INFO] (24716 MainThread) [directoryHooksExecutor.py-28] [root directoryHooksExecutor info] Output from script: 2012-10-12 09:36:51,331* ERRORThe specified WSGIPath of "application.py" was not found in the source bun

Re: perfectionists... motto doesn't fit

2012-10-12 Thread Moonlight
> Some people make the argument of "whatever tool is right for the job".. > > Sure - you could make a handsome shed with your first born's plastic tool > set, but for perfectionists it's not just about the end result, it's about > how you got there. > 'how you got there' - never thought that