Re: How to get additional dynamic data into ModelChoiceField and ModelMultipleChoiceField?

2008-10-15 Thread creecode

Hello Alexis,

I don't have much to add other than I was in a similar situation to
yours.  I needed to generate an options choice list with radio buttons
for a form on the fly and discovered the "dynamic choices in a
ChoiceField" approach as well.

It seems to be working OK.  Make sure you populate each and every
instance of your from with your choices.  I stumbled on that one for a
bit in relation to processing the request.POST.  Makes sense when you
think about it but may save someone a few cycles! ;-)

Toodle-lo.....
creecode

On Oct 14, 9:40 pm, Alexis Bellido <[EMAIL PROTECTED]> wrote:

> I haven't found the solution yet but after reading a few posts in the
> group I think I have to try the "dynamic choices in a ChoiceField"
> approach and forget about the ModelChoiceField.
>
> There seems to be a few options on getting that done so I'll try
> tomorrow with a fresh brain and will let you know. In the meanwhile,
> if somebody has any idea please let me know.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: proper way to use S3Storage and Django ImageField

2009-01-19 Thread creecode

Hello Aaron,

I can confirm that it can work.  I'm using it but I don't know enough
to diagnose your problem.

Have you created the userprofile "directory" in your S3 bucket?

Have you added the following to your settings.py?

DEFAULT_FILE_STORAGE = 'S3Storage.S3Storage'

AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_STORAGE_BUCKET_NAME
AWS_CALLING_FORMAT

Have you installed any software S3Storage depends on?

On Jan 19, 8:02 am, "Aaron Lee"  wrote:
> So I guess S3Storage doesn't work with ImageField? Can anyone confirm that?

Toodle-l.
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: proper way to use S3Storage and Django ImageField

2009-01-19 Thread creecode

Hey Aaron,

I think part of your problem is that AWS_STORAGE_BUCKET_NAME is not
properly specified.  It think it needs to be something like my-bucket-
name.s3.amazonaws.com.  Based on your settings then you should find
your images end up at http:my-bucket-name.s3.amazonaws.com/
userprofile/.  You may need to change the permissions on your bucket
and "directories" so that you can access the images via a url.  I
found S3 Organizer a plug-in for FireFox useful for this.

Toodle-l....
creecode

On Jan 19, 1:53 pm, "Aaron Lee"  wrote:

> AWS_STORAGE_BUCKET_NAME='userprofile'
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: AUTH_PROFILE_MODULE confusion

2009-01-19 Thread creecode

Hello NoviceSortOf,

You may want to check out this Django documentation <
http://docs.djangoproject.com/en/dev/ref/settings/#auth-profile-module
> and < http://docs.djangoproject.com/en/dev/topics/auth/ > on
AUTH_PROFILE_MODULE which may clear up your confusion.  Registration
doesn't use AUTH_PROFILE_MODULE directly AFAICT.  The registration
docs just mention it as something you might want to take advantage of
and how using it relates to using registration.

Toodle-lo
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: proper way to use S3Storage and Django ImageField

2009-01-19 Thread creecode

I think you may be correct on that my tip was incorrect.  Forget what
I said! :-)

Have you tried getting the url like avatar.image.url?  I use a line
like this in some of my code that uses S3Storage and it works.

image_url = my_model_instance.image.url.replace ( ':80', '' )

On Jan 19, 4:01 pm, "Aaron Lee"  wrote:
> Thanks for your tip, I believe your suggestion will end up having my.jpg
> under
> my-bucket-name.s3.amazonaws.com.s3.amazonaws.com/userprofile/my.jpg
>
> I think the AWS_STORAGE_BUCKET_NAME should just be userprofile

> So how do you access the image, do you manually construct the URL?
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: AUTH_PROFILE_MODULE confusion

2009-01-20 Thread creecode

Hello NoviceSortOf,

On Jan 20, 8:42 am, NoviceSortOf  wrote:

> * django-registration is installed and works great

Yes, it is!  Thank you James Bennett!

> * i'd suspect that somewhere in models.py there would be a hook for
> this,
>   there is reference to something called profile_callback that seems
> like it
>   might be clue to this but I can't figure it out from the docs and
> code
>   I've read so far.

You can use profile_callback like...

from accounts.models import UserProfile

url ( r'^accounts/register/$',
'registration.views.register',
{ 'profile_callback': UserProfile.objects.create },
name = 'registration_register' ),
( r'^accounts/', include ( 'registration.urls' ) ),

...in urls.py.  I'll mention here that the current development version
of registration is dropping profile_callback in favor of using
signals.  You may want to code in such a way that you can easily
change to using the signals if you update registration in the future.

An alternative would be to not use the profile_callback and use
Django's built-in signals.  Something like...

from django.db import models


class UserProfile etc, etc, etc...


def add_user_profile ( sender, instance, created, **kwargs ):

if created:

user_profile = UserProfile ( user = instance )

user_profile.save ( )


models.signals.post_save.connect ( add_user_profile, sender = User )

...in account/models.py.

The above code fragments will need to be altered and filled out to
suite your needs.  Hopefully they give you some ideas.

Toodle-lo
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ManyToOne : cannot form a proper query :(

2009-03-05 Thread creecode

You can always perform raw SQL queries < 
http://docs.djangoproject.com/en/dev/topics/db/sql/
> if needed.

On Mar 5, 4:25 am, "[CPR]-AL.exe"  wrote:
> So, it seems, that there is no way to do what i want?
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: OWNING code

2009-03-23 Thread creecode

Hello mn,

I'm not a lawyer and I don't play one on T.V.

Others have already answered about licenses and such.  I'm wondering
if your first question is about the custom code that the programmer
produces for you to make your website function?

Generally I think you'll find that you own the custom code.  It is
considered a work for hire, you can Google that.  I believe a work for
hire is the default situation if you and the programmer didn't specify
ahead of time the terms of code ownership.

Of course your situation may be different and a quick talk with a
lawyer that specializes in intellectual property and such is probably
a good idea.

If your programmer is being difficult you may need to take legal
action to get your code.

Toodle-loooo.
creecode

On Mar 22, 10:52 pm, mn  wrote:

> new on here and not a tech guy, wanted to know if a company or
> programmer who uses Django can claim they own the code?
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Entering large chunk of data

2009-06-24 Thread creecode

Hello Dhruv,

Two ways you can do this, that I know.  Use your databases' built in
data import technique.  For example with MySql you can use LOAD DATA.
Alternately you could use manage.py shell to run python code to load
your data.

Read about manage.py shell and dbshell here <
http://docs.djangoproject.com/en/dev/ref/django-admin/ >.

Toodle-looo...
creecode

On Jun 24, 10:23 am, Dhruv Adhia  wrote:

> I have news field in django admin and I would like to enter 2000 news
> items at once. May I know how to do it in shorter way?
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Entering large chunk of data

2009-06-24 Thread creecode

Hello Dhruv,

On Jun 24, 11:03 am, Dhruv Adhia  wrote:

> Is this what you mean?
> django-admin.py loaddata mydata.json , If so I how do I populate json file
> such large amounts of data?

The LOAD DATA was in reference too the LOAD DATA INFILE command <
http://dev.mysql.com/doc/refman/5.1/en/load-data.html > available for
MySql and was just an example.  Since you're using sqlite3 that
obviously won't be of help.  Most databases would have similar methods
for importing large amount of data.  You'd need to read up on how your
database does it if you do decide to go that route.

If you don't want to use the command line ( or some kind of client
program ) with your database then you're left with using manage.py
shell and writing a small python program to load your data.

Your program would need to load your Model, open and parse your file,
create and save instances of your model.  Opening files can be read
about in the Python documentation as well as commands that would be
useful in parsing your file ( string methods? ).  If you've been
through the Django documentation then you've seen how to work with
Django models.

Toodle-looo...
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Arbitrary HTTP CONNECT attempts on Django dev server

2009-06-29 Thread creecode

For those unfamiliar with what DMZ means.

< http://en.wikipedia.org/wiki/DMZ_(computing) >

On Jun 29, 7:27 am, Richard Shebora  wrote:
> yes. with no firewall protection in your case.  that is what the dmz setting
> of a router is supposed to do.

Toodle-looo....
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



