Order by a field in a third table

2006-10-04 Thread Mario Gudelj
ld be the elegant soluton? Thanks, Mario Gudelj --~--~-~--~~~---~--~~ 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 t

Re: ModelForm

2012-01-29 Thread Mario Gudelj
You can exclude certain fields from the form using exclude['fieldname'] in that FormName class On 28/01/2012 6:08 AM, "hack" wrote: > Hello, > I am new to Python and have a Java background. > > I have created a bunch of models, and forms using ModelForm: > class FormName(ModelForm): >cla

Re: Starting a new Python blog

2012-01-29 Thread Mario Gudelj
Same :) On 29 January 2012 19:11, Anler Hernandez Peral wrote: > you have one subscriber over here and waiting to see more posts ;) > > -- > anler > > > > On Sat, Jan 28, 2012 at 9:35 PM, Kevin wrote: > >> Hello Everyone, >> >> For sometime now I have been itching to create a Python blog, and

Re: Displaying template location in html

2012-01-29 Thread Mario Gudelj
The only way to achieve this would be to pass the template path, inside the view, to the template and render it within the template. Like: d = {'profile':profile:'template_path':"console/account-profile.html"} return render_to_response('console/account-profile.html', d) -m On 29 January

Re: help with tutorial 01

2012-01-29 Thread Mario Gudelj
That should work. You must have some unusual setting in settings.py. Can you post time zone references from that file? On 20 January 2012 09:03, Cyd wrote: > In the tutorial here: > > https://docs.djangoproject.com/en/1.3/intro/tutorial01/ > > I get no errors up until the p.save() at the end

Re: imagefiled don't Work

2012-01-29 Thread Mario Gudelj
perhaps something from this post can help - http://mariogudelj.tumblr.com/post/16717808643/custom-upload-to-path-in-django On 22 January 2012 21:41, Tony Kyriakides wrote: > (in the terminal) > python manage.py syncdb > > On Jan 21, 8:57 am, cha wrote: > > Hello I reading this tutorialhttps://

Re: Building authentication backend

2012-02-01 Thread Mario Gudelj
I'm new to Django too, but I suspect you'd do something like this: class AdditinoalUserInfo(models.Model): user = models.ForeignKey(User, unique=True) extra_password = models.CharField("Password", blank=True) That will create a new table for you and a column for new password. You then nee

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: cl

Unit test example for web froms

2012-02-11 Thread Mario Gudelj
Hi guys, I was wandering if anyone has a good example of a unit test where they have a view which processes a web form. I'm not sure how you'd test something like that. Thanks, mario -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Why does django default to Chicago time?

2012-02-15 Thread Mario Gudelj
I believe that people who created Django are from there. :) On 16 February 2012 14:46, Roy Smith wrote: > In the default settings.py file, the timezone is set to: > > TIME_ZONE = 'America/Chicago' > > Why? Wouldn't None (to match the server's time zone) be a more sane > default? Even setting i

Re: dropdown select box in django

2012-02-20 Thread Mario Gudelj
Hey there, Try this: In your forms.py create a field such as this message = forms.ChoiceField(label='Event Type', choices=EVENT_TYPE_CHOICES) That will create a dropdown. Also, I think that the first thing in the tuple is a value and shouldn't have a space, so change: EVENT_TYPE_CHOICES = (('

Re: dropdown select box in django

2012-02-21 Thread Mario Gudelj
not sure what you mean there, but take a look at this https://docs.djangoproject.com/en/dev/ref/forms/fields/#modelchoicefield On 21 February 2012 23:36, larry.mart...@gmail.com wrote: > On Feb 20, 9:52 pm, Mario Gudelj wrote: > > Hey there, > > > > Try this: > > &g

Re: Question on unknown error

2012-02-26 Thread Mario Gudelj
In print 'time' what's time? Should you not have print exp_datetime? On 27 February 2012 01:27, Stanwin Siow wrote: > Hello, > > I have the following method: > > def subscribe_keyword(userid,subDay =7,KEYWORD_SET=frozenset()): > try: > ... > > sub_datetime = datetime.datetime.now() >

User actions logging app

2012-02-28 Thread Mario Gudelj
Hi list, I was wandering if someone could recomend an easy django app for logging user actions performed on models. I'd like to log changes logged in users make around the app. Cheers, m -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: User actions logging app

