Upload images to rich-editor in admin interface

2006-08-19 Thread Scater

I have simple model:
class Entry(models.Model):
...
body = models.TextField()
...

And i use rich-editor like TinyMCE or FCKEditor etc in admin-interface.
for edit a field "body"
I need functionality of uploading images for user's computer to this
editor directly.
I understand that decision depends on chosen editor and that i need
some server-side code.

May be someone dials with this problem and have ready-made solution


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Manipulators Question

2006-08-19 Thread mediumgrade

I like this solution:

http://code.djangoproject.com/wiki/CookBookManipulatorWithPostpopulatedFields


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: notification when an object is deleted

2006-08-19 Thread medhat


medhat wrote:
> Ian Clelland wrote:
> > > 3. I am still looking for an answer to my original question at the
> > > beginning of this discussion. What if I don't want to delete the
> > > tickets but assign them to another user?
> >
> > Was that the original question?
> >
> > All I saw was:
> >
> > On 8/17/06, medhat <[EMAIL PROTECTED]> wrote:
> > > I would like to delete all the tickets created by a user if that user is
> > > deleted. Is there a way to do this *without* changing the user model?
>
> Well, I am sorry... after reading my post again, I found that it
> sounded a bit harsh. Anyway, the question I refered to is the subject
> of the discussion which can be paraphrased: "can I get some kind of
> notification when an object is deleted?" After reading all the
> responses it seems that I can't, and that I will need to create the
> custom view. I was just hoping to do it all from the admin. I was
> hoping dispatchers can be used for this (my only knowledge of
> dispatchers is how I use them to creat objects when syncdb is called)
>
> --
> Thanks,
> Medhat

Ok, I digged a little deeper in the code... and it seems that I *can*
use dispatchers for that, since in django.db.models.signals there is a
"pre_delete" and a "post_delete" signal defined. The only thing is that
I don't see these signals sent to the dispatcher in
django.db.models.base. Is this a bug? or am I missing something? If it
is I will file a ticket.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: notification when an object is deleted

2006-08-19 Thread medhat


Ian Clelland wrote:
> > 3. I am still looking for an answer to my original question at the
> > beginning of this discussion. What if I don't want to delete the
> > tickets but assign them to another user?
>
> Was that the original question?
>
> All I saw was:
>
> On 8/17/06, medhat <[EMAIL PROTECTED]> wrote:
> > I would like to delete all the tickets created by a user if that user is
> > deleted. Is there a way to do this *without* changing the user model?

Well, I am sorry... after reading my post again, I found that it
sounded a bit harsh. Anyway, the question I refered to is the subject
of the discussion which can be paraphrased: "can I get some kind of
notification when an object is deleted?" After reading all the
responses it seems that I can't, and that I will need to create the
custom view. I was just hoping to do it all from the admin. I was
hoping dispatchers can be used for this (my only knowledge of
dispatchers is how I use them to creat objects when syncdb is called)

-- 
Thanks,
Medhat


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: manage.py runserver throws error message

2006-08-19 Thread Malcolm Tredinnick

On Sat, 2006-08-19 at 15:46 -0400, Cole Tuininga wrote:
> I finally figured out the problem.  In my case, I had decided to name
> the project something besides "mysite"  in this case, I decided to
> name it "site".  Naming it something different than "site" solved the
> problem, so I'm making the assumption that I was causing some sort of
> name collision?

There's a standard Python module called "site" that is transparently
imported at startup time. So, yes, you were getting a namespace
collision.

Regards,
Malcolm



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: libraries for common tasks, tinymce, mochikit

2006-08-19 Thread Malcolm Tredinnick

Hi Dirk,