ANN: django-remember_me v0.1

2009-07-07 Thread creecode

Hello all,

I have released django-remember_me v0.1 < 
http://code.google.com/p/django-remember-me/
>.

django-remember_me is a Django application that provides a login form
with a Remember Me checkbox. Use this in place of
django.contrib.auth.views.login.

This is a simple application but I hope you will find it of use and
will save a few cycles of coding in your websites where you need
Remember Me functionality.

Toodle-l...
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



ANN: django-remember_me v0.1.1

2009-07-08 Thread creecode

Hello all,

I discovered a bug in django-remember_me v0.1 having to do with not
importing RequestSite which would cause a problem with websites that
don't use the sites framework.

I have released django-remember_me v0.1.1 <http://code.google.com/p/
django-remember-me/ >.

django-remember_me is a Django application that provides a login form
with a Remember Me checkbox. Use this in place of
django.contrib.auth.views.login.

This is a simple application but I hope you will find it of use and
will save a few cycles of coding in your websites where you need
Remember Me functionality.

Toodle-lo..
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: trouble uploading mp3 file

2009-03-31 Thread creecode

Hello oregon10,

I wonder if the field you are using to upload is an ImageField or a
FileField.  If it's an ImageField you would have problems trying to
upload an mp3 file.  I would think you would get an error message but
it might be masked by the code.

Are you able to upload images with this form?

Ariel is correct that the person who programmed your system would be
the best person to help you.  Are you able to contact them?

Another thought occurs.  How large is this mp3 file?  If it is really
large, that might be a source of trouble.

On Mar 31, 5:44 pm, oregon10  wrote:

> I'm trying to upload a mp3 file to our my list of documents - so our
> views can assess it online. It goes through the motions of uploading
> but never appears in my list of docs. That tells me that the format
> might be wrong. If so, does anyone know what format options I should
> be converting the file to?

Toodle-loo..
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Multiple sites, single application in Django

2009-04-11 Thread creecode

Hello Russell,

I can't say this is best practice but my approach to a similar goal
has been to create projects for each website.  These projects/websites
are unrelated to each other as far as content goes but all install a
common set of apps, some off the shelf, some custom.  I have sites
installed for each project but not all of my apps are fully site aware
so I only use sites minimally at this time.

On Apr 11, 8:23 am, Russell McConnachie 
wrote:

> I still have not come up with a creative way to design a site
> which hosts multiple sites - providing different html layouts, style sheets.
>
> I am looking for someone to kind of explain to me some best practices on
> doing this

Toodle-looo.
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django on Amazon EC2

2009-04-29 Thread creecode

Hello Joshua,

I don't have any detail or tips.  You just need to get to grips with
using EC2 and then install Django on your instance.  I've been using
Django on an EC2 instance since late last year and they work fine
together.  I use S3 as my main media server via S3Storage.

On Apr 28, 8:41 pm, Joshua Partogi  wrote:

> Has anyone here had any experience on
> deploying django apps on Amazon EC2 that would like to share their
> experience?

Toodle-lo..
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django on Amazon EC2

2009-04-30 Thread creecode

Hello Joshua,

On Apr 30, 2:34 am, Joshua Partogi  wrote:

> it seems that EC2 is not reliable though
> scalable.

I don't think this is the case.  I've been running an instance for
months with no more issues than if I'd been running on my own
hardware.  If you take sensible backup and other precautions you
should be able to recover from a problem when it does occur with
little problem.  I say when because no matter how you set up, the
underlying hardware ( yours or hosting providers ) will eventually
fail.

Toodle-lo...
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: full-text search

2009-05-28 Thread creecode

Hello Petry,

Is there something about 
http://docs.djangoproject.com/en/dev/ref/models/querysets/#search
that isn't working for you in 1.0.x?

On May 28, 7:10 am, Petry  wrote:

> I'm trying to implement a search on my site, find this[1] solution
> interesting because it is not necessary to use any external code (or
> as xapian sphinx). Unfortunately this solution only works in older
> versions of django. I tried to fix backend.quote_name, but failed.
>
> Someone has used a similar solution for versions after 1.0?
>
> [1]http://www.mercurytide.co.uk/news/article/django-full-text-search/

Toodle-lo...
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Using Admin features on other applications

2009-06-07 Thread creecode

Hello Azarias,

On Jun 7, 12:32 pm, Advanced Technology®  wrote:

> Let me see if I got ur point.
> You mean actualy is not possible to use some parts of admin like forms,
> models listings, etc?

You can use forms and and generic views in your own custom apps if you
want < http://docs.djangoproject.com/en/dev/ >.

> The only way is extending the admin site itself.

Admin is an app ( a very fancy one ) that uses forms, generic views,
and other features covered in the documentation linked above.

Whether you roll your own app or extend the admin depends on your
needs.

Toodle-loooo...
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django-registration using a different registration form

2009-06-10 Thread creecode

Hello Paddy,

You can do the later. Put your url above the include for registration
and you should be good to go.

On Jun 10, 3:26 pm, Paddy Joy  wrote:

> I have been reading the django-registration docs and have learned I
> can change the registration form by using the 'form_class' keyword
> argument.
>
> http://bitbucket.org/ubernostrum/django-registration/src/b360801eae96...
>
> To make this work do I need to rewrite the included urls with my own
> or is there a way I can keep the included urlconf and just overwrite
> one particular url?

Toodle-loo...
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django vps hosts

2009-09-24 Thread creecode

You might look at Amazon's EC2 if you don't mind rolling your own.

On Sep 23, 6:54 pm, "neri...@gmail.com"  wrote:
> I think I'm ready to finally switch to a django vps host due to
> problems with django on DreamHost. Can anyone recommend a good vps
> host?

Toodle-looo..
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Migrating a Wordpress website to Django

2009-11-02 Thread creecode

Hello John,

A quick search on Google shows some folks have done WP to Django
migrations.  Following are a few links.

http://www.nbrightside.com/blog/2007/10/14/how-to-migrate-a-wordpress-blog-to-django

http://code.google.com/p/django-wordpress-admin/

http://www.eriksmartt.com/blog/archives/306

Toodle-looo...
creecode
--~--~-~--~~~---~--~~
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.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Cron vs event triggered action

2009-12-12 Thread creecode
Hello Tim,

On Dec 12, 2:58 pm, Tim Daniel  wrote:

> Solution A: Have a datetime field with an expiry date and say every 10
> minutes a cron job checks the DB table for expired entries and
> performs the programed action.

I've used solution A in combination with custom management commands.
Works pretty well.  I send emails to the user for notification.

> Solution B: Have an event triggered cronjob that only executes once
> and is created from Django(Python), after the 2 hours passed it
> performs the programmed action only on the required entry.
>
> So how can I implement solution B? Is there a posibility to create a
> cron on a user action that executes only one time?

You might see if you could use the at command in combination with a
custom management command.

Let us know if you go with B and how it turns out.

Toodle-loo..
creecode

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Cron vs event triggered action

2009-12-14 Thread creecode
Hello all,

On Dec 14, 3:57 pm, Brian Neal  wrote:

> http://docs.djangoproject.com/en/dev/howto/custom-management-commands/

Thanks for answering Brian!  Saved me having to do that part
myself! :-)

Tim,  I did it the python script way at first but have been moving
over the the custom management command way.  The cmcs have more
overhead but I like that there is a defined way to plug commands into
my apps.  And there are some interesting built-in commands line
switches which can be seen by doing a ./manage.py help.

Toodle-lo.....
creecode

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Filter (AND excluding empty values)

2009-12-15 Thread creecode
Hello Osiaq,

On Dec 15, 8:40 pm, Osiaq  wrote:

> Is there anyway to force filter to exclude null values from the
> statement?
> Logic: "if 'city' is null(or 0), exclude it from search term" ?

Did you try the exclude method < 
http://docs.djangoproject.com/en/dev/ref/models/querysets/#exclude-kwargs
>?  I haven't been following this closely, just throwing it out there.

Toodle-loo
creecode

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Cron vs event triggered action

2009-12-19 Thread creecode
Hello Tim,

On Dec 19, 6:28 am, Tim Daniel  wrote:

> Brian & Creecode Django Custom management commands are really the same
> as this:
>
> from django.core.management import setup_environ
> import settings
> setup_environ(settings)
>
> or am I wrong? I'm just running the scripts with these three lines on
> top (even before the other import statements).

They both do the above.  Its just that the custom management commands
give you a little extra with it's built-in switches and such.  Use
whatever system works for your needs.

Toodle-l...
creecode

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Hosting for django?

2009-12-22 Thread creecode
Amazon EC2 and S3 +1

On Dec 22, 11:08 am, Victor Loureiro Lima
 wrote:
> Amazon's Cloud Computing is wonderful, its currently hosting our django
> website.
> Media Temple is also a good option.

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Problems with first block

2010-04-27 Thread creecode
Hello Jonathan,

Use {% block dtd %} instead of {{ block dtd }}.

{{ }} are for accessing variables < 
http://docs.djangoproject.com/en/dev/topics/templates/#variables
>.

{% %} are for tags < http://docs.djangoproject.com/en/dev/topics/templates/#tags
>.

Toodle-loo...
creecode

On Apr 27, 11:51 am, Jonathan Hayward
 wrote:
> I'm working on a base template. Django is giving a TemplateSyntaxError at my
> first attempted block declaration:
>
> TemplateSyntaxError at /
>
> Could not parse the remainder: ' dtd' from 'block dtd'
>

> The template is:
>
> {{ block dtd }}

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problems with first block

2010-04-27 Thread creecode
It is OK to include the name of the block in the endblock tag ( search
for 'For extra readability' in < 
http://docs.djangoproject.com/en/dev/topics/templates/#template-inheritance
>).  It is optional and I find it useful when working with longer
blocks.

Toodle-looo.....
creecode

On Apr 27, 12:04 pm, x13  wrote:

> Notice you should not include 'dtd' in the endblock tag.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Remove a field in a form subclass

2010-04-27 Thread creecode
Hello Wiiboy,

Take a look at the excellent writing "Dynamic form generation" <
http://jacobian.org/writing/dynamic-form-generation/ > by Jacob Kaplan-
Moss.  It may help you.

I had a similar need to yours and ended up using the __init__ method
to remove fields.

Toodle-loooo.....
creecode

On Apr 27, 4:29 pm, Wiiboy  wrote:

> Is there a way to remove it in subclasses?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Template lookup order not behaving as expected

2010-04-28 Thread creecode
Hello Thomas,

On Apr 28, 2:33 pm, Thomas Allen  wrote:
> I have noticed that the first app in my INSTALLED_APPS tuple overrides
> all of the others for an ambiguous template name. "accounts" does not
> have one, but "dashboard" does, which is why I am seeing what I am
> seeing (if I place "ads" above "dashboard", the "ads" template
> precedes all others). I thought that an app's view would check its own
> templates directory before any others but I guess I was wrong...

The behavior you are seeing is described in <
http://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types
>, in the "django.template.loaders.app_directories.Loader" section.

> is
> there a way to override this default top-down lookup behavior? Or some
> way to specify my template with greater precision while keeping the
> "index.html" filename?

You could add a "pages" directory to your templates directory.
Something like...

./pages
./pages/templates
./pages/templates/pages

And then you would do...

