Re: New Release of IBM_DB_DJANGO (1.0.4)

2012-05-17 Thread Gath
Seems like it does not support Informix!?

On May 16, 1:20 pm, Rahul  wrote:
> IBM_DB_DJANGO-1.0.4
> ---
> IBM_DB_DJANGO adaptor enables access to IBM databases from Django
> applicationshttp://www.djangoproject.com/. The adaptor is developed
> and maintained by IBM.
>
> What's New?
> 
>  - Added support for Django-1.4
>
>  - Backward compatibilty - Same codebase works with older supported
> version of Django
>
>  - Added support to enable Django's USE_TZ feature
>
>  - Added support for Django's bulk_create
>
>  - Added support for 'SELECT FOR UPDATE'
>
>  - Added module version string __version__
>
> SVN access to the source
> ---http://code.google.com/p/ibm-db/source/browse/trunk/IBM_DB/ibm_db_dja...
>
> Installation
> 
> $ easy_install ibm_db_django
>
> Feedback/Suggestions/Issues
> 
> You can provide us feedback/suggestions, or report a bug/defect, or
> ask for help by using any of the following channels:
> 1. Mailing us at open...@us.ibm.com
> 2. Opening a new issue athttp://code.google.com/p/ibm-db/issues/list.
> 3. By opening new discussion athttp://groups.google.co.in/group/ibm_db.
> For prerequisites, installation steps and help details, visit 
> -http://code.google.com/p/ibm-db/wiki/ibm_db_django_README
> Try this out and let us know you valuable feedback. Have fun.
>
> Cheers,
> Rahul Priyadarshi
>
> Download Express-C for free, go to:
> ---
> -http://www.ibm.com/software/data/db2/express/download.html?S_CMP=ECDD...

-- 
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: Coding used for dropbox

2012-03-11 Thread Gath
99% python.

On Mar 12, 8:29 am, Mario Gudelj  wrote:
> http://en.wikipedia.org/wiki/Dropbox_(service)#Technology
>
> No reason why it can't be made in Django.
>
> On 12 March 2012 16:06, pankaj sharma  wrote:
>
>
>
>
>
>
>
> > Hello everyone,
> > i want to know that which language and framework was used for making
> > dropbox,
> > and i want to make such website, so can i make it in django, if not which
> > framework and language should i use?
>
> > --
> > Pankaj Sharma
> > Third Year Undergraduate Student
> > Department of Civil Engineering
> > Indian Institute of Technology Kharagpur
> > Ph: +91 9547891751
> > Email: new.pankajsha...@gmail.com
>
> >  --
> > 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.

-- 
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: Contribute to Django

2012-02-10 Thread Gath
Sorry, had not seen that!

Thanks.