On Sat, 2006-08-19 at 21:17 +0200, [EMAIL PROTECTED] wrote:
> Hi all,
> 
> I read a lot of the threads about modularity apps, AJAX support in django and 
> why not, secure context_processors and so on.
> 
> I made today 3 libraries from lot of sources I found out there in the web:
> 
> Common Library task:
> libs.common.context_processors.media_url
> libs.common.context_processors.css_url
> libs.common.context_processors.js_url
> libs.common.context_processors.img_url
> libs.common.templatetags: yes_no_icon_url, javascript_import
> libs.common.middleware.CurrentUserMiddleware
> 
> TinyMCE WYSIWYG integration for admin-app TextFields:
> libs.tinymce.admin_js + media files
> 
> Mochikit usage within django template and a search_result-view:
> libs.mochikit.context_processors.mochikit_url
> libs.mochikit.views.search_results
> libs.mochikit.templatetags: include_mochikit_script, mochikit_imports
> + media files
> 
> If something is kind of interest for others I would publish those libs 
> somewhere on the web or maybe in the django-wiki ?

Nice. :-)

We currently have http://code.djangoproject.com/wiki/CookBook in the
Wiki, which seems to be accumulating contributed apps as well. That
might be a place to drop in a page that describes these modules and
download location.

A couple of thoughts from just reading over your description: if it's
possible to package these without the libs/ prefix, that would provide
the person using them with more flexibility over where these things get
installed. It seems like a somewhat arbitrary constraint at the moment
that could be removed without harming functionality (maybe; again, I
haven't seen your setup at all). Also, for something like mochikit and
tinymce, you might want to choose a directory name that isn't exactly
the same as the product you are wrapping, to avoid confusion when
reading the code.

These are the cases where we are going to start to learn what works and
doesn't for app distribution. I've been wondering if/when we are going
to end up with something like Java's prefixes (com.pointy_stick.my_app,
etc). Hopefully never, since the directory structure is always pretty
unusable outside of IDEs, but the land-grab is now on for the cool app
names. :-)

Cheers,
Malcolm



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: real-world Django examples

2006-08-19 Thread Eugene Lazutkin

Baurzhan Ismagulov wrote:
> Hello all,
> 
> I'm considering using Django for my site. Design philosophy, overview,
> tutorial, and GvR comments are promising, but I would be happy to see
> one last thing before starting: a real site with sources as a tarball,
> just to get a feeling how the whole looks like. I'm starting with the
> tutorial, but this will take some time and possibly doesn't cover some
> aspects relevant for any real web site. I would be very grateful if
> anyone could point me to some published sources, or share the sources
> with me.

How about djangoproject.com sources? You can browse it here: 
http://code.djangoproject.com/browser/djangoproject.com, and you can 
check it out using SVN --- it uses the same repository as Django itself.

Thanks,

Eugene


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: real-world Django examples

2006-08-19 Thread Pedro Lima

Hello Baurzhan,

Two more sites with nice source.

Limodou: http://www.djangocn.org/help/
Luke Plant: http://lukeplant.me.uk/blog.php?id=1107301641

Hope to see you around.
pvl


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Interacting with models from the CLI

2006-08-19 Thread Bryan Chow

See:
http://groups.google.com/group/django-users/browse_thread/thread/51827a2a40e5262e

Bryan :)



On 8/19/06, Jon Atkinson <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need to schedule some operations on my database to happen at a
> certain time each day. I'm tackling this by using cron, so ideally I'd
> like to be able to write a stand-alone python script which will do
> this.
>
> My first though would be to pass a script to ./manage.py shell,
> (something like ./manage.py shell myscript.py), but this doesn't seem
> to work. I've tried also writing a stand-alone script and importing
> the necessary modules, but I'm having problems with
> DJANGO_SETTINGS_MODULE not being set (it seems that django does some
> magic which is beyond me at this point) - am I approaching this in the
> correct way, and if so what do I need to import/read from settings.py
> so that a stand-alone script can interact with my models?
>
> Thanks,
>
> --Jon

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: real-world Django examples

2006-08-19 Thread Ian Holsman


On 20/08/2006, at 8:13 AM, Jay Parlar wrote:

>
> Ian Holsman makes the source of zyons.com available.

this powers a couple of different websites:
- http://gypsyjobs.com
and
- http://garden-gossip.com
being 2 examples.

regards
Ian

>
> As well, Jeff Croft makes the source for lost-theories.com available
> (http://www2.jeffcroft.com/2006/jun/06/lost-theories-with-source- 
> code/)
>
> Lost-theories.com is a bit smaller in scope, so I'd recommend looking
> at that too.
>
> Jay P.
>
> >