return render_to_response( 'pages/index.html'...

Toodle-loo.
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: File Upload with Progress Bar

2010-05-30 Thread creecode
Hello V,

On May 29, 11:00 pm, Venkatraman S  wrote:

> I have been trying to build a simple file upload with progress bar.

AFAIK there isn't a simple solution.  Perhaps this info <
http://www.fairviewcomputing.com/blog/2008/10/21/ajax-upload-progress-bars-jquery-django-nginx/
> will point you in the right direction.

I've experimented with a solution based tthe above but I wasn't
entirely satisfied with my implementation.  I'm having a problem with
the progress bar not reaching 100% many times and some problems with
the percentage complete number.

I've put my project on the back burner for now but if anyone has any
examples they'd like to share I'd be interested in seeing them.

Toodle-looo...
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: File Upload with Progress Bar

2010-05-30 Thread creecode
Hello V,

On May 30, 12:23 pm, Venkatraman S  wrote:

> Can you share the project please?

My progress bar code is integrated into a larger application which I'm
unable to share at this time.  I've put the progress bar feature on
the back burner and unfortunately I don't have spare time to go in and
pull out the progress bar related code.

> Till now, i haven't even been able to get this working.

Essentially my code is not far off from what is at the link I
provided.  Is your code based on the code at the link I provided?  We
might be able to point you in the right direction if you give us more
detail about what isn't working.

Toodle-looo...
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Model named FOOD_DES shows as "foo d_des" in admin

2010-06-11 Thread creecode
Hello all,

I have a model named FOOD_DES (the name if from an existing schema
that I'm trying to mirror).  When I view it in the admin it's name is
shown as "foo d_des", notice the space.

Any thoughts on why/where the space is added and how I can get rid of
it?

I'm wondering if this something to do with FOO being a computer
programming placeholder name?

Toodle-loo
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Model named FOOD_DES shows as "foo d_des" in admin

2010-06-11 Thread creecode
Hello Dan,

Thanks for the info.  verbose_name does take care of the display
problem and I may end up using that option for a more user friendly
experience.

@ALL: I would like to understand where the space is being added.  I
have looked around a bit in the source for Django but I haven't seen
anything that pops out.  Perhaps this is happening in Python?
Pointers appreciated.

On Jun 11, 11:22 am, Dan Harris  wrote:

> You can change a meta option...

Toodle-loo....
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Model named FOOD_DES shows as "foo d_des" in admin

2010-06-11 Thread creecode
Hello Dan,

On Jun 11, 11:48 am, Dan Harris  wrote:

> If verbose_name isn't provided the docs say that "Django will use a
> munged version of the class name: CamelCase becomes camel case."

Thanks again for the info.

> This
> might explain your problem, it looks at FOOD_DES and assumes that the
> first F and first O are camel cased words and splits them into two
> words, hence the space.

This code < 
http://code.djangoproject.com/browser/django/trunk/django/db/models/options.py
> could be the source of where the space is coming from.  I'm just
about to run some tests...

Toodle-loo
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Model named FOOD_DES shows as "foo d_des" in admin

2010-06-11 Thread creecode
Hello all,

The line < 
http://code.djangoproject.com/browser/django/trunk/django/db/models/options.py#L15
> in the trunk at this moment is where the action is happening.  We
get "foo d_des" because the "_D" in the model name is matched in the
regular expression pattern and the substitution occurs.

My curiosity is satisfied.  Thanks!

On Jun 11, 1:12 pm, creecode  wrote:

> I'm just about to run some tests...

Toodle-l...
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Dumping large database

2010-06-14 Thread creecode
Hello Jeff,

I'm not familiar with postgresql but can you dump your data from
postgresql similar to what can be done with MySQL and the mysqldump
command?

On Jun 13, 8:15 pm, Jeff Green  wrote:

> I would appreciate if anyone has suggestions on the best way to
> migrate a large database.

Toodle-looo....
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: New project, debating postgresql or MySQL (Amazon RDS), does it matter to Django?

2010-06-26 Thread creecode
Hello all,

On Jun 26, 5:46 am, Tomasz Zieliński
 wrote:

> Ah, and to save you pulling your hair:
> - create MySQL database with CREATE DATABASE name CHARACTER SET UTF8;
> - set DATABASE_OPTIONS to {"init_command": "SET
> storage_engine=INNODB",}, at least for syncdb. Otherwise your tables
> might be created as MyISAM.
> Both of these are 
> documented:http://docs.djangoproject.com/en/dev/ref/databases/#creating-your-dat...http://docs.djangoproject.com/en/dev/ref/databases/#creating-your-tables
> - but it's easy to overlook them

There is nothing wrong with MyISAM tables, if they meet the needs of
your application.  In some cases I think they are required; for full
text searching if I recall correctly.

The docs are just pointing out one way to change the storage type for
your tables if needed.

Toodle-l
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



djangoproject.com inaccessible?

2010-08-02 Thread creecode
Hello all,

djangoproject.com appears to be inaccessible to me.  Is anyone else
having problems?  Is anyone able to access it?

Toodle-looo...
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: djangoproject.com inaccessible?

2010-08-02 Thread creecode
Now working for me as well with no changes on my end.  H..

On Aug 2, 9:42 am, Antoni Aloy  wrote:

> works for me!

Toodle-lo..
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Dango-tagging incompatibilities?

2010-08-05 Thread creecode
Hello Adelein,

I used a version of django-tagging with Django v1.1 without any
noticeable problems.  Which revision it was I can't say off the top of
my head.  A look at the django-tagging website may provide the
answers.

Toodle-looo...
creecode

On Aug 5, 3:18 pm, adelein  wrote:
> Has anyone used django-tagging lately with Django 1.1 and above? I am
> starting to use it but saw some comments in stackoverflow about
> incompatibilities. Dont want to go down a dead end.
>
> Appreciate your tips!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: hosting django applications

2010-08-30 Thread creecode
Hello Rodrigo,

I'm happy with EC2.  Others feel it is not a good value for the
money.  Previous posts to this group have gone over this topic so you
may want to look those message up.

On Aug 27, 6:54 pm, Rodrigo Lombardo  wrote:

> I'm planning to deploy my first django application and I think it will
> have more reads than writes and at least 1 requests a day. So I
> will take care about the system cache. I think FreeBSD(my prefered OS)
> would do the job, but I heard good things about Amazon EC2 and I would
> like to know if anyone here is happy with the Amazon's service.

Toodle-loo.
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Multiple django projects

2010-09-02 Thread creecode
Hello,

Yes you can have many Django projects installed on one server.

On Sep 2, 9:12 am, commonzenpython  wrote:

> hey, guys
> is it possible to have multiple django projects in one server ?

Toodle-lo..
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Please add tag for Django 1.2.3 release

2010-09-11 Thread creecode
I too find the tagged releases useful.  Thanks for all your hard work
people!

Toodle-lo.
creecode

On Sep 11, 9:03 am, shacker  wrote:

> It looks like there is no svn tag for 1.2.3:
>
> http://code.djangoproject.com/svn/django/tags/releases/
>
> which affects those of us who use pip requirements files for version

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Please add tag for Django 1.2.3 release

2010-09-12 Thread creecode
Hello all,

I asked < http://code.djangoproject.com/ticket/14265#preview > and we
received! :-)  Thanks Russell!

On Sep 11, 12:19 pm, creecode  wrote:
> I too find the tagged releases useful.  Thanks for all your hard work
> people!

Toodle-lo.....
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Iterating tree-like data structures with django

2010-10-08 Thread creecode
Hello all,

Bruno was kind enough to list some of the techniques for working with
trees.

I'd like to throw out another technique you many want to look into if
you are working with trees of unknown shape and need frequent inserts/
updates.  I've been experimenting with it with some good results so
far, although I don't have any code to share.

Try searching for Vadim Tropashko's Nested Interval/Matrix Encoding
technique.

Toodle-loooo
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: About Thumbnails

2010-10-18 Thread creecode
Hello Ekin,

On Oct 18, 7:37 am, Ekin Yalgın  wrote:

> But it is better to solve this within the
> models.py (ImageField)). then the application. So we can use this
> thumbnail function or file with every project easily.
>
> Thank you for your answer. Any other suggestions?

In this case then you would probably want to write your own custom
model field < http://docs.djangoproject.com/en/1.2/howto/custom-model-fields/
>.

Toodle-looo..
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: user defined settings via the admin

2010-11-18 Thread creecode
Hello garagefan,

On Nov 18, 7:07 am, garagefan  wrote:

> what are our options to grant admin based settings? Obviously a model
> called settings with perhaps it's own admin template to only allow/
> show a single entry into this model/db is possible. But should it
> really warrant an additional database call every time the page is
> loaded to grab the settings(lets ignore caching for the moment)?

Don't discount this method to quickly if you use it with caching.
I've had some success with this technique.  Django's contributed Sites
< http://code.djangoproject.com/browser/django/trunk/django/contrib/sites
> application shows a use case.  Sites is used extensively in many
projects.  From there you can modify the admin for your app to allow
only working with the record that was created at syncdb.  This may not
be needed depending on the skill level of your users.  Modifying the
admin in this manner is not fully covered in the docs.  You will need
to dig around the web and the code for some of the techniques needed
for this type of admin customization.

> How
> about an xml file that is editable by the admin? seems like a valid
> option to have a config.xml associated with a project and to have the
> admin site access to it, i presume a feature like this would require a
> hook into the admin site.

Another technique I've been experimenting with is modifying the
settings.py file for a project from an app then reloading the source
code.  Of course you have to have a stack that is setup to use this
technique for this method to work.  Apache with Graham Dumpleton's
mod_wsgi can reload source code < 
http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode
>.

Toodle-looo
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: remember me in login

2010-11-26 Thread creecode
Hello robos85,

On Nov 26, 4:07 pm, robos85  wrote:

> Is there any easy way to do remember me trigger during login?

For remember me functionality you can try my remember me app at
<http://code.google.com/p/django-remember-me/>.

> I know that there is SESSION_COOKIE_AGE but it's set site-wide. Is
> there any possibility to set expiration at browser close or x time?

You can accomplish the first with remember me and by not checking the
remember me checkbox.  The second is also possible but my app doesn't
do that.  You could probably adapt the code in remember me to do x
time or at least it might point you in the right direction.

Others have dealt with this issue I'm sure a Google search would
product some results.

Toodle-loo...
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Is it possible to change order of elements in model?

2009-12-30 Thread creecode
Hello ev,

On Dec 30, 2:19 pm, ev  wrote:

> Example: I have a playlist and I want to have a possibility to change
> songs order (manually, not by name or raiting).
>
> This task could be done by adding to the model an integer field (to
> remember the order):
> ordering=models.IntField()

An order field seems to be a standard way of doing it.  I do it that
way for some of my models.

> I'd like to know, if there is any feature to realize such a
> functionality in Django.

Could you be a little more explicit about what you want to do?

Are you wondering if Django has a GUI to control the order of items in
a list such as a song playlist?  I'm pretty sure the answer is no.
However, you can use 3rd party utilities and integrate them into your
website.  Here is one such solution < 
http://www.djangosnippets.org/snippets/1053/
>.

Toodle-lo...
creecode

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: make an object available to all views and blocks

2010-01-08 Thread creecode
Hello Kevin,

On Jan 8, 3:32 am, Kevin Coyner  wrote:

> Normally, when I call a view, I can retrieve an object and pass it to
> the html page via the dictionary in render_to_response. But in my site
> I need that same object in the sidebar of every rendering of the
> website.

Would a custom context processor <
http://docs.djangoproject.com/en/dev/ref/templates/api/#writing-your-own-context-processors
> do the trick?

Toodle-looo
creecode
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-09 Thread creecode
Hello GBS,

You might be able to accomplish this with the use of
signals.post_syncdb.  An adaptation the technique discussed here <
http://onebiglibrary.net/story/automatically-create-mysql-fulltext-index-with-django-syncdb
> to alter your column might do the trick.

On Jan 8, 10:24 pm, G B Smith  wrote:

> I now realize that primary=True is only one half of the problem. I
> could not find a way within Django to do something like
> autoincrement=True to go together with primary=True. At the moment it
> looks like I would need to go into the database (I'm using MySQL) and
> set the field to automatically increment.

Toodle-looooo..
creecode
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Custom commands called outside project path

2010-02-09 Thread creecode
Hello Tim,

On Feb 9, 10:34 am, Tim Daniel  wrote:
> I'm trying to launch custom admin commands with a cron(outside the
> project path). I'm running Django 1.1.1. I've tried to add the --
> pythonpath='path_to_my_project' option, but it doesn't work either.

Have you tried something like...

* * * * * root /path/to/your/project/manage.py yourcommand

Toodle-l
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django Template System with no Django instalation

2010-02-11 Thread creecode
Hello Gerson,

This might give you a starting point <
http://docs.djangoproject.com/en/dev/ref/templates/api/#configuring-the-template-system-in-standalone-mode>.

On Feb 11, 8:43 am, Gerson Goulart  wrote:
> Is it possible to have the Django Template System running straight
> over Apache without the need of the whole Django Framework installed,
> let's say, to make it possible to use this template system with other
> systems made in other languages such Java, just using this TPL system
> process the output in Apache directly?

Toodle-loo..
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: send_mail not sending e-mail in view, but does send e-mail in shell

2010-02-16 Thread creecode
Hello Heleen,

I don't have any specific solutions for you.  In several of my
projects I have views that do deliver email without issue.

A couple of things come to mind.  Have you checked that the arguments
passed to send_mail in your view are correct?  Is it possible that
there is some kind of permission problem?  Something like the Nginx
process isn't allowed to send email?

It might help us to help you if you could let us see the relevant code
in question and any tracebacks if there is an error.

On Feb 15, 1:09 pm, Heleen  wrote:

> When I try to send an e-mail  using
> send_mail() trough the Django website (so via a view function), it
> does not deliver the e-mail. However when on the same server I use
> 'python manage.py shell' it does deliver the e-mail.

Toodle-lo...
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: What validation tests are applied to ImageField?

2010-03-15 Thread creecode
Hello John,

On Mar 15, 7:56 pm, john2095  wrote:

> Question is "What is the definition of a 'valid image'" in this
> context?"
> and, optionally, where is the source code for that?

My understanding from what I've read is that most of the heavy lifting
for image handling is done by PIL (Python Imaging Library) <
http://www.pythonware.com/products/pil/ >.

I've been getting into using virtualenv and as part of that I've been
doing some PIL easy_installs.  One PIL install was built with the jpeg
library and when I tried uploading a jpeg image file, all went well.
Another PIL was built without the jpeg library and when I tried to
upload a jpeg image file, Django complained that the image wasn't in a
recognized format.

So, I assume Django is passing the file to PIL and asking if the file
is in a format that PIL can deal with and is in a valid format.

The PIL documentation may be able to clarify how it validates images.

Toodle-l
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django noob - static views or dynamic pages in web application?

2010-03-16 Thread creecode
You can store HTML in a database if that is how you need your project
to work!

This is how some CMS store user input.  Flatpages and dbtemplates are
some examples.

On Mar 16, 4:05 pm, Dennis Kaarsemaker  wrote:

> Neither should you store html code in a database.

Toodle-lo....
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Line in urls.py to capture url as a variable and pass to view function.

2010-03-20 Thread creecode
Take a look at how Flatpages < 
http://code.djangoproject.com/browser/django/trunk/django/contrib/flatpages
> does it and see if something like that method will work for you.

One trick with a pattern like this is to put it near the end of your
patterns so that it doesn't get satisfied to early and prevent your
other patterns from being checked.

Let us know how it works out for you.

On Mar 20, 8:36 am, gvernold  wrote:

> I've been over the url dispatcher instructions three times
> and can't find the right information to create the regular expression
> line that converts the typed in URL to a variable and passes it on to
> the view function as an argument.

Toodle-loo
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: what's wrong with this if statement structure

2010-03-25 Thread creecode
Hello Bobby,

On Mar 25, 9:42 am, Bobby Roberts  wrote:
> is there a quick way to do something like this in 1.1?

You could do the comparison at the view level and then set an
attribute on your object with the result.

Toodle-lo..
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: block google indexer

2010-03-25 Thread creecode
Hello Vishnu,

You might find Django Robots < 
http://bitbucket.org/jezdez/django-robots/overview/
> of use.

On Mar 25, 6:18 am, "vishnu.kumar"  wrote:

> I need to block google indexer from indexing my site.
>
> If it was a static site, i would put a htaccess or robots.txt, but
> django is different right.
> I cant put robot meta tag also, cause there are many pages in my site.
>
> How do i do it then?

Toodle-loo.
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: RPC4Django - can't pass Boolean args nor Keyword args

2010-03-31 Thread creecode
Apparently the question has been answered.

On Mar 31, 1:51 am, Simone Orsi  wrote:

> anyone using RPC4Django has faced 
> thishttps://bugs.launchpad.net/rpc4django/+bug/552437?

Toodle-loo.
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Getting strange email from "dreamhost"

2010-03-31 Thread creecode
Hello all,

I just posted a reply to a message here via the web interface and got
an email like this.

Toodle-lo..
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: What is the django way to mimic superglobals in PHP?

2010-04-02 Thread creecode
Hello Daniel,

A quick look at the Django documentation < http://docs.djangoproject.com/en/dev/
> shows this section Form wizard <
http://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/#ref-contrib-formtools-form-wizard
>.

Perhaps this will do what you need?

On Apr 2, 10:20 am, Daniel  wrote:

> I'm essentially trying to pass data from form to form, building up a
> query string based on a series of user selections.
>
> In PHP I could do this with superglobals, but how is this done in
> Django?  I imagine I'd want a global list or dictionary that I would
> keep appending to.  Are context processors the way to do this?

Toodle-l.
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 maintained.

Toodle-looo.
creecode

-- 
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/-/3wQ_QTSjmwEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Registering a user profile

2012-02-14 Thread creecode
Hello Jonathan,

See the "Storing additional information about 
users<https://docs.djangoproject.com/en/1.3/topics/auth/#storing-additional-information-about-users>"
 
section in the docs.  There it mentions the expected format of 
AUTH_PROFILE_MODULE.

I suspect what you need to do is wrap your UserProfile model up in it's own 
app if it isn't in one already.  Alternately you need to change the 
"models" in AUTH_PROFILE_MODULE to the name of your app.

Let us know if that works for you.

Toodle-lo..
creecode

-- 
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/-/HSX4NGpn66kJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Registering a user profile

2012-02-14 Thread creecode
Hello Jonathan,

On Tuesday, February 14, 2012 10:38:39 AM UTC-8, Jonathan Hayward wrote:

Do I need to create a separate application under pim and load " application>.UserProfile"?


>From the docs...

To indicate that this model is the user profile model for a given site, 
fill in the setting 
AUTH_PROFILE_MODULE<https://docs.djangoproject.com/en/1.3/ref/settings/#std:setting-AUTH_PROFILE_MODULE>with
 a string consisting of the following items, separated by a dot:

   1. The name of the application (case sensitive) in which the user 
   profile model is defined (in other words, the name which was passed to 
   manage.py 
startapp<https://docs.djangoproject.com/en/1.3/ref/django-admin/#django-admin-startapp>to
 create the application).
   2. The name of the model (not case sensitive) class.

For example, if the profile model was a class named UserProfile and was 
defined inside an application named accounts, the appropriate setting would 
be:

AUTH_PROFILE_MODULE = 'accounts.UserProfile'

 
So yes your UserProfile model should be inside of a separate app.  I 
usually call this app accounts just like the docs.  I generally put all my 
models inside an app not at the top level of a project.

Toodle-lo..
creecode

-- 
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/-/v-G9LkGXdEoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Need a Django/Python Freelancer (Paid Project)

2012-02-15 Thread creecode
How about a little more detail posted here to the list?  General parameters 
of how the website is to function?  Some specs?  You might generate more 
interest with more information.

Toodle-l...
creecode

-- 
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/-/nGl-yqlB_OEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django profile

2012-03-02 Thread creecode
Hello Bo,

On Friday, March 2, 2012 12:26:05 PM UTC-8, Bo Lang wrote:
>
> Can someone suggest me an application for adding user profile to django?
> I have found
> https://bitbucket.org/ubernostrum/django-profiles


Give James Bennett's django-profiles a go if you think it will meet your 
needs.  James does excellent work!
 

> but those 2 projects 
> don't receive update recently.


Just because something hasn't been updated recently doesn't mean it's not 
current, useful, or popular.  It can simply mean that the software does 
what it needs to and there has been no reason to update it.

Toodle-loo...
creecode

-- 
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/-/o-5oXFPLUJkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Automated Processes

2012-03-03 Thread creecode
On Friday, March 2, 2012 8:48:57 PM UTC-8, Russell Keith-Magee wrote:

Seriously -- Django is good at what it does, but just because you've got a 
> really good hammer, it doesn't mean every problem is a nail. The task you 
> describe sounds like almost exactly what cron scripts are designed to 
> handle. Rather than trying to bend Django into a shape that will solve your 
> problem, use the right tool for the job.
>
> You might also be able to attack the problem using a task queue like 
> celery [1]. However, celery is more complex to get set up than a cron 
> script. There are lots of benefits that come with that complexity, but if 
> you just want to get something going, you don't have any experience with 
> task queues, and you're not expecting any serious load problems, cron will 
> be the easier option.
>
> It's also worth pointing out that you can still use parts of Django (e.g., 
> your models, the ORM, the mail sending utilities) in a standalone Python 
> script that is called by cron/celery. Django is a just a set of Python 
> libraries. Yes, it's a set of libraries that is usually used to build web 
> sites, and most examples use Django APIs to service HTTP requests, but 
> there's no reason you can't write a standalone Python script that uses 
> Django's APIs to access and manipulate data.
>
Scott as Russ points out you can still use parts of Django.  I've had good 
success with cron and custom django-admin 
commands<https://docs.djangoproject.com/en/1.3/howto/custom-management-commands/>.
  