2012-02-29 Thread Mario Gudelj
Wow. Legend! That's so much Annsi. On 29 February 2012 18:00, Babatunde Akinyanmi wrote: > Yes, they definitely will. > > On 2/28/12, akaariai wrote: > > On Feb 28, 11:35 pm, Mario Gudelj wrote: > >> Hi list, > >> > >> I was wandering if someon

Unicode lists and form submissions

2012-02-29 Thread Mario Gudelj
Hi djangoers, I've ran into an issue I'm not sure how to handle. I have a form with 7 checkboxes representing 7 days of the week. I want to collect the submitted days and use them in rrule to generate some dates. The form field looks like this: weekly_interval = forms.MultipleChoiceField(label=

Re: Unicode lists and form submissions

2012-02-29 Thread Mario Gudelj
Found an answer here http://stackoverflow.com/questions/9210117/attributeerror-str-object-has-no-attribute-n-when-using-dateutil Thanks guys. On 1 March 2012 00:30, Mario Gudelj wrote: > Hi djangoers, > > I've ran into an issue I'm not sure how to handle. > > I have

Re: totally a non responsive groups which answers complex questions but not simple ones :(

2012-03-11 Thread Mario Gudelj
Yeah, what's the problem Suresh? On 12/03/2012 6:32 AM, "yati sagade" wrote: > What do you mean? > On 11 Mar 2012 22:06, "suresh dokania" wrote: > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "Django users" group. > > To post to this group, send e

Re: Coding used for dropbox

2012-03-11 Thread Mario Gudelj
http://en.wikipedia.org/wiki/Dropbox_(service)#Technology No reason why it can't be made in Django. On 12 March 2012 16:06, pankaj sharma wrote: > Hello everyone, > i want to know that which language and framework was used for making > dropbox, > and i want to make such website, so can i make i

How can I print form errors from inside the test

2012-03-13 Thread Mario Gudelj
Hi djangoers, I have a problem where I'm running some form tests, the form validation is failing, and I'm not sure why it's failing and I can't figure out how to print the errors. I preload the data into the form and when I validate it returns False. >>> form.is_valid() False If I print the for

Re: How can I print form errors from inside the test

2012-03-14 Thread Mario Gudelj
Thanks Daniel and Karen, Karen, I;'m not entirely sure what an unbound form is. :) Anyway, this is my test code: def test_appointment_form(self): c = Client() base_data = { 'name':'Foo name', 'slug':'foo-session', 'short_descr':'foo tagline',

Re: How can I print form errors from inside the test

2012-03-15 Thread Mario Gudelj
All I had to do is to change initial=base_data to data=base_data and the thing worked. is_valid() and is_bound now work. Cheers, -m On 15 March 2012 12:20, Daniel Roseman wrote: > On Wednesday, 14 March 2012 16:43:12 UTC-7, somecallitblues wrote: >> >> Thanks Daniel and Karen, >> >> Karen, I;'

Re: redirect page/view after login in 'django-registration'

2012-03-21 Thread Mario Gudelj
You do this in your settings file. Not sure of the exact sintax but it's something like login="yoururl". On 22/03/2012 10:45 AM, "H.T. Wei" wrote: > Hey, > > I used 'django-registration' for user registration. Is there anyone know > how configure to redirect the page/view I want after login? > T

Re: ModelForms

2012-03-23 Thread Mario Gudelj
It doesn't matter how you generate your form, your CSS should be applied from inside the template. You need to add a CSS file link to a template to which you're passing the form to inside your context from within a view, or you can embed it into your template using

Re: philosophy behind sites and applications in Django

2012-03-25 Thread Mario Gudelj
The easiest thing to do is to create each site as a separate project. Define a base template for that project inside templates directory and link your css in that template. Extend that template in all your other templates. Same goes for users. Each project/site will have it's own db and its users.

Re: Is there a place for new Django specialized hosting?

2012-03-25 Thread Mario Gudelj
None of those hosts AT mentioned are cheap (those that actually work) and many of them are either in Beta or don't work. If you can do $10/month hosting for a low traffic site and then charge more once the site starts using a certain amount of bandwidth I think you have a business there. On 23 Mar

Re: How to model postal address in django ???

2012-04-01 Thread Mario Gudelj
You can use django-countries for county names and codes - http://code.google.com/p/django-countries/ or https://bitbucket.org/smileychris/django-countries There are probably more apps out there. For geo-coding you can try http://geodjango.org/. It's awesome but it may be a bit hard to implement.

Re: where do you host your django app and how to you deploy it?!

2012-04-03 Thread Mario Gudelj
EC2 with Ubuntu instance with Postgre+nginx On 3 April 2012 20:57, N.Aleksandrenko wrote: > What about cloud solutions? > > On Mon, Apr 2, 2012 at 2:38 PM, Jani Tiainen wrote: > > 2.4.2012 13:48, fix3d kirjoitti: > > > >> Where do you host your django app and how to you deploy it?! > >> > >> Pl

Re: Django tutorial

2012-04-09 Thread Mario Gudelj
Go to /Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg/ on your Mac and see if _mysql.so is int there. You may need to re-install MySQL_python connector. Maybe this can help http://www.brambraakman.com/blog/comments/installing_mysql_python_mysqldb_on_snow_leopard_ma

Re: Best approach for multiple sites in a single deployment?

2012-04-10 Thread Mario Gudelj
Hey man, See if this helps http://tidbids.posterous.com/saas-with-django-and-postgresql-schemas Cheers, -m On 10 April 2012 21:53, Bernardo wrote: > I would like to create a subdomain based authentication system, like the > one on 37signals, freshbooks, codebase, etc. The objective is to do >

Re: Force logout a user in signed cookie mode

2012-04-10 Thread Mario Gudelj
Does this help http://stackoverflow.com/questions/953879/how-to-force-user-logout-in-django ? On 11 April 2012 14:40, Cherian Thomas wrote: > Hi, all > Can someone help? > - Cherian > > > > On Tue, Apr 10, 2012 at 11:51 AM, Cherian wrote: > >> Hi all, >> >> In the signed cookie mode is it possi

Re: Django Book

2012-04-12 Thread Mario Gudelj
I followed the book in 1.3 and everything worked. It's the best piece of documentation I've come across. Such great narrative, not too detailed but detailed enough. On 12 April 2012 22:10, Mehmet Gültaş wrote: > It is valid for Django 1.1. :) > > My solution that I used last year, was installing

Re: how to submit data in django's database

2012-04-12 Thread Mario Gudelj
Have you tried this?: c = Company() c.Subject = T c.save() On 12 April 2012 02:54, Sophia wrote: > Hi all, > > I have a question about how to enter data in django's database. I have the > following Template, in which ' E ' is a variable that get the string: > > > > This is my models.py in wh

Passing parameters to class Meta:

2012-04-16 Thread Mario Gudelj
Hi Djangoers, I have an issue I can't work out. This is the situation: I have a model called payment, which has a custom constructor which takes a parameter. This is the code: class Payment(models.Model): id = models.AutoField(primary_key=True) amount = models.FloatField("Total payment a

Re: Any tool to validate django templates?

2012-04-16 Thread Mario Gudelj
PyCharm does a very good job here when it comes to highlighting and error detection in templates. Try it out. On 17 April 2012 01:12, John Yeukhon Wong wrote: > Would this help? > > http://stackoverflow.com/questions/3086637/how-should-i-validate-html-in-django-templates-during-the-development-p

Re: Passing parameters to class Meta:

2012-04-16 Thread Mario Gudelj
n 17 April 2012 01:28, Javier Guerra Giraldez wrote: > On Mon, Apr 16, 2012 at 10:11 AM, Mario Gudelj > wrote: > > I think I need to somehow pass the business object to model = Payment > inside > > the Meta class... > > how many 'business' options are there?

Re: Passing parameters to class Meta:

2012-04-16 Thread Mario Gudelj
issue. Cheers, -mario On 17 April 2012 01:42, Mario Gudelj wrote: > Hey Javier, > > Thanks for the reply. There are thousands of different businesses, so I > guess I'll have to go with the last option... > > Is this kind of what you're referring to there > http

Re: Passing parameters to class Meta:

2012-04-16 Thread Mario Gudelj
TIL don't override model class constructor if you don't really have to. Thanks for all your help guys! Now when I think about it I don't even know why I did it in the first place. On 17 April 2012 03:12, Javier Guerra Giraldez wrote: > On Mon, Apr 16, 2012 at 11:08 AM, Tom Evans > wrote: > > S

Re: ModelForm Validation Error

2012-04-17 Thread Mario Gudelj
Indent that redirect one more time so that it's wothin the if loop and you're redirected to good only when the form is valid On 18/04/2012 5:07 AM, "coded kid" wrote: > I want to make sure users fill all the fields before they are > redirected to the next page. And if they don’t fill the fields

Re: Is there such a open source django project?

2012-04-17 Thread Mario Gudelj
There is an app called django-helpdesk. Can't lookup the link for you but you should be able to google it On 18/04/2012 1:18 AM, "Lee Hinde" wrote: > On Tue, Apr 17, 2012 at 3:12 AM, James Deng wrote: > >> Hi all, >> >> I have a case to manage my staff for customer support, basically I need a >

Re: Logging in by Email isn't responding

2012-04-24 Thread Mario Gudelj
I'm new to django too, so i'm sorry if i get this wrong, but you don't seem to be authenticating the user using django's authenticate method. I made my username equal to email on.signup and then i use vanila django's auth module On 23/04/2012 7:21 PM, "Mai" wrote: > here i guess i wrote Every th

Re: Soap web services with Soaplib in Django

2012-04-25 Thread Mario Gudelj
It's probably a problem with what you're passing to the template or what you have in your template. You should supply some actual code from your view and your template. -m On 25 April 2012 15:01, Meenakshi Ithape wrote: > I used the Soap web services with Soaplib in Django, for that i take > th

Re: Problem with accessing Audio files from server.

2012-04-26 Thread Mario Gudelj
How do you expect it to play? Do you have a player on the front end? Also, if you look at the assets loaded into a browser - you can do this with Net panel in firebug - does the file get loaded? On 26/04/2012 2:23 PM, "atul khairnar" wrote: > Hi, > I am writing Internet Radio App using Django. W

Re: Soap web services with Soaplib in Django

2012-04-26 Thread Mario Gudelj
Never used that soap client, but from looking at the example on the right you'd do something like this: def your_view(request): from soaplib.client import make_service_client from foo.views import HelloWorldService client = make_service_client('http://localhost:8000/hello_world/', HelloWorldServic

Re: Soap web services with Soaplib in Django

2012-04-26 Thread Mario Gudelj
BTW, frontend/paypal.html there is a path to one of templates. you need to supply your template path there. On 27 April 2012 00:04, Mario Gudelj wrote: > Never used that soap client, but from looking at the example on the right > you'd do something like this: > > def your_view

Re: Problem with accessing Audio files from server.

2012-04-26 Thread Mario Gudelj
> I think the path where i am storing the files, server could no access > them? > > On Apr 26, 2:35 pm, Mario Gudelj wrote: > > How do you expect it to play? Do you have a player on the front end? > Also, > > if you look at the assets loaded into a browser - you can do thi

Re: Testing Google Charts within Django Unit Tests

2012-04-27 Thread Mario Gudelj
Yeah, selenium is your friend in this case On 27/04/2012 3:07 PM, "Jonas Geiregat" wrote: > > > > I'm looking for a way to test the data that a google chart displays on > > a web site with a unit test. Is this at all possible, and if so, where > > should I look to accomplish this? I've tried acc

Re: Django in mobile devices

2012-05-19 Thread Mario Gudelj
Have a look at http://www.linuxjournal.com/article/10940 Also http://thedjangoforum.com/board/thread/879/django-python-on-a-standalone-android/ On 19 May 2012 00:54, Phang Mulianto wrote: > HI all, > > i recently see rhomobile.com , which running ruby in mobile devices, and > phonegap which use

Re: What all does pinax provides us once you have used a starter project ?

2012-05-19 Thread Mario Gudelj
Your question has been answered on SO. On 20/05/2012 12:35 AM, "yugal" wrote: > > I am confused as I have a starter project with Pinax and it seems its over. > > I have mentioned my whole scenario in > http://stackoverflow.com/q/10569310/731963 > > Please elaborate and share your experiences wit

Re: django forms - overriding constructor for changing field type depending by input

2012-05-19 Thread Mario Gudelj
Hey Luke, I don't think you need to return anything, especially not a super class. Try this http://dpaste.com/hold/750356/ Cheers, -m On 20 May 2012 10:06, luke lukes wrote: > hi everyone. i need to overrid the constructor of a form: if i have some > value in input, some fields has to be C

Re: bash error when trying to django_admin.py; not found -- FAQ not helping

2012-05-19 Thread Mario Gudelj
Hey Mike, If you go to Python shell and do "import django", do you get an error message and what is it? Also, the location of 2.7 is different to other versions. They used to be under /Library/Python/.. and 2.7 is under /System/Library/.. so you may want to check your paths. Also, try installing

Re: What all does pinax provides us once you have used a starter project ?

2012-05-20 Thread Mario Gudelj
Yes it is. It practically provides you with a template, rather than a blank canvas which is what you get with Django. If you follow their instructions it will take you 5 minutes to see what you get. It gives you a functional site. What do you expect from it? On 20 May 2012 13:04, yugal wrote:

Re: Registering and authenticating via iPhone/Android app

2012-05-23 Thread Mario Gudelj
I read somewhere that Instagram use django-piston. But them some people are saying that Piston has had any development done in over a year. -m On 23 May 2012 23:12, Roarster wrote: > On Wednesday, 23 May 2012 13:02:15 UTC+1, bruno desthuilliers wrote: >> >> On May 23, 1:12 pm, Roarster wrote:

Re: Python IDLE

2012-05-30 Thread Mario Gudelj
You seriously have to give PyCharm a go. It's everything IDE should be and loves django. On 30 May 2012 23:40, Bill Freeman wrote: > On Mon, May 28, 2012 at 12:25 PM, Dennis Lee Bieber > wrote: > > On Mon, 28 May 2012 05:37:43 -0700 (PDT), coded kid > > declaimed the following in > > gmane.com

Re: Python IDLE

2012-05-30 Thread Mario Gudelj
It's not free but they have a 30 day trial period On 31 May 2012 00:09, doniyor wrote: > @somecallitblues: pycharm is not free, right? but i am really willing to > give a try for this. i am using for years Aptana studio which is completely > fullfulling my wishes, but "pycharm loves django" soun

Re: Tough finding a form with dynamic fields out there

2012-05-30 Thread Mario Gudelj
Daniel has point out the issue, but have a look at this speech from Django Con last year http://blip.tv/djangocon/advanced-django-form-usage-5573287. It has some great stuff in there. -m On 31 May 2012 06:14, Daniel Roseman wrote: > So, compare this: > > > def __init__(self, mailboxes, *arg

Re: django site upload

2012-06-04 Thread Mario Gudelj
Upload to where? What's confusing you? On 5 June 2012 02:17, AJAYI THEOPHILUS wrote: > I am a newbie to django and i need help on site upload > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-u

Re: Handling millions of rows + large bulk processing (now 700+ mil rows)

2012-06-30 Thread Mario Gudelj
+1 On 1 July 2012 10:40, Setiaman Lee wrote: > Hi Cal, > Interesting topic. Count me in. > On Jun 30, 2012 11:10 PM, "Cal Leeming [Simplicity Media Ltd]" < > cal.leem...@simplicitymedialtd.co.uk> wrote: > >> Hi all, >> >> As some of you know, I did a live webcast last year (July 2011) on our >>

[no subject]

2012-07-07 Thread Mario Gudelj
Hi djangoers, I have signals issue I can not figure out. NAy help is greatly appreciated. So, I have defined my own signal like this in my signals.py: --- signals.py --- from django.dispatch import Signal # Sent when a payment is successfully processed. payment_successful = Signal(prov

Signal receivers not registered in the app. They work fine in shell

2012-07-07 Thread Mario Gudelj
Forgot to add subject. Sorry! -- Hi djangoers, I have signals issue I can not figure out. NAy help is greatly appreciated. So, I have defined my own signal like this in my signals.py: --- signals.py --- from django.dispatch import Signal # Sent when a payment is successfully proc

Re: urlpatterns

2012-07-08 Thread Mario Gudelj
Which url are you trying to access when you get that 404? On Jul 8, 2012 5:36 PM, "Seyfullah Tıkıç" wrote: -- 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 t

Re: urlpatterns

2012-07-08 Thread Mario Gudelj
> http://127.0.0.1:8000/polls/ > http://127.0.0.1:8000/polls/34/results/ > 2012/7/8 Mario Gudelj > >> Which url are you trying to access when you get that 404? >> On Jul 8, 2012 5:36 PM, "Seyfullah Tıkıç" wrote: >> >> -- >> You received this message b

Re:

2012-07-08 Thread Mario Gudelj
No, I'm not. I didn't think I need to... On 9 July 2012 00:04, Tomas Neme wrote: > Are you importing your listeners.py from anywhere? > > -- > "The whole of Japan is pure invention. There is no such country, there > are no such people" --Oscar Wilde > > |_|0|_| > |_|_|0| > |0|0|0| > > (\__/) > (

Re: dashboard for user profile

2012-07-13 Thread Mario Gudelj
This should be really easy. Google something like "extending user profile" with user being a foreign key to your model. The you can grab the use from the request in you view and get the info from db and just spit it out on the screen. M On Jul 13, 2012 11:58 AM, "psychok7" wrote: > i there, > i

Re: more info to the user

2012-08-15 Thread Mario Gudelj
For the first question you should look at Forms topic in django docs. For the second one take a look at models docs for the info on how to mark the field as not required. M On Aug 15, 2012 3:36 PM, "heni yemun" wrote: > Hi, > I have set up a UserProfile using the technique outlined in the standa

I LOVE THIS COMMUNITY!

2012-08-21 Thread Mario Gudelj
I just want to tell you guys that you're awesome! I've never seen a community which helps noobs so much and with so few dickheads in it. Good on you! Mario -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

Re: To Use or Not to Use the admin backend

2012-09-03 Thread Mario Gudelj
You can certainly write your own. I wrote one for a saas solution i worked on since it was quite custom and i didn't need much of the functionality admin offered. But admin will help you with all that CRUD you normally have to create yourself. So, it really depends what your requirement is. M On S

Re: bound field object - dynamic forms

2012-09-03 Thread Mario Gudelj
Try {{ issue.0}} and {{ issue.1}} On Sep 4, 2012 5:55 AM, "mjh" wrote: > Hi all - not sure how to show the choicefield dropdown in my template? > > Am generating a dynamic form (note: for issue in issues in forms.py) and > appending the fields to self.issue_list > > in the template I am looping

Re: Iphone applications via django

2012-09-11 Thread Mario Gudelj
Nope. You do objective c or html and js with something like phonegap On Sep 11, 2012 6:59 PM, "Sait Maraşlıoğlu" wrote: > How do you create iphone applications via django. > Application logic will be django but what about user interface, do we do > that with django too? > > -- > You received this

Re: Iphone applications via django

2012-09-11 Thread Mario Gudelj
g/en/latest/index.html> >>>> >>>> >>>> Tastypie is a bit complex to look at, but it is sane and ensures you >>>> keep to good security and design principles. >>>> >>>> Hope this helps! >>>> >>>> Cal

Re: Override save or other options?

2012-09-11 Thread Mario Gudelj
I had to do the same thing recently. I had to grab the frequency, interval etc. (used rrule for that) and then had to look at the first event instance and create multiple instances from that event inside the view. If you create a series model and use it as a foreign key in your event to keep on top

syncdb is not creating auth tables

2012-09-20 Thread Mario Gudelj
Hi Djangoers, I'm sure I'm missing something simple but for the life of me I can not figure this out. I'm trying to syncdb and I'm getting this error: File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 337, in execute

Re: syncdb is not creating auth tables

2012-09-20 Thread Mario Gudelj
s after the tables were initially created. Delete > the current database and create a new one. Then ->> syncdb. > > On Thu, Sep 20, 2012 at 1:01 PM, Mario Gudelj wrote: > >> Hi Djangoers, >> >> I'm sure I'm missing something simple but for the life of me I c

Re: problem with html select box values

2012-09-20 Thread Mario Gudelj
There's no way this can be answered without code examples On Sep 20, 2012 1:54 PM, "Navnath Gadakh" wrote: > i have project for online shoping in that i use product category and and > product names. >i have taken product name in select dropdown box. > now i want to create offer for any perti

Re: syncdb is not creating auth tables

2012-09-20 Thread Mario Gudelj
I worked it out. I had another settings.py file inside one of the apps which had auth inside INSTALLED APPS and it was being imported into the main settings file. -m On 21 September 2012 08:14, Mario Gudelj wrote: > Thanks Amyth, but that doesn't work. I delete the sqlite file t

Re: Iframe, IE and request.session data

2012-11-05 Thread Mario Gudelj
It's a security feature in IE as far as I know. Try going to internet options and set the security option to low and it will work. I don't think there's a workaround for that. On Nov 6, 2012 6:59 AM, "James DeMichele" wrote: > Hello, > > > > I’m hoping someone here might be able to help me figure

Re: Django Development environment

2011-08-22 Thread Mario Gudelj
Mac, sqlite, Eclipse with Pydev or AquaMacs, apache On 23 August 2011 13:06, Jani Tiainen wrote: > Ubuntu or windows, eclipse with pydev, apache, nginx, virtualenv and > Oracle. > > Stephen Jackson kirjoitti 23.8.2011 kello > 1.07: > > I am new to the world of Django. I would like to hear from

Error: cannot import name settings

2011-08-24 Thread Mario Gudelj
Hi guys, I'm still a noob so please bear with me :) My friend has made a change to my django project and I got a clone of the project with his changes from the bitbucket repo, but now when I try to validate it I get: Error: cannot import name settings I tried setting the path to the new project

Re: Error: cannot import name settings

2011-08-24 Thread Mario Gudelj
that the error message was a bit nicer :( Cheers, On 25 August 2011 11:26, Kejun He wrote: > Search "settings" in your project, and see the settings how to be imported. > > > > On Wed, Aug 24, 2011 at 4:45 PM, Reinout van Rees wrote: > >> On 24-08-11 09:54, Mar

Re: Using gedit for django development

2011-09-12 Thread Mario Gudelj
This is awesome dude. I was looking for something like this since I moved to Ubuntu. On 13 September 2011 10:12, Micah Carrick wrote: > I've written a blog post on using gedit, the default text editor in GNOME, > as a Django IDE. If you're a Linux user and you've never considered using > gedit f

Re: Automaticall list all fields of generic model in template

2011-10-16 Thread Mario Gudelj
I think you need this https://docs.djangoproject.com/en/dev/topics/forms/modelforms/ On 16 October 2011 18:24, bovender wrote: > Hi all, > > new to Django and loving it. > > Is there a way to automatically generate HTML output for the fields of a > model instance? > > I'm looking for something s

Date and time picker in Django

2011-10-20 Thread Mario Gudelj
Hi guys, I'm looking for a date/time picker that I can use in my web forms. I've used DateTimeField in my models and have to implement date in this format "2011-10-19 21:34". I have implemented http://trentrichardson.com/examples/timepicker/ o my site and it kind of works in a sense that the picke

Re: Date and time picker in Django

2011-10-20 Thread Mario Gudelj
Thanks Kurtis. What do you use as a time picker? On 21/10/2011 6:39 AM, "Kurtis" wrote: > I just use Jquery-UI DatePicker http://jqueryui.com/demos/datepicker/ > > On Oct 20, 7:46 am, Mario Gudelj wrote: > > Hi guys, > > > > I'm looking for a date/

Re: Date and time picker in Django

2011-10-20 Thread Mario Gudelj
m/examples/timepicker/ It seems to work w/ the > Jquery-ui Datepicker. > > On Thu, Oct 20, 2011 at 4:05 PM, Mario Gudelj wrote: > >> Thanks Kurtis. What do you use as a time picker? >> >> On 21/10/2011 6:39 AM, "Kurtis" wrote: >> >>> I just use Jqu

Re: bar charts

2011-11-08 Thread Mario Gudelj
Hey, I implemented a line chart and this is my code: View: def render_chart(request): months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] month_values = [0,0,0,0,0,0,0,0,0,0,0,0] list_of_items = MyModel.objects.all() for item in list_of_items:

controlling user access

2011-11-17 Thread Mario Gudelj
Hi Djangoers, I have a problem on my hands I'm not sure how to approach and would appreciate your guidance. I'm building a site that will host articles for separate businesses and each business will have a user who needs to log in and administer article that only belong to a particular business.

Re: controlling user access

2011-11-17 Thread Mario Gudelj
es for that business. This can be done in > one or different views. > > Bye > > On Nov 17, 2011, at 9:13, Mario Gudelj wrote: > > Hi Djangoers, > > I have a problem on my hands I'm not sure how to approach and would > appreciate your guidance. > > I'm buil

IntegrityError: bookings_business.slug may not be NULL on .create()

2011-11-17 Thread Mario Gudelj
Hi guys, I have this issue I can not work out for the life of me. I would really appreciate it if someone could help. This is my model: class Business(models.Model): ... slug = models.SlugField("Slug", max_length=255, unique=True, blank=False) I have the following function in the models

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

2011-11-23 Thread Mario Gudelj
I'd suggest you to learn 2.x, since django doesn't run on 3. I would just get into it. Make sure you learn pure basics of programming and Python and then just start with that first django Polls tutorial and make sure you understand every line of code as you go along. Finish few tuts, first 7 chapte

Re: Help with many-to-many field update

2011-11-24 Thread Mario Gudelj
Hey Leslie, Try add() method like in this answer on SO http://stackoverflow.com/questions/1226290/django-manytomany-relation-add-error Cheers, On 25 November 2011 00:43, Nichehosters wrote: > Hi, > I am relatively new to Django, and am trying to update a many-to-many > related table using a Mo

Re: better datepicker

2011-11-28 Thread Mario Gudelj
Hey, I use http://docs.jquery.com/UI/Datepicker on the front end. It's as simple as placing $("#datepicker").datepicker(); inside the page where you want to convert the text fields to date picker fields. I'll you have to do is change the ID inside $("#datepicker").datepicker(); to an ID of your f

Re: urls.py?

2011-12-08 Thread Mario Gudelj
I think you have to add "from views import *" to urls.py and make sure you have a method called contact in your view. Cheers, On 09/12/2011 12:10 PM, "Jim Byrnes" wrote: > I am trying to learning django by working my way through The Definitive > Guide to django (vers 1.1). I am running django 1

Re: working with forms , problem !!!

2011-12-11 Thread Mario Gudelj
Try using this: d = {'form':form} d.update(csrf(request)) return render_to_response('contact.html',d) Tip: don't use !!! or ??? in your emails when asking for help :) On 12 December 2011 08:30, Hassan wrote: > Dear All , > am trying to make a form and i used an example from the book but its

Re: Show deactived radio button on a form

2011-12-30 Thread Mario Gudelj
I think you may need a HTML or JS solution here. Check out this SO post http://stackoverflow.com/questions/1953017/why-cant-radio-buttons-be-readonly Cheers, On 31 December 2011 05:29, CrabbyPete wrote: > I have the following form: > > DEAL_CHOICES = [ >('Standard','Standard'),

Re: What does login() and logout() actually do?

2011-12-30 Thread Mario Gudelj
Hey, All that code is in django.contrib.auth. The login() function is is in views.py in that directory. Cheers, On 31 December 2011 11:34, David Zheng wrote: > Hi, all. > > In Django Document - User authentication in Django, it talks about how > to log a user in and out. But I really what to

not sure how to unpack a list within a tuple within another list inside the template

2012-01-11 Thread Mario Gudelj
Hi Djangoers, I have a default dict variable final_d = defaultdict(list) that looks like this: [(order1, [customer2, customer1]), (order2, [customer3, customer5, customer6]) ] I've tried everything possible inside the template and I can't unpack this thing. I'm passing final_d to the template in

Re: Help me with django Form

2012-01-11 Thread Mario Gudelj
Can you provide your register model? Is it possible that you've extended the user model and that your username, password etc is getting stored inside auth_user table? On 12 January 2012 12:49, coded kid wrote: > Hi guys, I’ve been trying to signup using the django form I created. > Whenever I

Re: not sure how to unpack a list within a tuple within another list inside the template

2012-01-12 Thread Mario Gudelj
Thanks for your help guys. I ended up creating a class for for orders and customers class and then I passed those objects to the tepmlate inside a dict. That worked. Cheers, On 12 January 2012 21:55, Masklinn wrote: > On 2012-01-12, at 11:47 , Daniel Roseman wrote: > > However I'm confused by y

Re: Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2?

2012-01-12 Thread Mario Gudelj
http://www.synstorm.co.uk/2012/01/08/setting-up-django-on-a-free-amazon-ec2-instance/?utm_source=Python+Weekly+Newsletter&utm_campaign=337820f7f5-Python_Weekly_Issue_17_January_12_2012&utm_medium=email On 13 January 2012 10:44, Stuart Laughlin wrote: > I am partial to debian / ubuntu, so I use t

Re: [pinax-users] Learn DJango first, then learn Pinax; or just learn Pinax straight-off?

2012-01-16 Thread Mario Gudelj
I'd recommend Django first. Do the polls tutorial, first 7 chapters of the book, some Django By Example tuts and then get into Pinax. https://docs.djangoproject.com/en/dev/intro/tutorial01/ http://www.djangobook.com/en/2.0/ http://lightbird.net/dbe/ Cheers, On 17 January 2012 05:12, Alec Taylo

  1   2   3   >