Re: Best/Cleanest way to add fields to Class User in models.py?

2013-01-11 Thread Kashif Ali
I will suggest to create UserProfile model instead of customizing User model. Add as many fields as you like in UserProfile model and use this new model in your application wherever you are referencing User model. You have todo some settings in your settings file in this regards. Kashif On Sat,

Best/Cleanest way to add fields to Class User in models.py?

2013-01-11 Thread Saqib Ali
In my models.py, I use django.contrib.auth.models.User as a foreign key in many of the classes I created. The User class obviously has a lot of important features that any website developer will need to track and manage users to the website. However, I wish the class had three additional member

Django Calendar App Just Like Google Calendar

2013-01-11 Thread Kashif Ali
Hello Guys, Is there any django app available that is a replica of google calendar? I have checked django-scheduler, django-swingtime and couple of more but the hardest part with these apps/projects is the limited documentation. Can anybody please guide me what app can serve my purpose? Thanks, K

Re: How do I display a static image in my index.html file?

2013-01-11 Thread Nikolas Stevenson-Molnar
Could you provide a bit more detail on the problem you're having? _Nik On 1/11/2013 8:12 PM, frocco wrote: > I am still stuck. > > On Friday, January 11, 2013 3:20:40 PM UTC-5, frocco wrote: > > Hello, > > I am a newbie and cannot figure out how to do a simple image > display that I c

Re: How do I display a static image in my index.html file?

2013-01-11 Thread frocco
I am still stuck. On Friday, January 11, 2013 3:20:40 PM UTC-5, frocco wrote: > > Hello, > > I am a newbie and cannot figure out how to do a simple image display that > I currently do in PHP. > I want to display a logo on my home page. > > I tried google, but am having no luck. > > Thanks > --

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-11 Thread Nikolas Stevenson-Molnar
It goes in your Apache config file. Probably somewhere like /etc/httpd/httpd.conf _Nik On 1/11/2013 5:10 PM, 7equivale...@gmail.com wrote: > Hey guys, thanks for the help. > (1 )I have confirmed mod-wsgi has been compiled against the correct > version of python. > (2) I have also confirmed mod-ws

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-11 Thread 7equivalents
Hey guys, thanks for the help. (1 )I have confirmed mod-wsgi has been compiled against the correct version of python. (2) I have also confirmed mod-wsgi is in the list of loaded modules. My next question is what file do I place the WSGIScript directive in? I can't seem to find which file it goe

Re: Documentation of app_directories.Loader

2013-01-11 Thread Per-Olof Åstrand
Thanks for your feedback. It is exactly the way you suggest. I did not think through what I had done myself (referring to "app_name/*.html" in my views and templates) before posting. Per-Olof On Wednesday, January 9, 2013 1:50:17 AM UTC+1, Amirouche wrote: > > Héllo Per-Olof, > > On Saturday, J

Re: How do I display a static image in my index.html file?

2013-01-11 Thread @jeffblack360
Give this documentation a look: https://docs.djangoproject.com/en/1.4/howto/static-files/ jb On Friday, January 11, 2013 2:20:40 PM UTC-6, frocco wrote: > > Hello, > > I am a newbie and cannot figure out how to do a simple image display that > I currently do in PHP. > I want to display a logo o

How do I display a static image in my index.html file?

2013-01-11 Thread frocco
Hello, I am a newbie and cannot figure out how to do a simple image display that I currently do in PHP. I want to display a logo on my home page. I tried google, but am having no luck. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. T

how to set template and media directory in settings?

2013-01-11 Thread frocco
Hello, The line below does not work. os.path.join(os.path.dirname(__file__),'templates'), I see many references to doing it like above. but if I create it like this, it works PROJECT_PATH = os.path.join(os.path.dirname(__file__)) PROJECT_PATH + '/../templates', What is the best way? I am on Win

Re: Project Structure - Lots of scattered custom views

2013-01-11 Thread chad petzoldt
Sanjay, you were hitting things pretty close. I think that making sure slug names match up to real *static* locations is the key. I am hosting with Apache, and I thought about using some configurations to cheat a little bit, and get some of the static-files burden off of Django and let Apache

Re: Custom jQuery in admin