There is some overhead to write the commands but the upside is that they 
give you a defined way to approach the problem within the realm of Django.  
Also since they are django-admin commands you can run them as you would any 
other django-admin command manually which can be convenient at times.

Toodle-l..
creecode

-- 
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/-/K45OgnyooaUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Anyone experience any thing like this before?

2012-03-03 Thread creecode
Hello Stanwin,

On Friday, March 2, 2012 10:05:32 PM UTC-8, St@n wrote:

Hello,
>
> I was just tidying up on my project when i discovered a small bug.
>
> the last one being a queryset. 
>
> *So the forms.py looks like this:*
>
> keywords = 
> forms.ModelMultipleChoiceField(queryset=Keyword.objects.all())**
>
 
>
*However, the output becomes like the screenshot below:*
>

The keyword items being displayed as "Keyword object" are probably because 
you need to define a __unicode__ method for your Keyword model.

Something like this...

def __unicode__ ( self ):

return '%s' % self.pk

Obviously you would need to tune that method to match your model definition 
and what you want displayed.

Toodle-lo..
creecode

-- 
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/-/tpQDzaxafV0J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django making box

2012-03-13 Thread creecode
Hello Sophia,

On Tuesday, March 13, 2012 1:37:57 PM UTC-7, Sophia wrote:
>
> Thanks all for helping, as I told I read that tutorial, but my supervisor 
> said that I should do that with Django. He didn't mention about learning  
> JavaScript, but is it impossible just with Django?