On Feb 9, 10:19 pm, yati sagade  wrote:
> Django docs explain this quite nicely :)
>
> https://docs.djangoproject.com/en/dev/internals/contributing/?from=ol...
>
>
>
>
>
>
>
>
>
> On Fri, Feb 10, 2012 at 12:46 AM, Gath  wrote:
> > Guys,
>
> > What do i need to learn/know before i start contributing to django
> > development?
>
> > Thanks
>
> > Gath
>
> > --
> > 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.
>
> --
> Yati Sagade <http://twitter.com/yati_itay>
>
> (@yati_itay <http://twitter.com/yati_itay>)

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



Contribute to Django

2012-02-09 Thread Gath
Guys,

What do i need to learn/know before i start contributing to django
development?

Thanks

Gath

-- 
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: Why are my two django objects of the same type behaving differently?

2011-10-31 Thread Gath
Somebody answered this
http://stackoverflow.com/questions/7954474/why-are-my-two-django-objects-of-the-same-type-behaving-differently

 ...
>>> s = '%build%'
>>> content_query = content_class.objects.raw("Select * from pms_building where 
>>> name like %s",[s])
>>> type(content_query)


Works well.

Thanks

On Oct 31, 5:30 pm, Gath  wrote:
> Help!
>
> I have two objects that i have created using different techniques in
> django;
>
> >>> from django.contrib.contenttypes.models import ContentType
> >>> from myproject.models import Building
>
> Method A
>
> >>> content_type = ContentType.objects.get(app_label='myproject', 
> >>> model='Building')
> >>> content_class = content_type.model_class()
> >>> content_query = content_class.objects.raw("Select * from pms_building 
> >>> where name like '%build%' ")
> >>> type(content_query)
>
> >>> content_query[0]
>
> # error 
> # Attribute: 'str' object has no attribute 'items'
>
> Method B
>
> >>> bld = Building.objects.raw("Select * from pms_building where name like 
> >>> '%build%' ")
> >>> type(bld)
>
> 
>
> >>>bld[0]
>
> 
>
> My question is why are the two objects of the same type behaving
> differently?
>
> Gath

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



Why are my two django objects of the same type behaving differently?

2011-10-31 Thread Gath
Help!

I have two objects that i have created using different techniques in
django;

>>> from django.contrib.contenttypes.models import ContentType
>>> from myproject.models import Building

Method A

>>> content_type = ContentType.objects.get(app_label='myproject', 
>>> model='Building')

>>> content_class = content_type.model_class()

>>> content_query = content_class.objects.raw("Select * from pms_building where 
>>> name like '%build%' ")

>>> type(content_query)


>>> content_query[0]
# error 
# Attribute: 'str' object has no attribute 'items'

Method B

>>> bld = Building.objects.raw("Select * from pms_building where name like 
>>> '%build%' ")

>>> type(bld)



>>>bld[0]


My question is why are the two objects of the same type behaving
differently?

Gath

-- 
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: Has anyone used the "djangoles-tutorial.pdf" tutorial?

2011-07-24 Thread Gath
What's the problem you having?

On Jul 25, 12:48 am, William C Grisaitis  wrote:
> Hi all,
>
> I'm new to Django and started following a tutorial I found on google, named
> "djangoles-tutorial.pdf", which shows you how to make a very basic Django
> web app with Eclipse and PyDev. It's the first hit on google if you search
> "django tutorial filetype:pdf".
>
> Does anyone here have experience with this tutorial? I'm having a minor
> problem in section 5, `Using Models in Views` (p. 6 of the pdf). I've adding
> a function to the `views.py` file of an app, named `members`, inside the
> django project.
>
> If anyone has used this tutorial, let me know and I'll post some code!
>
> Again, this is all on Eclipse (3.6.2), PyDev, and Django 1.3.
>
> Thanks and best,
>
> William
>
> --
>
> William C Grisaitis
> Duke  Physics  2012
> f  |
> t |
> (321) 422 - 9231

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

2011-07-13 Thread Gath
There was a long talk by James Bannett called "Django In Depth" during
pycon 2010, it would be good to check it out

http://djangocon.blip.tv/file/3322277/

Gath


On Jul 13, 7:36 pm, Venkatraman S  wrote:
> Except for the code, is there any good place to start with to better
> understand the django structure.
> As in, i am trying to figure out a way by which django can be much leaner,
> so that the actual footprint
> is much smaller. Say, if i just want to have a simple website with a handful
> of models, with no complex
> queries, then having something like a 'django-lite' would be awsome.
>
> I started cleaning(/removing) up the code sometime back, but soon digressed.
>
> -V

-- 
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: Our new startup site build on Django and GAE is now live!

2011-06-02 Thread Gath
Great stuff!! Thumbs up.

I like the concept!

Please share you knowledge on how you did the Django/GAE integration.

Gath

On Jun 2, 10:02 am, maverick  wrote:
> We build a pretty cool website LOCQL (www.LOCQL.com) purely on Django
> and run on GAE has just went live!
>
> I would say development with Django is purely enjoyable experience,
> however the Google Apps Engine does bring us some headache esp. we are
> a location based service, the geo-location related search is a
> challenge for us.
>
> I would like everyone who use Django to give us a try and feedback are
> warmly welcome!

-- 
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 1.3 docs PDF

2011-06-01 Thread Gath
Good stuff, thanks.

On Jun 2, 12:47 am, Oscar Carballal  wrote:
> Hello,
>
> I've just created a PDF (5.6MB, 1042 pages) with all the django 1.3
> docs [|], just in case someone need it (sometimes it's useful to have
> the docs offline).
>
> Cheers,
> Oscar
>
> [1]http://clionesoftware.com/files/docs/django1.3.pdf

-- 
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: failing to pass model objects to template for some reason....

2011-05-21 Thread Gath
Chris,

Try to print out the entire list object in the template, see if it has
anything i.e.

{{ messages }}

This should tell you if data is been transfered from your view to the
template.

Gath

On May 21, 7:51 am, Chris Seberino  wrote:
> I have a model class called Message with an attribute called text.
>
> ** When I pass a list of these objects called messages to my template,
> it doesn't show up.
>
> ** When I instead create this derivative called fred, that *does*
> work...
>          fred = [e.text for e in messages]
>
> Why would fred work fine in template but not messages?
>
> Here is my template code for messages that doesn't show anything on
> page..
>
>         {% for e in messages %}
>                 {{e.date}}: {{e.text}}
>         {% endfor %}
>
> Here is the fred code that does work..
>         {% for e in fred %}
>                 {{e}}
>         {% endfor %}
>
> cs

-- 
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: Google App Engine supports Django 1.2!

2011-02-14 Thread Gath
Please give me a pointer/link to a tutorial on how i can use GAE with
django.

Thanks,
Gath.

On Feb 14, 7:12 am, Sarang  wrote:
> Thanks for the clarification. Yes, I am using django-nonrel which installed
> 1.3.0 alpha 1 for me.
>
> Regards,
> Sarang

-- 
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: Pinax: worth installing?

2011-01-18 Thread Gath
Magee,

Wow! Now thats what we call a response.

You made me understand this subject more.

Thanks a lot Magee.

Gath.

On Jan 18, 5:32 pm, Russell Keith-Magee 
wrote:
> On Tue, Jan 18, 2011 at 9:43 PM, Cal Leeming [Simplicity Media Ltd]
>
>  wrote:
> > I would be interested to hear from anyone who has used Pinax in production.
> > Although I am discouraged by the maturity (only 2 years old?), it does seem
> > to contain some useful features.
> > Personally, I would have liked to have seen some of these features merged
> > into the Django core, rather than forked into a separate project, but that's
> > just me.
>
> I think we need to clear up some misconceptions here.
>
> Pinax isn't a "fork" of Django. That would be like saying Zope is a
> "fork" of Python. It isn't a fork - one is a tool built using the
> facilities provided by the other.
>
> Django is a low level tool. It provides the essentials to route HTTP
> requests to views, and return responses. Django doesn't mandate what
> you build, or how you build it, or the right apps for the job. Django
> only specifies something when it's clearly in the interest of all (or
> at least, most) web developers to  -- thus, Django provides a Forms
> framework, a template rendering system, and a Sessions framework.
>
> However, there are many things that Django *doesn't* have an opinion
> on. For example, there are many ways to implement tagging. There are
> many tagging applications available. Depending on your circumstances,
> one implementation might be better than another. So Django doesn't
> ship with a tagging app -- it's up to end users to find a tagging app
> that meets their needs.
>
> There are some exceptions to this rule. For example, the auth
> framework isn't as good as it could be, and not every website has a
> need for comments. However, the broad principle stands -- Django isn't
> trying to provide every tool for every possible web job.
>
> Pinax, on the other hand, works at a higher level. Pinax targets a
> specific domain -- social web apps -- and as a result, they *are* in a
> position to be opinionated about the best way to do tasks like
> tagging. They haven't done this by "forking" Django. They have taken
> Django, and the wide community of available apps, and selected a
> subset of apps that complement each other, integrate well together,
> and are appropriate for their target class of websites. Pinax is more
> like a meta-packaging framework for Django apps. Every Pinax site has,
> at it's core, a completely vanilla Django install.
>
> And, to follow up on the criticism/wish -- elements of Pinax *have*
> made it back to Django. For example, the static files framework that
> will be in Django 1.3 started life as an external app, and proved
> itself to be a useful tool due, in part, to being a recommended part
> of Pinax installs.
>
> So - you really don't have to make a "Pinax or Django" decision. Any
> app that can be installed in a Django site can also be installed in a
> Pinax site, and every Pinax site is a Django site.
>
> As for the original question -- are there any drawbacks? Well, not
> really. Pinax suggests a particular collection of apps, but you can
> use any other app you want in parallel. Pinax mandates a few standards
> for project layout and the like, but for the most part, they're just
> using the best practices commonly understood by experienced members of
> the Django community, but the Django project itself hasn't gone to the
> trouble of formalizing.
>
> About the only potential downside I can see is that If you're not
> building something in Pinax's sweet spot -- i.e., a social web site --
> you won't get all the benefits that Pinax has to offer. If you're
> building something *really* different, you might find that Pinax's
> conventions obstruct you in ways that a raw Django install wouldn't.
> However, for most "websitey" websites, this won't be an issue --
> Pinax's conventions are, for the most part, a bunch of practices that
> you should probably be following anyway -- Pinax just forces/provides
> the tools to help you to follow them :-)
>
> Yours,
> Russ Magee %-)

-- 
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: jQuery UI Stylesheet

2011-01-16 Thread Gath
Fletcher,

Hope you have copied all the files that JQueryUI requires, when am
using JQueryUI, this how my directory structure looks like,
-MyProject
- media
   - css
   - images
   - js
   - themes ( specific to JQueryUI )
   - ui ( specific to JQueryUI )
- template
- app

Then my base.html;












Hope this helps ...

Gath

On Jan 17, 6:26 am, Fletcher Haynes  wrote:
> Hello,
> I'm having some trouble getting jQuery UI to work. It doesn't seem to be
> finding the CSS static file...here is my base.html and the page that
> inherits from it. It does find my style.css file fine, which is my
> non-jQuery stylesheet.
>
> http://dpaste.com/324572/
>
> I'd appreciate any 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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Total in a django template

2010-11-08 Thread Gath
Try using custom tags

Create a folder called "templatetags" in your application folder, in
there create two files
 __init__.py
 customtags.py# this will have your custom tags/filters, please
note it can be any name.

Open your customtags.py file and drop the following lines and save.

from django.template import Library

register = Library()

@register.filter
def running_total(fine_list):
return sum(d.get('fine_sum') for d in fine_list

In your template call the customtags file like this

{% load customtags %}

i guess by this time you have a list of dict that you passed from your
view lets say its called "fines"

{% for fine in fines %}
  Display your fine items inside this loop
{% endfor %}

outside the loop call the customtag like this

 {{ fines.list|running_total }} 

It works for me.

Paul.



On Nov 9, 12:09 am, Knut Ivar Nesheim  wrote:
> You need to sum the fines before you enter the templates.
>
> This can be done either in your view like this:
>     total_fines = sum([item.fine for item in items])
>
> Or you can do it in the db using the 'Sum' aggregate, 
> seehttp://docs.djangoproject.com/en/dev/ref/models/querysets/#sum
>
> Regards
> Knut
>
> On Sun, Nov 7, 2010 at 12:32 AM, Michael Sprayberry
>
>
>
>
>
>
>
>  wrote:
>
> > Hello,
> >     I am not sure if this is what you are looking for but you can use a 
> > forloop.counter (index to 1) or a forloop.counter0 (index at 0) from within 
> > the template {% for loop %}
>
> > Michael
>
> > Hi,
> > In a django template I have a for loop that display (item, fine). I
> > would like to compute the total fine value at the end of the for loop.
> > Is it possible to compute the total in the template? How can I do it
>
> > --
> > 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 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> > --
> > 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 
> > athttp://groups.google.com/group/django-users?hl=en.

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



Django in Depth

2010-10-06 Thread Gath
Guys,

Please someone out there help me with a download link of James Bennett
video on "Django in Depth" that was presented during pycon2010.

All the links am getting don't have a download link.

Thanks
Paul

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



Django regroup not working as expected

2010-10-05 Thread Gath
Guys

I have the following view in my django application

def ViewSale( request ):
salecur = Sale.objects.filter(user=2).order_by('sale_date')
return render_to_response('myapp/sale.html',{'salecur':salecur})
my template looks like this

{% regroup salecur by sale_date as sale_list %}


{% for sale_date in sale_list.list %}
{{ sale_date.grouper }}

{% for sale in sale_list %}
 {{ sale.item }} - {{ sale.qty }} 
{% endfor %}


{% endfor %}


When i render the page i get the grouper sale_date.grouper printed,
but {{ sale.item }} and {{ sale.qty }} in the inner loop shows
nothing! Blank.

What am i missing?

Gath

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



Django in Depth

2010-09-28 Thread Gath
Guys,

James Bannett the release manager for Django gave a very comprehensive
talk during Pycon2010, "Django In Depth".
 Where can i get that video for download.

Download link please.

Gath.

-- 
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: Sample Django AppEngine App

2010-07-02 Thread Gath
Won't it be nice to start first by learning Django! From my experience
Django was not build to run on top of AppEngine. There are alot of
hacks on django to make run on AppEngine that might confuse a
beginner, e.g Django was built to run on relational databases, while
AppEngine applications run on bigtables(datastore) which are not
relational. So i guess it would be nice to first understand the django
ORM before trying to map it to the AppEngine one.

But having said that, i don't mean it is impossible to write one but i
won't advice that line for a beginner.

Have a look at this
http://code.google.com/appengine/articles/django.html

Gath

On Jul 3, 12:40 am, Mak  wrote:
> I am completely new to Django. I am wondering if there is a sample
> Django AppEngine application somewhere with explanation on how it is
> setup?

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



How do i test django ratings in my project?

2010-06-24 Thread Gath
Hi,

I have installed django ratings application in my project
http://github.com/dcramer/django-ratings

Am wondering how best can i test my app voting functionality, because
django ratings is only allowing me to vote only once for the same
user, object and Ip address.
Is there a way i can disable this checks so that i can just insert
votes, test my application and when am happy i can enable this checks
back.

e.g. you can only run this once in the same machine;

myobject.rating.add(score=1, user='user_name', ip_address='127.0.0.1')

Again the user need to have been authenticated, unless you use None,
but again only once.

Paul

-- 
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: How to copy project folder from one folder location to another

2010-05-11 Thread Gath
Sorry, i fixed it! it was a case of wrong PYTHONPATH.

Thanks.

On May 10, 5:21 pm, Gath  wrote:
> Am using eclipse+pydev to build my django apps. I created a new
> workspace, built a new pydev project then created an empty folder in
> the new pydev project. In that empty folder i imported my old django
> application. Eclipse copied all the files & folders from my old django
> location to the new workspace.
>
> I made the necessary changes in the settings.py on my new location,
> pointed the templates & data location to my new location workspace
> folder.
>
> But when i run manage.py runserver from the new location workspace
> folder, django seems to point to my old folder location. All the html
> templates seems to point to the old location.
>
> How can i make django execute stuff in my new location?
>
> What am i missing?
>
> ** When i run the server inside eclipse, everything seems to be OK!
> funny.
>
> --
> 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 
> athttp://groups.google.com/group/django-users?hl=en.

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



How to copy project folder from one folder location to another

2010-05-10 Thread Gath
Am using eclipse+pydev to build my django apps. I created a new
workspace, built a new pydev project then created an empty folder in
the new pydev project. In that empty folder i imported my old django
application. Eclipse copied all the files & folders from my old django
location to the new workspace.

I made the necessary changes in the settings.py on my new location,
pointed the templates & data location to my new location workspace
folder.

But when i run manage.py runserver from the new location workspace
folder, django seems to point to my old folder location. All the html
templates seems to point to the old location.

How can i make django execute stuff in my new location?

What am i missing?

** When i run the server inside eclipse, everything seems to be OK!
funny.

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



Coltrane application not appearing on the admin index page

2009-08-26 Thread Gath

Guys,

Am going through the practical django book and am trying the weblog
application in Chapter 4, but when i go to test the application on my
cms application (that i created from the same book, from Chapter 2 &
3) "coltrane" application does not appear on the admin index page as
the book suggest.

This is my INSTALLED_APPS in the settings.py in the cms application;

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.flatpages',
'cms.search',
'coltrane',
)

My admin.py file in the coltrane application looks like this;

from django.contrib import admin
from coltrane.models import Category

class CategoryAdmin(admin.ModelAdmin):
pass

admin.site.register(Category, CategoryAdmin)

Please note when i run the syncdb, the tables are created properly.

Am using Django 1.1
Python 2.6
Windows Vista.

What am i missing out.

Gath
--~--~-~--~~~---~--~~
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: Time & Date calculation in template

2009-05-13 Thread Gath

I use javascript to do this sort of thing eg.

in your template call javascript function eg.


  result = yearsBeforeToday('{{ model.date|date:"Y-m-d H:i:s" }}');


yearsBeforeToday is javascript function, does all the calculation for
your date.
model.date is the date value you are getting from the view that's
calling the template.

gath

On May 13, 9:47 pm, Michael Radziej  wrote:
> On Wed, May 13, Joshua Partogi wrote:
> > Dear all,
>
> > Is it possible to do time and or date calculation in the template?
>
> > Let's say I have a DateField {% now %}  and want to subtract it with an
> > IntegerField (let's say 4, to get 4 years before today) in the template. If
> > it's possible, what is the syntax for it?
>
> There's no simple way. You could write an template tag or filter.
>
> http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howt...
>
> Or you could do the calculation in the view and put it into the context.
>
> Michael
--~--~-~--~~~---~--~~
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: What debugger do you use?

2009-05-12 Thread Gath

I use pyDev for eclipse, i think its the best debugger for Python/
Django.

Gath

On May 12, 10:52 pm, "ristretto.rb"  wrote:
> I second that!  WingIDE is aweome.
>
> I'm using NB with xdebug for PHP with one client, and WingIDE Pro
> (which gladly paid for)
> for python.
>
> I can say, for certain, that I would choose Wing over NB if I had to
> choose one.
>
> Gene Campbell
>
> On May 13, 1:54 am, James Matthews  wrote:
>
> > I use WingIde and love it!
>
> > On Mon, May 11, 2009 at 3:53 PM, Joshua Russo 
> > wrote:
>
> > > I'm currently using Netbeans 6.5 with the Python plugin. I was just
> > > wondering what everyone else is using because NB is a bit buggy with
> > > the Python plugin at the moment.
>
> > --
>
> >http://www.jewelerslounge.com
--~--~-~--~~~---~--~~
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: New site: www.portaltotheuniverse.org

2009-04-24 Thread Gath

This is i darn so coo l!!!
Man you guys are killing me with this stuff...
This is such a coincidence;
- Am i django developer - i love it
- and am a fanatic of Astronomy... so i get to learn both topics which
are so dear to my heart, all in ONE portal

i have no words ... thanks.

Gath

On Apr 23, 5:07 pm, larsholm  wrote:
> Not at all :-)
>
> For the site we use:
> feedparser (nearly obviously for the feed parsing - it's unbeatable)
> beautifulsoup
> django-command-extensions
> django-batchadmin (which I'm very happy to see makes it into Django
> 1.1)
> django-mptt (for our menu system)
> djangodblog
> PIL
> threadpool
> SSLMiddleware
>
> For deployment we're using a combination of Paver (with some of our
> own add-ons), Fabric and virtualenv - all of it works really well
> together and makes deployment so much easier.
>
> Besides that we have a growing common code base for all our sites,
> that contains all the base components you just need in a site (menus +
> breadcrumbs generation, a more flexible flatpages app with TinyMCE
> editor, searching etc). Most of our code base, I'd like to release as
> open source, but it's quite a big task for the initial stuff we did,
> which is basically where it gets stuck. The new applications we are
> doing, we have much greater focus on making them open source, so
> hopefully you should see small apps coming from us in a not so distant
> future (ESO is after all funded with tax money ;-).
>
> Cheers,
> Lars
>
> On Apr 23, 3:34 pm, Zain Memon  wrote:
>
> > Cool! Mind sharing the names of any open source django apps you used?
>
> > On Thu, Apr 23, 2009 at 6:09 AM, larsholm  wrote:
>
> > > Dear all,
>
> > > Allow me to advertise for our new Django based site:
> > >http://www.portaltotheuniverse.org
>
> > > Keeping up-to-date with cutting-edge astronomy and space science
> > > breakthroughs has just become that much easier, thanks to the Portal
> > > To The Universe, the latest Cornerstone project of the International
> > > Year of Astronomy 2009 (IYA2009).
>
> > > On the tech side it basically boils down to a content-specific feed
> > > aggregator with a number of important add-ons:
> > > - human moderation to feature high quality content.
> > > - embargoed press releases for journalists with login (works in much
> > > the same way as when journalists can be invited to watch new movies a
> > > day before everybody else).
> > > - the RSS crawler is fast and updated very often to keep up-to-date
> > > with the news development during the day.
>
> > > This is our third major Django-based website we have done here at ESO
> > > - European Southern Observatory (located in Munich, Germany), and we
> > > naturally have more websites with astronomy content in the pipeline.
>
> > > Thanks for viewing!
>
> > > Lars Holm Nielsen 
> > > ESO - European Southern Observatory
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How to use JSON on my application

2009-04-19 Thread Gath

All,

Is there a comprehensive example of how to use JSON on my view and
javascript on my html template?
The scenario is, i want to get some data from a input text field in
the template  and onChange of that field, i call a javascript function
that sends data via json to my view, which process the data and sends
the results back to the calling javascript for display!

I've seen this example in this

http://groups.google.com/group/django-users/browse_thread/thread/b433bac860cad18a/c0672cd8b1043f7c?lnk=gst&q=JsonResponse#c0672cd8b1043f7c

it uses JQuery but it refused to run "as is" on my view!

Please help

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



JQuery Autocomplete in Django Not Working

2009-04-08 Thread Gath


Guys,

I have the following code from some example i got from
here: 
http://lethain.com/entry/2007/dec/01/using-jquery-django-autocomplete-fields,

but its not working on my django application.

On my templete i have this function:

$(function(){ setAutoComplete("tags", "tagResults", "/taglookup/?
query="); });

and on my urls i have the following line

(r'^taglookup/$', 'twine.twineapp.views.tag_lookup'),

and my view looks like this:

def tag_lookup(request):
# Default return list
results = []
if request.method == "GET":
if request.GET.has_key(u'query'):
value = request.GET[u'query']
# Ignore queries shorter than length 3
if len(value) > 2:
#model_results = Book.objects.filter
(name__icontains=value)
TaggedItem = Tag.objects.get_by_model(Question,
Tag.objects.filter(name__in=[value]))
results = [ x.name for x in TaggedItem]
json = simplejson.dumps(results)
return HttpResponse(json, mimetype='application/json')

When i try to type anything on my "tags" field in the template,
firebug gives me the following error;

GET http://127.0.0.1:8000/taglookup/?query=test 404 NOT FOUND
JQuery-1.3.2.js (line 3633)

Any ideas where am goofing?

Gath

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



How do i use dojo in my Django application

2009-04-02 Thread Gath

All,

I have downloaded Dojo 1.3, i want to start sampling some examples  in
the Dojo website using Django, where do i place the package? How do i
call it in my template?

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



Django wont display images on my CSS file

2009-03-27 Thread Gath

Guys,

Am having a problem in displaying images in my CSS file.

I have a css file with the following class

.header
{
 margin-left: auto;
 bla bla
 bla bla
 ...
background: url(/site_media/header_background.gif) no-repeat top left;
}

When i execute the template with this css, no image is displayed!
But when i directly inject the background style on my template it
works perfect.

What am i not doing right!

Gath



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



Django and WMD editor

2009-01-26 Thread Gath

Good people!

How can i hook up WMD editor on my django form?

http://wmd-editor.com

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



Where can i get a wiki formatting widget?

2009-01-24 Thread Gath

Guys

Where can i get a wiki formatting widget for django?

I have enough notes fields in my models and i would want a nice wiki
widget for entering data!

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



How do i display a count of items related to a model?

2009-01-22 Thread Gath

In Django how can i return the total number of items (count) that a
related to another model, e.g the way stackoverflow.com does a list of
questions then on the side it shows the count on the answers related
to that question.

This is easy if i get the questionid, i can return all answers related
to that question but when am displaying the entire list of question it
becomes a bit tricky to display on the side the count showing the
total answer count.

I don't know if am clear but just think how www.stackoverflow.com
displays its questions with answer,views count next to each question!

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



Recommendation on understanding CSS

2009-01-21 Thread Gath

Guys,

Its seems the best way to do templates in Django is via plain html and
css, but am having a problem in understanding css easily, can someone
recommend some nice material/site on css i can read, i mean step by
step till complex stuff.

Paul


--~--~-~--~~~---~--~~
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: Empty object list!!!

2009-01-16 Thread Gath

Very strange,

this object list seems to be depended to the Paginator module, i have
this line on my imports

from django.core.paginator import Paginator, InvalidPage, EmptyPage

then added this code on my view
paginator = Paginator(answer_list,5)

try:
page = int(request.GET.get('page', '1'))
except ValueError:
page = 1
try:
ans_page = paginator.page(page)
except (EmptyPage, InvalidPage):
ans_page = paginator.page(paginator.num_pages)

and now instead of sending the answer_list on the rendered html, am
now sending ans_page return

render_to_response('twineapp/post_answer2.html',
{'questobj':quest_obj,'answerobj':pub_page,'form':form})

if now i read my answerobj.object_list from the template, the list has
items! strange!

{% regroup answerobj.object_list by answer as ans_list %}{{ ans_list|
length }}

Please someone explain to me  the relationship btw Paginator and my
models...

Thanks all

Paul

On Jan 16, 7:45 pm, Gath  wrote:
> Roseman,
>
> Even after removing the attribute object_list, the answerobj still
> does not return any length.
>
> Am still very stuck!
>
> Paul
>
> On Jan 16, 5:35 pm, Daniel Roseman 
> wrote:
>
> > On Jan 16, 12:45 pm, Gath  wrote:
>
> > > Guys,
>
> > > I might be lazy or am blind! but the following code is returning ZERO!
> > > items, while very well i know there is some items in the list,
>
> > > View:
> > > def post_answer(request, quest_id=None):
> > >     answer_list = Answer.objects.filter
> > > (questionis__pk=quest_id).select_related()
> > >     ...
> > >     # if a put a print stmt here ( answer_list[0].answer ) there is
> > > data from the console!!
>
> > >     return render_to_response('myapp/post_answer.html',
> > > {'answerobj':answer_list }} )
>
> > > Template post_answer.html:
>
> > > {% regroup answerobj.object_list by answer as ans_list %}{{ ans_list|
> > > length }}
> > > 
>
> > > the above code prints 0.
>
> > > I must be goofing somewhere, pls assist
>
> > > Paul
>
> > Where is the 'object_list' attribute of answerobj coming from? As far
> > as I can see, answerobj is a queryset, and doesn't have any such
> > attribute. Since templates don't give an error when accessing non-
> > existent attributes, it's probably just passing None into the regroup
> > tag, so of course the length is 0.
> > --
> > DR.
--~--~-~--~~~---~--~~
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: Empty object list!!!

2009-01-16 Thread Gath

Roseman,

Even after removing the attribute object_list, the answerobj still
does not return any length.

Am still very stuck!

Paul

On Jan 16, 5:35 pm, Daniel Roseman 
wrote:
> On Jan 16, 12:45 pm, Gath  wrote:
>
>
>
> > Guys,
>
> > I might be lazy or am blind! but the following code is returning ZERO!
> > items, while very well i know there is some items in the list,
>
> > View:
> > def post_answer(request, quest_id=None):
> >     answer_list = Answer.objects.filter
> > (questionis__pk=quest_id).select_related()
> >     ...
> >     # if a put a print stmt here ( answer_list[0].answer ) there is
> > data from the console!!
>
> >     return render_to_response('myapp/post_answer.html',
> > {'answerobj':answer_list }} )
>
> > Template post_answer.html:
>
> > {% regroup answerobj.object_list by answer as ans_list %}{{ ans_list|
> > length }}
> > 
>
> > the above code prints 0.
>
> > I must be goofing somewhere, pls assist
>
> > Paul
>
> Where is the 'object_list' attribute of answerobj coming from? As far
> as I can see, answerobj is a queryset, and doesn't have any such
> attribute. Since templates don't give an error when accessing non-
> existent attributes, it's probably just passing None into the regroup
> tag, so of course the length is 0.
> --
> DR.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Empty object list!!!

2009-01-16 Thread Gath

Guys,

I might be lazy or am blind! but the following code is returning ZERO!
items, while very well i know there is some items in the list,

View:
def post_answer(request, quest_id=None):
answer_list = Answer.objects.filter
(questionis__pk=quest_id).select_related()
...
# if a put a print stmt here ( answer_list[0].answer ) there is
data from the console!!

return render_to_response('myapp/post_answer.html',
{'answerobj':answer_list }} )

Template post_answer.html:

{% regroup answerobj.object_list by answer as ans_list %}{{ ans_list|
length }}


the above code prints 0.

I must be goofing somewhere, pls assist

Paul


--~--~-~--~~~---~--~~
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: Instance Error when saving my form!!

2009-01-16 Thread Gath

Great Malcolm, it was supposed to be questionid_id! solved. But i
wonder why for userid am not doing userid_id???, userid works well !!!
hmm

Paul

On Jan 16, 2:19 pm, Gath  wrote:
> Guys
> Am getting the following error message when try to save on my form:
>
> Cannot assign "U'1'": "Answer.Questionid" must be "Question" instance
>
> On my Answer Model questionid is Foreign field to the Question model
> defined as follows,
>
> Class Answer(models.Model):
> answer=models.ForeignKey(Question, editable=False)
>
>
> On my view;
>
> Post_answer(request, quest_id=None):
> ...
>
> form = AnswerForm(request.POST)
> if form.is_valid():
>   answer = form.save(False)
>   answer.userid = request.user
>   answer.questionid = quest_id
>   answer.save()
>   return HttpResponse("Answer added Successfully)
> else:
>   form = AnswerForm()
> return render_to_response('myapp/post_answer.html',{'form':form,
> 'answerobj':answer_list,'questobj':quest_obj})
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Instance Error when saving my form!!

2009-01-16 Thread Gath

Guys
Am getting the following error message when try to save on my form:

Cannot assign "U'1'": "Answer.Questionid" must be "Question" instance

On my Answer Model questionid is Foreign field to the Question model
defined as follows,

Class Answer(models.Model):
answer=models.ForeignKey(Question, editable=False)
   

On my view;

Post_answer(request, quest_id=None):
...

form = AnswerForm(request.POST)
if form.is_valid():
  answer = form.save(False)
  answer.userid = request.user
  answer.questionid = quest_id
  answer.save()
  return HttpResponse("Answer added Successfully)
else:
  form = AnswerForm()
return render_to_response('myapp/post_answer.html',{'form':form,
'answerobj':answer_list,'questobj':quest_obj})


--~--~-~--~~~---~--~~
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: How do i combine a list and a form in the same page using django?

2009-01-16 Thread Gath

Yep!

I've done what Malcolm has suggested, removed everything and added one
section at a time, and i guess its behaving. The problem seems to lie
with a "extends" tag and a css am using.

Thanks guys.

On Jan 16, 12:10 pm, Gath  wrote:
> Am building a Q&A page, sort of stackoverflow.com kinda page! Am
> having a bit of a problem trying to render the form. Am pasing 3
> objects to the template that renders the page i.e. Question object,
> Answers related to the question and Answer form object.
>
> In the first part of the page i want to display the Question, then the
> answers list related to the question follows, then at the bottom of
> the page i display my form to enter the new answer.
>
> On my template when i use the {{ extends "base_site.html" }} tag,
> then only the form get rendered without the first part of questions,
> When i remove that tag then only the Question section get displayed
> minus the form!!
>
> How can i go round this problem?
>
> this my template;
>
> {% extends "base_site.html" %}
>
> {% block title %}{% endblock %}
>
> 
>
>
> 
>
> 
>
> 
>
> 
>  {{ questobj.question }}
> 
>
> 
>  {{ questobj.notes }}
> 
>
> {% regroup answerobj.object_list by answer as ans_list %}{{ ans_list|
> length }} -->
>
> {% for answers in answerobj.object_list %}
> {{ answers.answer 
> }}
> posted on:{{ answers.post_date 
> }} font>
> by: href="/user_profile/">{{answers.userid}}
> 
>
>{% endfor %}
>
> 
>   
>  
>
> 
>
>   
>
>
>
>  {{ form.as_table }}
>
>
>
>
>
>
>
>   
>
>   
>
> 
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How do i combine a list and a form in the same page using django?

2009-01-16 Thread Gath

Am building a Q&A page, sort of stackoverflow.com kinda page! Am
having a bit of a problem trying to render the form. Am pasing 3
objects to the template that renders the page i.e. Question object,
Answers related to the question and Answer form object.

In the first part of the page i want to display the Question, then the
answers list related to the question follows, then at the bottom of
the page i display my form to enter the new answer.

On my template when i use the {{ extends "base_site.html" }} tag,
then only the form get rendered without the first part of questions,
When i remove that tag then only the Question section get displayed
minus the form!!

How can i go round this problem?

this my template;

{% extends "base_site.html" %}

{% block title %}{% endblock %}












 {{ questobj.question }}



 {{ questobj.notes }}



{% regroup answerobj.object_list by answer as ans_list %}{{ ans_list|
length }} -->


{% for answers in answerobj.object_list %}
{{ answers.answer 
}}
posted on:{{ answers.post_date }}
by:{{answers.userid}}


   {% endfor %}


  
 




  


   

 {{ form.as_table }}

   

   

   

  

  



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



Using admin CSS in my project

2008-11-05 Thread Gath

All,

Am new in django, but am just wondering if i wanted to make use of the
nice css files in the admin site in my local project how would i do
that?

Am able to point the media url on my settings.py to the correct admin
css folder, and actually my project is able to pick the css styles,
but what i would want to is to know how many styles are there and
where i can use them in the project, currently am just doing alot of
guess work to pick a css file to use in my forms. Is there a tutorial
on this?

Paul


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