2013-01-11 Thread Jim Thaxton
I'm not sure about your original problem but prefixing it with django will make use of Django's jquery namespace: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-media-definitions Django admin Javascript makes use of the jQuery library. > To avoid conflic

Re: newbie needs to copy a record in admin to a new record

2013-01-11 Thread frocco
Thank you [code] def make_copy(modeladmin, request, queryset): for obj in queryset: obj.pk = None obj.object_name = "dup" obj.save() make_copy.short_description = "Copy selected records" [/code] On Friday, January 11, 2013 10:53:02 AM UTC-5, Brad Pitcher wrote: > > I t

Re: storing large amounts of text in the DB

2013-01-11 Thread Mike
On Friday, January 11, 2013 7:47:18 AM UTC+1, Srinivas Reddy T wrote: > > > > > On Fri, Jan 11, 2013 at 12:05 PM, Mike >wrote: > >> My users will upload text documents ranging from hundreds to thousands of >> words. > > What kind of documents? pdf? word docs? excel? > > >> At the moment I sto

Re: newbie needs to copy a record in admin to a new record

2013-01-11 Thread Brad Pitcher
I think what should work well for your use case is an admin action: https://docs.djangoproject.com/en/1.4/ref/contrib/admin/actions/ You can write code for a copy action in admin.py. This will add a "copy" item to the dropdown in the list view, so you can select any number of list items and copy

Re: Form validation

2013-01-11 Thread Kristofer
More details on the form and why there is a field that depends on 6 pages: In steps 2-5, I am prompting the user for questions and choices about a particular service. On page 6 they are given the opportunity to select a date/time for the service. The validation will calculate how how much tim

Looking for a Python/Django Developer

2013-01-11 Thread IT Recruiting Manager
We are currently seeking a Python/Django Developer in the Toronto Ontario area for contract work. The initial contract is a 3 month contract with possibility of renewal. You are a Python developer with extensive experience using the Django framework. You also have experience with PHP preferably

Django Formsets - How to build a formset correctly and validade it?

2013-01-11 Thread Andre Lopes
Hi all, I'm struggling with Formsets. I've read the documentation and lots of information on the web, but I'm experiencing some difficulties on get them working. I've wrote a StackOverflow question that explains my difficulties. http://stackoverflow.com/questions/14280875/django-formsets-how-to-

Re: storing large amounts of text in the DB

2013-01-11 Thread Tim Chase
On 01/11/13 00:35, Mike wrote: My users will upload text documents ranging from hundreds to thousands of words. At the moment I store the text in a TextField. Is this going to cause a performance problem in the future or would it be better to store the text on the file system and put a file pat

newbie needs to copy a record in admin to a new record

2013-01-11 Thread frocco
Hello, I am just learning django and want to allow a user in admin to copy a record from the list to create a new record and make changes. This will prevent having to type similar data. How do I add a link to the admin list? where do I put code to dup the record? Thank you -- You received th

Re: What's your opinion about nested apps?

2013-01-11 Thread Sergiy Khohlov
keep in mind comas INSTALLED_APPS = ( 'incidences', 'problems', ) 2013/1/11 David Medina : > INSTALLED_APPS = ( > 'trouble_ticketer', > 'trouble_ticketer.incidences' > 'trouble_ticketer.problems' > ) Many thanks, Serge +380 636150445 skype: skhohlov -- You received th

What's your opinion about nested apps?