I don't think it would be impossible to do it all in Django.  If you do it 
solely with Django you would need your box to act like a submit button on a 
form so that you can have the Django server do something in response to a 
form submission.

But without a clearer definition of how you want your app to behave it will 
be hard for us to give you more insight into how you might proceed.

When you say supervisor said is shoul be done in Django is that a 
supervisor as in teacher?  Or supervisor as your superior at work?

Toodle-looooo..
creecode


-- 
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/-/NdkVkN7HbT8J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: A good Twitter Package

2012-03-16 Thread creecode
Hello coded kid,

On Friday, March 16, 2012 2:30:06 AM UTC-7, coded kid wrote:

Hi guys, does anyone know about a good django package for twitter 
> authorization? I tried using omab/django social auth, but the twitter 
> authorization is not working for me.


Are you interested in oAuth capabilities only (authorization) or Twitter 
functionality as a whole (post, delete, etc. )?

If you want a Twitter client take a look at Python Twitter < 
http://code.google.com/p/python-twitter/ >.  I've used it a bit for posting 
and seems to work OK.

Toodle-looo...
creecode

-- 
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/-/BKzWscn6zKkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: all(), get(), create(), count(). More info?

2012-03-25 Thread creecode
Hello MF-DOS,

If you're just getting started with Django you might want to use the latest 
release tutorial <https://docs.djangoproject.com/en/1.4/intro/tutorial01/>.  
Of course you'll also want the 
latest<http://www.djangoproject.com/download/1.4/tarball/>Django release.

Whatever version you use make sure that the Django documentation and code 
versions are in sync.

I mention this because folks have been caught out by not using the same 
versions.

On Saturday, March 24, 2012 10:31:30 PM UTC-7, MF-DOS wrote:

Running this tut: 
https://docs.djangoproject.​com/en/1.1/intro/tutorial01/<https://docs.djangoproject.com/en/1.1/intro/tutorial01/>
 
>

Toodle-lo
creecode 

-- 
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/-/PBM_5AiRFEAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Tweepy Not Displaying

2012-03-28 Thread creecode
Hello coded kid,

On Wednesday, March 28, 2012 3:56:12 PM UTC-7, coded kid wrote:
 
>
> Template: 
>
 

>  {% for status in status %}
>

That bit looks like it might cause trouble.  You are assigning status to 
status.  Normally you'd want something like...

{% for status in statuses %}

or

{% for status in status_list %}

or

{% item in status %}

Use whatever variable names you want as long as you're not clobbering 
variables that are needed while looping.

Toodle-loo
creecode

-- 
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/-/3Kf6U0WIrMUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problem with Django tutorial

2012-04-04 Thread creecode
Hello maxim,

On Wednesday, April 4, 2012 9:51:39 AM UTC-7, maxim wrote:

I can't get the tutorial working for me. When I try to run the command:
> python manage.py syncdb
>
 

> My settings file has this for databases:
>
 

> 'NAME': '/home/maxim/mysite/mysite.db',  # Or 
> path to database file if using sqlite3.
>

I'm not sure but could it be there is no file at 
/home/maxim/mysite/mysite.db ?  If not you might try to touch that path and 
then try your syncdb.  It looks like are are on some kind of unix/linux 
variant so you probably have a touch command.

Toodle-looo..
creecode

-- 
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/-/GNnW9phn3JMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problem with Django tutorial

2012-04-04 Thread creecode
Opps...

On Wednesday, April 4, 2012 10:19:13 AM UTC-7, creecode wrote:
>
>
> It looks like are are on some kind of unix/linux variant so you probably 
> have a touch command.
>

That should have been "It looks like you are on..."  

-- 
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/-/qadyM8eb-mkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: adding html5 field attributes to a model form

2012-04-09 Thread creecode
Hello Lee,

On Monday, April 9, 2012 6:14:08 PM UTC-7, Lee Hinde wrote:

I'm trying to edit the field type in a form that is using the html5 
> doctype. I've tried two ways:
>
> Neither works. 
>
> Am I looking in the wrong place?
>

I use both those techniques and they work great for me.  I've use them on 
many forms for a project I'm working on now.  Some examples from my code...

brand_name = forms.CharField ( label = _( 'Brand Name' ), max_length = 
128,
widget = forms.TextInput ( attrs = { 'class' : 'span6', 
'placeholder' :
'enter brand name', } ) )

...and...

def __init__ ( self, *args, **kwargs ):

super ( AmountPerServing1Form, self ).__init__ ( *args, **kwargs )

for key in self.fields:

field = self.fields [ key ]

field.widget.attrs [ 'class' ] = 'span7'

I don't see anything wrong with your syntax.  Have you tried the usual 
things?  Make sure you save the file your're editing, restart the server, 
etc?  And still the form didn't show up with your changes?

Could there be some browser or other caching going on between you and the 
server?

Are you sub-classing those forms for using them directly?

Toodle-lo
creecode

-- 
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/-/k6DJ30Z_ZWsJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: adding html5 field attributes to a model form

2012-04-09 Thread creecode
Ah I see.  I haven't looked deeper in the code I'd guess the type is being 
set after you set it deeper in the machinery based on field class?  Perhaps 
a custom field could accomplish your goal?

On Monday, April 9, 2012 7:17:56 PM UTC-7, Lee Hinde wrote:
>
>
> Thanks for the response, Creecode,
>
> I've used that for adding class attributes just fine, but in this case I'm 
> trying to change the field 'type' and that's what doesn't seem to work.
>

Toodle-l.
creecode

-- 
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/-/x1LoD_TXVwwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django admin - How to disable "Delete each record" option for all the models at once

2012-04-10 Thread creecode
Hello Girish,

Would 
ModelAdmin.has_delete_permission<https://docs.djangoproject.com/en/1.4//ref/contrib/admin/#django.contrib.admin.ModelAdmin.has_delete_permission>do
 the trick?