--
Ian Holsman
[EMAIL PROTECTED]
http://VC-chat.com It's what the VC's talk about



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Diamanda wiki v.0.0.2

2006-08-19 Thread [EMAIL PROTECTED]

This a v.0.0.2 release of my wiki :)
Current features
- Add, Edit/Achive a Page
- Diff between all changesets, restore old changeset
- Textile markup
- Permission for logged in and anonymous.
Anonymous perms are set in settings.py
ANONYMOUS_CAN_EDIT=True - can edit pages
ANONYMOUS_CAN_ADD=True - can add pages
ANONYMOUS_CAN_VIEW=True - can see pages
ANONYMOUS_CAN_SET_CURENT=True - can set an edited page as current

For authenticated users there are default perms (add, edit) and extra:
permissions = (("can_view", "Can view Page"), ("can_set_current", "Can
set Page as current"))

It still needs a lot of work but I would welcome any comments about the
code and features to implement... (search, more markup extras etc. in
ToDo). Installation described in the readme.
-
Source: http://www.rk.edu.pl/diamanda.zip
Mini-Screencast: http://www.rk.edu.pl/dia.html (swf, 1,1MB) made with
wink
-
I'm planning to move my sites (Linux/PHP/SQL/Python/www www.rk.edu.pl)
to django and diamanda wiki but I would need a Django hosting -
sponsored - I can help with PHP/SQL/Python/Django or make some
translation (Polish) for example - hosting company site and so on :)
Any one want to help?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: real-world Django examples

2006-08-19 Thread Jay Parlar

Ian Holsman makes the source of zyons.com available.

As well, Jeff Croft makes the source for lost-theories.com available
(http://www2.jeffcroft.com/2006/jun/06/lost-theories-with-source-code/)

Lost-theories.com is a bit smaller in scope, so I'd recommend looking
at that too.

Jay P.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: real-world Django examples

2006-08-19 Thread [EMAIL PROTECTED]

there are few example applications on django wiki -
http://code.djangoproject.com/ with source code.
You may also want to check out django powered sites, a list is here:
http://code.djangoproject.com/wiki/DjangoPoweredSites


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



real-world Django examples

2006-08-19 Thread Baurzhan Ismagulov

Hello all,

I'm considering using Django for my site. Design philosophy, overview,
tutorial, and GvR comments are promising, but I would be happy to see
one last thing before starting: a real site with sources as a tarball,
just to get a feeling how the whole looks like. I'm starting with the
tutorial, but this will take some time and possibly doesn't cover some
aspects relevant for any real web site. I would be very grateful if
anyone could point me to some published sources, or share the sources
with me.

Thanks in advance,
Baurzhan.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Interacting with models from the CLI

2006-08-19 Thread James Bennett

On 8/19/06, Jon Atkinson <[EMAIL PROTECTED]> wrote:
> I've tried also writing a stand-alone script and importing
> the necessary modules, but I'm having problems with
> DJANGO_SETTINGS_MODULE not being set (it seems that django does some
> magic which is beyond me at this point) - am I approaching this in the
> correct way, and if so what do I need to import/read from settings.py
> so that a stand-alone script can interact with my models?

There's not really any "magic" involved; DJANGO_SETTINGS_MODULE is
just an environment variable, so doing this at the top of your script
should work:

import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'myapp.settings'


-- 
"May the forces of evil become confused on the way to your house."
  -- George Carlin

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Interacting with models from the CLI

2006-08-19 Thread Jon Atkinson

Hi,

I need to schedule some operations on my database to happen at a
certain time each day. I'm tackling this by using cron, so ideally I'd
like to be able to write a stand-alone python script which will do
this.

My first though would be to pass a script to ./manage.py shell,
(something like ./manage.py shell myscript.py), but this doesn't seem
to work. I've tried also writing a stand-alone script and importing
the necessary modules, but I'm having problems with
DJANGO_SETTINGS_MODULE not being set (it seems that django does some
magic which is beyond me at this point) - am I approaching this in the
correct way, and if so what do I need to import/read from settings.py
so that a stand-alone script can interact with my models?

Thanks,

--Jon

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: libraries for common tasks, tinymce, mochikit

2006-08-19 Thread ToddG

I think this sounds like an ideal solution to handling common needs and
requests that don't belong or aren't wanted in django core/contrib.
Over time if certain libs or functions prove esp. useful they could be
"promoted" to the distribution if wanted (by core committers).

Just because something doesn't belong in the dist doesn't mean everyone
should need to rewrite their own libs for very common tasks... as you
look to be doing already this type of approach could be a good solution
the AJAX threads -- keep them out of core yet still easily allow people
to share work and leverage common solutions.

I guess this whole situation sort of happens on its own (other libs
being written and adopted) but it could be quite useful to have the
effort be more organized and less organic... nice job!


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: manage.py runserver throws error message

2006-08-19 Thread Cole Tuininga

I finally figured out the problem.  In my case, I had decided to name
the project something besides "mysite"  in this case, I decided to
name it "site".  Naming it something different than "site" solved the
problem, so I'm making the assumption that I was causing some sort of
name collision?

-- 
Cole Tuininga
http://www.tuininga.org/

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



OT: got api

2006-08-19 Thread Steven Armstrong

Just found something I thought might also be useful for some of you folks :)

http://gotapi.com/

No python api yet, but lot's of other stuff useful stuff for web developers.

cheers

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



libraries for common tasks, tinymce, mochikit

2006-08-19 Thread dummy

Hi all,

I read a lot of the threads about modularity apps, AJAX support in django and 
why not, secure context_processors and so on.

I made today 3 libraries from lot of sources I found out there in the web:

Common Library task:
libs.common.context_processors.media_url
libs.common.context_processors.css_url
libs.common.context_processors.js_url
libs.common.context_processors.img_url
libs.common.templatetags: yes_no_icon_url, javascript_import
libs.common.middleware.CurrentUserMiddleware

TinyMCE WYSIWYG integration for admin-app TextFields:
libs.tinymce.admin_js + media files

Mochikit usage within django template and a search_result-view:
libs.mochikit.context_processors.mochikit_url
libs.mochikit.views.search_results
libs.mochikit.templatetags: include_mochikit_script, mochikit_imports
+ media files

If something is kind of interest for others I would publish those libs 
somewhere on the web or maybe in the django-wiki ?

Regards,
Dirk
-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: notification when an object is deleted

2006-08-19 Thread Ian Clelland

On 8/18/06, medhat <[EMAIL PROTECTED]> wrote:
> First, I am using sqlite... and I checked the manage.py sqlall and it
> had no "on delete cascade" at all. So, is this done programmatically in
> python to simulate the same effect?

Yes, as James mentioned, it is done programmatically; Django simulates
the effects of "on delete cascade" when you delete an object. I
mentioned the SQL because you could alter your database tables to do
this explicitly, if nothing else is working.

> And I had the ticket model with two
> foreign keys to the user record (who reported it, and who fixed it) the
> first one is required, while the second one is not.

I'd say it's very likely that that is related to this issue... I'd
have to read through the code to be sure, but this might be causing
Django to not delete the user records when the tickets are deleted.

> When I delete the
> user in the admin side it tells me that it will also delete all the
> tickes that are created by that user, but not the ones fixed by the
> user. So here I have a few questions:
>
> 1. Why did it do that (not that I am complaining, I just want to
> understand) does it have to do with one field being required and the
> other not?
> 2. Is this behavior documented anywhere? It feels a bit of magic to me
> when it is hard to predict how the software will behave!

I'm sure the core developers would be much more qualified to answer
these questions than I am :) -- especially if it is related to having
two ForeignKey fields to the same model.