2013-01-11 Thread David Medina
I mean... *[Dir structure]* trouble_ticketer/ models.py views.py incidences/ models.py views.py problems/ models.py views.py *[settings.py]* INSTALLED_APPS = ( 'trouble_ticketer', 'trouble_ticketer.incidences' 'trouble_ticketer.probl

Re: storing large amounts of text in the DB

2013-01-11 Thread Sreenivas Reddy T
On Fri, Jan 11, 2013 at 12:05 PM, Mike wrote: > My users will upload text documents ranging from hundreds to thousands of > words. What kind of documents? pdf? word docs? excel? > At the moment I store the text in a TextField. Is this going to cause a > performance problem in the future or w

RE: Form validation

2013-01-11 Thread Babatunde Akinyanmi
Hi, You can use the wizard's get_cleaned_data_for_step(step) method where step is 0-indexed so step 2 form data would be: get_cleaned_data_for_step('1'). It would return a dictionary of the cleaned data for that step. Ignorable comment: I would be very pissed if I had to fill 6 form pages only to

Re: Correct way to specifiy database-level column defaults

2013-01-11 Thread akaariai
On 10 tammi, 16:04, john.wolt...@tpiengineering.com wrote: > What is the best way to specify a database level default value with > Django?  If I want a timestamp column to default to the SQL function now(), > is there an accepted way to make it happen?  Or to default a boolean column > to True?  I

Re: Don't be afraid to commit - a free Python/Django workshop (Cardiff, UK)

2013-01-11 Thread Iñigo Medina
> What we'll cover > > > The workshop will take participants through the complete cycle of identifying > a simple issue in a Django or Python project, writing a patch with tests and > documentation, and submitting it. > > The workshop will take you through the use of: > > * vir

Re: DateTimeField received a naive datetime (2013-01-10 00:00:00) while time zone support is active.

2013-01-11 Thread Iñigo Medina
On Fri, Jan 11, 2013 at 12:23:17AM -0800, Jeff Hsu wrote: > Hi all, > >I kept getting DateTimeField received a naive datetime (2013-01-10 > 00:00:00) while time zone support is active. but I can't figure out where > it's receiving a naive datetime. I have USE_TZ set to True in my settin

Re: Custom jQuery in admin

2013-01-11 Thread Mario Gudelj
Sounds like you have something else on that page using $, such as prototype library. Look up jquery's noconflict() if that's the case On 11 Jan, 2013 9:26 PM, "Daniele Procida" wrote: > I had a custom widget, which broke after some other things were updated. > > It was saying: > > TypeError:

Custom jQuery in admin

2013-01-11 Thread Daniele Procida
I had a custom widget, which broke after some other things were updated. It was saying: TypeError: 'undefined' is not a function (evaluating '$('#id_conta cts_and_people-phonecontact-content_type-object_id-0-label').combo box()') Last night, I finally managed to fix it, after noticin

Re: storing large amounts of text in the DB

2013-01-11 Thread Mike
On Friday, January 11, 2013 9:30:39 AM UTC+1, iñigo medina wrote: > > > El 11/01/2013 07:36, "Mike" > escribió: > > > > My users will upload text documents ranging from hundreds to thousands > of words. At the moment I store the text in a TextField. Is this going to > cause a performance prob

Re: DateTimeField received a naive datetime (2013-01-10 00:00:00) while time zone support is active.

2013-01-11 Thread Tom Evans
On Fri, Jan 11, 2013 at 8:23 AM, Jeff Hsu wrote: > Hi all, > >I kept getting DateTimeField received a naive datetime (2013-01-10 > 00:00:00) while time zone support is active. but I can't figure out where > it's receiving a naive datetime. I have USE_TZ set to True in my setting > file(st

Re: storing large amounts of text in the DB

2013-01-11 Thread iñigo medina
El 11/01/2013 07:36, "Mike" escribió: > > My users will upload text documents ranging from hundreds to thousands of words. At the moment I store the text in a TextField. Is this going to cause a performance problem in the future or would it be better to store the text on the file system and put

Re: Form validation

2013-01-11 Thread iñigo medina
El 11/01/2013 08:00, "Kristofer" escribió: > > > On step 6, I want to perform verification on a field but it depends on fields that were entered in steps 2-5. Do you save such data anywhere (database, session...)? You might get from this source and use as you need. Iñigo > > I cannot fi

DateTimeField received a naive datetime (2013-01-10 00:00:00) while time zone support is active.

2013-01-11 Thread Jeff Hsu
Hi all, I kept getting DateTimeField received a naive datetime (2013-01-10 00:00:00) while time zone support is active. but I can't figure out where it's receiving a naive datetime. I have USE_TZ set to True in my setting file(stores timezone aware object in mysql?). My url is as below

Don't be afraid to commit - a free Python/Django workshop (Cardiff, UK)

2013-01-11 Thread Daniele Procida
I have made a combined talk/workshop proposal for DjangoCon Europe in May (all proposals at ). I want to run the workshop part a couple of times before taking it to Warsaw (assuming the proposal is accepted, but it's worth doing anyway). The workshop is free and