On Monday, April 9, 2012 10:27:40 PM UTC-7, girishms wrote:
>
>
> Is there a way to remove "Delete each record" option for all the models in 
> admin?
>

Toodle-lo..
creecode 

-- 
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/-/PDjUInlNzXYJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: High Traffic

2012-04-16 Thread creecode
Hello Yarden,

On Monday, April 16, 2012 12:25:36 PM UTC-7, Yarden Sachs wrote:

Hello, I am using django 1.3 on apache 2.* on windows server 2008. 
> mysql 5.* 
>
> When i try to access a view that does this: def view(request): 
> len(User.objects.all()) return HttpResponse() 
>
> i have about 9K results on that. i am doing len and not .count, 
> because i want to test the server. 
>
> the server becomes reaally slow.
>

Are you running Django and MySQL on the same server box?  If so then you 
are possibly running into speed issues because of contention.  There are 
several Djagno configuration docs on the web that talk about using at least 
one server for your app and another for your database.  Another thing to do 
is move static files onto their own sever.

You might want to try django-debug-toolbar to examine your queries for your 
webpages to see if you can do some optimization.  I highly recommend giving 
it a go!

Of course there are many things one can do to make things faster but you'll 
need to give us some more info about your setup before we can help you more.

Toodle-loo.
creecode

-- 
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/-/qnCVc66M958J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Macs are great for Django development!

2012-04-20 Thread creecode
Hello Houman,

On Friday, April 20, 2012 5:58:34 AM UTC-7, Houmie wrote:
 

> As I am not familiar with Mac, is it true that a let say a Mac Mini is 
> powerful enough to run Python, Eclipse/PyDev and Django like its done 
> in Ubuntu without any problem?


Macs are great for Django development!  You may have to do a bit more work 
to get some libraries installed as sometimes they aren't specifically tuned 
for Macs.  Any modern Mac should be just fine for development.  Heck even 
ancient Macs (PPC based) can be used albeit slower and somewhat harder to 
configure, not the OS but again some of the libraries you might install.

I have a website <http://www.crowdsourcingnutritionfacts.info/> in 
development and the servers are Mac based.  The webserver is a recently 
purchased low-end Mac Mini <http://www.apple.com/macmini/specs.html>.  Its 
stack includes djagno, nginx, gunicorn, psycopg2, etc.  The database server 
is an ancient Power Mac G4 (Mirrored Drive 
Doors)<http://support.apple.com/kb/SP63>, 
Dual 1GHz.  It's running Postgres.  The webserver was formerly a Power Mac 
G4 (Mirrored Drive Doors) <http://support.apple.com/kb/SP63>, Dual 1.25GHz 
which finally gave up the ghost after almost 10 years of faithful service [ 
sniff :-( ].

The system has thus far not been optimized but it runs adequately fast at 
this stage of my development process.  Feel free to look around or even 
enter in some nutrition facts labels! :-)

Toodle-looo...
creecode

-- 
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/-/5zg9YgFpjZ8J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cannot add User to database

2012-04-20 Thread creecode
Hello Mai,

Could you post the actual error you are getting or describe the problem you 
are having more fully?  Posting a bunch of code doesn't help much unless 
there is more context to work with.

Toodle-l..
creecode

-- 
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/-/IFqHYZJgtaAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django- accessing items in a python dictionary

2012-04-29 Thread creecode
On Sunday, April 29, 2012 7:36:17 AM UTC-7, hius...@qq.com wrote:

what is value of the etc?
>

I believe that etc. in this case is an abbreviation for etcetera.

-- 
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/-/CupTM1pXfVoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Displaying markdown in html

2012-05-04 Thread creecode
Hello Emily,

This is not a direct answer to your question.  It looks like Tom has your 
answer.  You will most likely want to move the {% load markup %} to near to 
top of your template.  Generally loads only needs to be done once at the 
start of the template.

On Friday, May 4, 2012 5:55:28 AM UTC-7, Emily Namugaanyi wrote:


>
>  
>
>   {% for guideline in guidelines %} 
> {% load markup %} 
> Question: {{ guideline.question }}  
> Answer: {{ guideline.answer_markdown }}  > 
> {% endfor %} 
> 


Toodle-lo.
creecode 

-- 
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/-/p6ckOCJjQGwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: RSS Reader

2012-06-14 Thread creecode
Hello armagan,

A quick guess.  Mozilla's RSS reader doesn't understand your  tag and 
so passes over it and doesn't display it?  If the  tag isn't part of 
the RSS specification <http://www.rssboard.org/rss-specification> then a 
"standard" reader isn't going to do anything with your tag.  You would need 
either a custom reader or one with an extension.

On Thursday, June 14, 2012 7:44:59 AM UTC-7, armagan wrote:
>
>
> I wrote a rss custom feed class and I add an item element with 
> 'handler.addQuickElement(u"city", item['city'])' this function. It's ok I 
> can see the city tags in xml but mozilla's rss reader can't read my city 
> tags. What can I do to fix the problem?
>

Toodle-looo.
creecode 

-- 
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/-/BglqzxjcNYAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Do I understand the support schedule correctly?

2012-08-06 Thread creecode
Hello Steve,

On Saturday, August 4, 2012 9:24:27 AM UTC-7, Steve Bergman wrote:

that means a forced upgrade on both framework and 
> apps


Why a forced upgrade?  Just use what you installed to get your projects up 
and running until such time as as conditions are comfortable for you to 
upgrade.

The key factor for your situation is going to be how quickly the apps 
you're using with Django follow the updates to Django.  You don't have to 
run the latest of everything to get some work done.

Toodle-lo
creecode

-- 
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/-/0Ti06eA64zQJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: object.create speed, creating 3 objects takes 1 sec in sqlite

2012-08-06 Thread creecode
Hello Anton,

On Friday, August 3, 2012 9:05:47 AM UTC-7, Anton wrote:
 

> My Problem: I will populate it with 5 items. 
>
> Has Django really such a bad performance for data insertion? 
>
> I can't believe it, so ... can somebody give me a hint? 
> Is there a doc page dedicated to speed/performance issues?? 
>
> Otherwise I have to look for an other system.
>

Before you go looking for another system you may want to do some research 
on inserting lots of rows in Django.  Cal Leeming on this list has had some 
experience dealing with lots of rows and there are several threads on the 
topic.  Check the Google interface for this group and use the search 
feature.  Also try Googling for inserting lots of data with Django, several 
folks have written about their experiences inserting lots of rows.

Toodle-loo...
creecode

-- 
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/-/yLxStReK_1gJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: custom management commands: AttributeError: 'module' object has no attribute 'Command'

2012-08-13 Thread creecode
I have many custom management command names that have underscores in them. 
 I've never had a problem.  I believe that a management command name only 
needs follow python rules for naming files.

On Sunday, August 12, 2012 1:44:06 AM UTC-7, Melvyn Sopacua wrote:

On 11-8-2012 2:14, Matthew Meyer wrote: 
>
> Since I don't see anything wrong with your code or setup, I'm going to 
> take a stab in the dark and say that you need to loose the underscore in 
> the command.
>

Toodle-looo
creedcode 

-- 
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/-/IyKV_xgNgOcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django stickers

2012-08-25 Thread creecode
Hello Frej,

On Saturday, August 25, 2012 7:12:42 AM UTC-7, Frej Connolly wrote:

Where can I buy stickers with the Django logo?


If you can't find some already made you could use Cafe 
Press<http://www.cafepress.com/> to 
create your own from some of the artwork available on the internet.

Toodle-l.....
creecode 

-- 
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/-/w195ETkUNZwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: people.djangoproject.com broken

2012-08-30 Thread creecode
Hello Timothy,

I just tried going to the login webpage and had no problem.  I'm not 
registered on that website so my experience may be somewhat different.

On Thursday, August 30, 2012 10:39:24 AM UTC-7, Timothy Makobu wrote:

Still having no luck. Here's a screenshot of the error, displayed about 5 
> minutes ago:
>

Are you just going to the webpage or is this error after you have tried to 
login?

Are you using OpenID?  That may have something to do with it.

If you are just using the "regular" login (cookie based), have you tried 
deleting the cookies related to the website from your browser?

Toodle-looo.
creecode

-- 
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/-/s14_SIlckdwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Installation script?