> 3. I am still looking for an answer to my original question at the
> beginning of this discussion. What if I don't want to delete the
> tickets but assign them to another user?

Was that the original question?

All I saw was:

On 8/17/06, medhat <[EMAIL PROTECTED]> wrote:
> I would like to delete all the tickets created by a user if that user is
> deleted. Is there a way to do this *without* changing the user model?

If you want to do something different, like assign the tickets to
another user, you will have to write a custom view (and possibly a
custom manipulator) to do this. In that case, you would not want to
delete users using the built-in admin interface at all, but use your
custom view instead.

Regards,
Ian Clelland
<[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Newbie generic view query

2006-08-19 Thread boglet


Ivan Sagalaev wrote:
> What you're seeing is probably a distinction between 'null=True' and
> 'blank=True' in field's parameters. The former means "allow NULL in a db
> table" and the latter means "not required when a default manipulator
> does form validation". Looks like you didn't include the latter.
>
> [1] http://www.djangoproject.com/documentation/forms/

Perfect. Thanks for your help.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Newbie generic view query

2006-08-19 Thread Ivan Sagalaev

boglet wrote:
  > So, the only thing that I can think is that generic views require all
> fields for a model to be filed in. Is this correct?

No, views (generic or custom) has nothing to do with this. This is the 
effect of validation by automatic manipulators[1] (that incidentally are 
indeed used in generic views).

What you're seeing is probably a distinction between 'null=True' and 
'blank=True' in field's parameters. The former means "allow NULL in a db 
table" and the latter means "not required when a default manipulator 
does form validation". Looks like you didn't include the latter.

[1] http://www.djangoproject.com/documentation/forms/

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Blog URLs - defined in Template or elsewhere?

2006-08-19 Thread keukaman

Thanks again for your help Malcom. I hadn't defined the method in my
model, so it was only picking up the partial path. I found what needs
to be done.


Malcolm Tredinnick wrote:
> On Fri, 2006-08-18 at 19:59 -0700, keukaman wrote:
> > I'm unclear how to generate the urls for a blog application I have.
> >
> > The source code for the djangoproject/weblog app shows this:
> >
> > {{ object.headline
> > }}
> >
> > When I do the same in my template I only get the absolute url of the
> > application, ie., http://www.websitename.com/blog/. However, it appears
> > that this same code generates
> > http://www.djangoproject.com/weblog/2006/aug/18/slug .
>
> So what does the get_absolute_url() method of your model look like? That
> is where all the details are specified. Sounds like you need to tweak
> that a bit more.
> 
> Regards,
> Malcolm


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Newbie generic view query

2006-08-19 Thread boglet

Hi,

I've created a model with 9 fields, 3 of which I need to be filled in
at
object create time, the other 6 filled in at a later date. I'm using
the
create_update.create_object generic view and everything seems to be
working up to a point.

My template was just asking for the 3 mandatory fields on the form, but
was rendering "Go back and fix these errors". So I changed the template
to
show all fields on the form and this shows that the remaining 6 fields
are
saying that they are required fields. Even the MySQL DB shows that they
are no mandatory fields.

So, the only thing that I can think is that generic views require all
fields for a model to be filed in. Is this correct? Do I need to write
my
own view?

Thanks for your help.
Paul
P.S. From what I've seen so far.. Awesome product..


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Blog URLs - defined in Template or elsewhere?

2006-08-19 Thread Julio Nobrega

  Sometimes get_absolute_url() has errors and it doesn't show on the
template, and it returns nothing.

  Fire up the dev server and throw some prints inside the method to
see if everything you're suppose to return is ok.


On 8/18/06, keukaman <[EMAIL PROTECTED]> wrote:
>
> When I do the same in my template I only get the absolute url of the
> application, ie., http://www.websitename.com/blog/. However, it appears
> that this same code generates
> http://www.djangoproject.com/weblog/2006/aug/18/slug .

-- 
Julio Nobrega - http://www.inerciasensorial.com.br

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Django Blog software

2006-08-19 Thread Matthias Urlichs

David Larlet wrote:
> BTW, it's really easy to make your own.
>
Sure it is.

I mean, yeah, a quick and dirty blog is child's play with Django, *but*
then you want a sensible CSS structure for it, and a cached RSS feed,
and trackback (both directions please) and pingback (ditto) and
"old-style" comments, and you got to spam-protect these somehow, and
RSS on the comments, and tags, and more RSS, except that maybe you like
Atom better, and ...

... so, yeah, dirt simpe, anybody can do it. But not everybody who can,
can get all of those *right*.

Besides, I want to write blog entries -- instead of fiddling with the
code for the foreseeable future. ;-)


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---