2012-09-04 Thread creecode
Hello Cartsten,

Have you checked out pip <http://www.pip-installer.org/> which has 
a requirements feature and fabric <http://docs.fabfile.org/>.  Those two 
would probably take you a fair ways or at least give you some ideas how you 
might approach the problem.

On Monday, September 3, 2012 5:39:41 AM UTC-7, Carsten Agger wrote:
 

> We'd like to be able to automate all of this, so that the user can 
> install these two services by running a single installation script.
>

Toodle-looo
creecode

-- 
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/-/POj4TfIrtHUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: newbie: patch required? procedure? [closed ticket 16017 / createsuperuser]

2012-09-13 Thread creecode
Which version of django are you using?

On Thursday, September 13, 2012 7:58:11 AM UTC-7, Bob Aalsma wrote:

I'm a newbie following the tutorial. In this, creating a superuser is 
> described, using 
>
> manage.py createsuperuser --username=joe --email=j...@example.com 
> 
>
>
> Using this leads to an error, which I could match to the closed ticket 
> #16017.
>
> But I couldn't find how to proceed from there. It seems some software was 
> changed about 4 weeks ago:
> "Made createsuperuser more robust when getting current OS username."
>
> So where can I find it?
> [I'm assuming there is a procedure for this, but I'm sorry to say I 
> couldn't find that either]
>

Toodle-loo.
creecode 

-- 
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/-/DoDjnLlSiZwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django scrolling script

2012-09-26 Thread creecode
A Google search would yield many results.  I think you'll find that this 
sort of thing is often handled by a library such as jQuery (one of many 
possibilities).  You would use the library as their documentation directs 
and then supply the data needed from your django project.

Toodle-loo
creecode

On Wednesday, September 26, 2012 3:40:12 AM UTC-7, MrF16 wrote:

Hello, I need a script to display content from my database in a scrolling 
> list on my website. Any links?

-- 
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/-/ooYKKr7eZHMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ANN: eGenix mxODBC Connect - Python Database Interface 2.0.1

2012-09-26 Thread creecode
I don't mind the occasional well marked commercial product announcement as 
long as it's related to django.  By well marked I mean something in the 
subject line that indicates this is an ad or announcement, which this 
poster did.  Thank you!

Toodle-l...
creecode

-- 
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/-/QFsr5-5-NboJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: handling incoming xml response

2012-09-28 Thread creecode
Hello Sait,

On Friday, September 28, 2012 6:38:34 AM UTC-7, Sait Maraşlıoğlu wrote:
>
> Can u tell me how u handle incoming xml responses,
>

Generally you start with an XML parsing library. Which one you choose 
depends on what you are trying to do and also what makes sense to you. 
There are many Python based XML parsing tools available and a Google search 
would return many results.

Python has some built-in libraries that you might find of use 
xml.dom.minidom<http://docs.python.org/library/xml.dom.minidom.html#module-xml.dom.minidom>
 or 
xml.etree.ElementTree<http://docs.python.org/library/xml.etree.elementtree.html#module-xml.etree.ElementTree>.
 
 I've used BeautifulSoup a bit with good results.

Toodle-loo
creecode

-- 
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/-/nayPQ0zERP4J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django.contrib.markup "Deprecated in Django 1.5"??

2012-10-02 Thread creecode
https://groups.google.com/forum/#!searchin/django-users/markup/django-users/iwfuDFFAltI/hOOGii98eQAJ

On Tuesday, October 2, 2012 8:46:05 AM UTC-7, JC Briar wrote:

Can someone please explain to me why the dev version of the docs for 
> django.contrib.markupbegins
>  with the statement "Deprecated 
> in Django 1.5: This module has been deprecated"? Deprecated why? Is 
> something better coming in Django 1.5, or ...?
>

-- 
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/-/Q-41E30XnBQJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: URL Hierarchy on a given page

2012-10-02 Thread creecode
Hello JJ Zolper,

What you are describing is commonly called breadcrumbs.  Hopefully that 
tidbit will help yield more search results.

On Tuesday, October 2, 2012 9:03:06 PM UTC-7, JJ Zolper wrote:

So I was reading this page to try to find a solution:
>
> https://docs.djangoproject.com/en/dev/topics/http/urls/
>
> but I would like to hear any ideas.
>
> What I'm trying to do is basically give the relevant URL hierarchy for any 
> page on my website. (That's the best I can put it into words).
>
> So to try and make my question more clear, some examples:
>
> If the visitor was here:
>
> http://www.madtrak.com/ <http://www.madtrak.com/about>
>
> it would say "Home" and that would be a link to the home page.
>
> now going deeper if the visitor was here:
>
> http://www.madtrak.com/about <http://www.madtrak.com/about/contributors>
>
> right above where it says: "Learn more about our 
> contributors<http://www.madtrak.com/about/contributors>
>  be"
>
> it would say "Home >> About"
>
> and both "Home" and "About" would be the relevant links to 
> http://www.madtrak.com/ <http://www.madtrak.com/about> and 
> http://www.madtrak.com/about respectively.
>
> and one last time:
>
> if the user was here:
>
> http://www.madtrak.com/about/contributors<http://www.madtrak.com/about/contributors/jjzolper>
>
> right above "*Contributors*"
>
> it would say "Home >> About >> Contributors"
>
> and as you might have guessed "Home", "About", and "Contributors" would be 
> the relevant links to http://www.madtrak.com/<http://www.madtrak.com/about>
>  , http://www.madtrak.com/about, and 
> http://www.madtrak.com/about/contributors respectively.
>
> I believe after having said this what I'm trying to do is more clear. So 
> yeah, I wouldn't want to go page by page creating this for each page I want 
> a generic sort of way to code and basically plant this in all the pages 
> desired. It would then get the URL hierarchy above it (including the 
> current page) and display that in a very quick and easy way to navigate 
> through the website!
>

 Toodle-loo...
creecode

-- 
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/-/7XXGBElP858J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Regarding the sub domains

2012-10-14 Thread creecode
These comments are for the OP, I'm just using Christopher's message to key 
off of...

On Saturday, October 13, 2012 10:59:56 PM UTC-7, Christopher Hartfield 
wrote:

You would have to yes first configure your name servers and allow your 
> website example.com to resolve each of those subdomains.  So hopefully 
> your number of users won't be too high :(  If your allowed you might find 
> it easier to do example.com/moris/, but I would assume you can't do that.


For your name server you'll want to use a 
wildcard<http://en.wikipedia.org/wiki/Wildcard_DNS_record>
.

Django can handle subdomains with certain plugins like: 
> http://django-subdomains.readthedocs.org/en/latest/index.html
>

You don't have to use a Django app to handle subdomains, all the routing 
can be handled with your webserver (like Apache, etc.)  It just depends on 
where you want to do your configuring. 
 

> Setting up multiple databases isn't too hard and you can use RAW SQL to 
> help you with it. 
>
 

> Django supports multiple databases (but I'm not sure you can use Django to 
> create a new db on the fly)
>

You can get Django to create a new database on the fly with the use of a 
custom management command.  Essentially you'll be using RAW SQL in the 
management command to do the database creation bit.  Keep in mind that you 
need to have a Django environment setup to use the custom management 
command.  That involves some overhead which only you'll be able to 
determine if it is appropriate for your situation.

You may want to read this thread on one way to do mass 
hosting<https://groups.google.com/d/msg/modwsgi/wp3ej772jgs/SXMzMZl5dN0J>if 
you're going to use mod_wsgi.

Toodle-loo
creecode

-- 
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/-/1_XG0SfjoA0J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: What is the right way to use S3 as a storage backend?

2011-10-05 Thread creecode
Hello Kurtis,

On Wednesday, October 5, 2011 7:07:16 AM UTC-7, Kurtis wrote:
 

> Unfortunately, and this is probably an issue with Amazon -- I get a an 
> access denied error when I try to access my files. For example: 
>
> http://dw2u7t9lse636.cloudfront.net/css/base.css 


That response is most likely a setup issue with your permissions.  You need 
to make sure that everything along the path (bucket, folders, file) to your 
file has public access set for everyone to access via a browser.

Toodle-loooo....
creecode

-- 
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/-/tPtqYK_rEwMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



  1   2   >