Re: template rendering progress

2012-09-20 Thread Jani Tiainen

19.9.2012 16:13, Philippe Raoult kirjoitti:

Hello all,

I'm using django templates to generate pdf listings in my app. After
running render() on the template, reportlab is called to create the pdf.

My issue is that those listings can get quite big (hundreds of pages,
with images) and thus take very long to render. Reportlab has progress
callbacks that allow me to have a nice progress bar on screen, but the
template rendering doesn't seem to offer this functionality. Has anyone
managed to implement this or has any suggestion regarding this topic ?

Regards,
Philippe

--
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/-/kc5IlCznZ1wJ.
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 need to push your rendering task as "external" job. Celery is very 
good at it and it does integrate with Django very well.


Basic idea is that you have view that starts the task and returns you 
the progress view that is either refreshed by using meta-tag or quite 
common ajax-approach to poll a view that returns progress value. And of 
course some view to actually fetch the result.


But there is nothing in template engine that can offer this kind of 
features since it's property of HTTP protocol and how request/response 
cycle goes.


--
Jani Tiainen

- Well planned is half done and a half done has been sufficient before...

--
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: GeoDjango and shapefiles

2012-09-20 Thread Jani Tiainen

20.9.2012 17:36, Coulson Thabo Kgathi kirjoitti:

Hi guys i want to use geodjango for an application that gives map
locations but offline using shapefiles and geodjango, any information
that i can be refered to would be appreciated. I dont want to use google
maps because its wil be used offline

thank you

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


There is actually more than one way to do this. And without further 
knowledge what you're trying to show and where it's hard to give more 
details.


For example generating maps with shapefiles there is far better 
solutions than GeoDjango (GeoDjango is great for querying spatially and 
modifying data) like Mapnik or Mapserver on serverside. On client side 
there is practically only one really working solution - Openlayers.



--
Jani Tiainen

- Well planned is half done and a half done has been sufficient before...

--
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 to extend the TextField in Django?

2012-09-20 Thread Scarl
Thanks Lachlan !
在 2012年9月21日星期五UTC+8上午10时19分44秒,Scarl写道:
>
>
> 
>
> I want to extend the textfield like this, could anyone help me? thx!
>
>

-- 
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/-/r7-GcIsvhosJ.
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 to extend the TextField in Django?

2012-09-20 Thread Lachlan Musicman
What you are looking for is called a WYSIWYG editor widget - there are a
couple of extentions/plugins lying around:

http://djangosnippets.org/snippets/1705/
or
http://blog.bixly.com/post/22376374604/django-tinymce-a-wysiwyg-editor-for-django
or
https://github.com/pydanny/django-wysiwyg/
or
http://www.djangopackages.com/grids/g/wysiwyg/

Cheers
L.


On Fri, Sep 21, 2012 at 2:19 PM, Scarl  wrote:

>
> 
>
> I want to extend the textfield like this, could anyone help me? thx!
>
>  --
> 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/-/JqQJ8v6SH88J.
> 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.
>



-- 
...we look at the present day through a rear-view mirror. This is something
Marshall McLuhan said back in the Sixties, when the world was in the grip
of authentic-seeming future narratives. He said, “We look at the present
through a rear-view mirror. We march backwards into the future.”

http://www.warrenellis.com/?p=14314

-- 
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 extend the TextField in Django?

2012-09-20 Thread Scarl




I want to extend the textfield like this, could anyone help me? thx!

-- 
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/-/JqQJ8v6SH88J.
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: Strange rendering behaviour in template/user/auth

2012-09-20 Thread Lachlan Musicman
On Fri, Sep 21, 2012 at 11:18 AM, hevok  wrote:
> Hiya L,
> Your are welcome!
>
> It is not obvious from the tutorial, but RequestContext as its name suggests
> also passes the request context to the template. The context_instance uses
> the auth middleware context processor and provides the user in the view. You
> could also refer to `{{ request.user }}` in the template, but I wouldn't
> recommend it. RequestContext automatically populates everything for you with
> nice variable names.

Yeah, I was just thinking about how I can know enough about Django to
articulate my problem, but not to solve it.

Turns out that the important documentation in this regard is not filed
under R but under D (for django.template.RequestContext):

/path/django-docs-1.4-en/ref/templates/api.html#django.template.RequestContext

And the really important documentation is in the "note".

There's no denying documentation is hard, that Django has excellent
documentation and that making the tutorial (which is fantastic) simple
enough for new users but covering enough ground to get someone started
is a delicate balancing act.

I feel like this needs to be better placed, or to have better
examples. Or maybe that's exactly what the list/IRC is for :)

Cheers
L.


>
> Cheers,
> Hevok
>
>
>
> On Friday, September 21, 2012 12:50:13 AM UTC+2, Lachlan Musicman wrote:
>>
>> On Fri, Sep 21, 2012 at 10:29 AM, hevok  wrote:
>> > Hola Lachlan,
>> > Are you passing the `context_instance=RequestContext(request)` to all
>> > templates? It should provide the user tag.
>>
>> Hi Hevok,
>>
>> Thanks for the reply.
>>
>> I did attempt to merely pass the request:
>>
>> @login_required
>> def index(request):
>> """
>> If users are authenticated, direct them to the main page.
>> Otherwise take them to the login page.
>> """
>> daily_sessions = []
>>
>> for session in range(4):
>> daily_sessions.append([])
>> daily_sessions[session] =
>> Session.objects.filter(date=today).filter(session_number=session)
>>
>> return
>> render_to_response('tafe/timetable_today_detail.html',{'daily_sessions':daily_sessions,
>> 'request':request})
>>
>> but that didn't work.
>>
>> I pass the RequestContext(request) for the forms I wrote to satisfy
>> CSRF stuff - I guess I just add something similar?
>>
>> ...OK, I just added exactly the same as for the CSRF and it worked -
>> thanks Hevok!
>>
>> cheers
>> L.
>>
>>
>>
>> >
>> > Bests,
>> > Hevok
>> >
>> >
>> > On Friday, September 21, 2012 12:20:04 AM UTC+2, Lachlan Musicman wrote:
>> >>
>> >> Hola,
>> >>
>> >> I've noticed for a while that my home/index page wasn't registering
>> >> the {{ user }} tag when rendering the page: there was no "Welcome
>> >> Username. Change password / Log out" in the top right corner, and the
>> >> link to the admin interface that I'd put in the breadcrumbs for logged
>> >> in users wouldn't appear.
>> >>
>> >> But that was the only page - every other page showed it fine - so I
>> >> wasn't too concerned, and gave it a low priority to fix it.
>> >>
>> >> FWIW the whole site requires authentication (checked and confirmed in
>> >> another browser) - so Django knew I was auth'd - it just chose to
>> >> ignore some of the base.html
>> >>
>> >> Yesterday I added some thematic changes - a little js and css, plonked
>> >> it in path/project/app/static/{js|css} as advised in docs and added
>> >> them to the base template with {{ STATIC_URL }}.
>> >>
>> >> Suddenly the lack of auth recognition on some pages (turns out it was
>> >> more than one) is noticeable, because the graceful degrading of the
>> >> js/css is appalling enough to make it stick out. In particular, when I
>> >> "inspected element" I saw that the {{ STATIC_URL }} wasn't being
>> >> expanded - the resources were failing on bad paths.
>> >>
>> >> I've tracked everything down that could be the problem - I've
>> >> confirmed half a dozen times that the pages in question are extending
>> >> the correct base_site.html, which is extending the correct base.html,
>> >> I even tried sending the request context in render_to_response with no
>> >> luck.
>> >>
>> >> It was only this morning while doing some triage that I realised that
>> >> the pages without proper auth (no details in top right corner) where
>> >> also the ones with the wonky templating.
>> >>
>> >> Any clues on what I'm doing wrong or new ways to track down where the
>> >> mistake is?
>> >>
>> >> Cheers
>> >> L.
>> >>
>> >>
>> >>
>> >> --
>> >> ...we look at the present day through a rear-view mirror. This is
>> >> something Marshall McLuhan said back in the Sixties, when the world
>> >> was in the grip of authentic-seeming future narratives. He said, “We
>> >> look at the present through a rear-view mirror. We march backwards
>> >> into the future.”
>> >>
>> >> http://www.warrenellis.com/?p=14314
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > 

Re: My "Contributors" page Conundrum

2012-09-20 Thread Thomas Lockhart

On 9/20/12 5:28 PM, JJ Zolper wrote:

Anyone have any ideas?

Yes, Melvyn did.

hth

  - Tom



Thanks!

JJ Zolper

On Tuesday, August 28, 2012 2:24:03 AM UTC-4, Melvyn Sopacua wrote:

On 28-8-2012 6:58, JJ Zolper wrote:

> My problem is that I want each contributor to have their own
separate page.
> So if the first guys name for some example is Mike Smith then if
you were
> to click his name for example you would be sent to
> /about/contributor/mikesmith and so on.


>

and make sure you read the permalink bit.
-- 
Melvyn Sopacua


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

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: My "Contributors" page Conundrum

2012-09-20 Thread JJ Zolper
Anyone have any ideas?

Thanks!

JJ Zolper

On Tuesday, August 28, 2012 2:24:03 AM UTC-4, Melvyn Sopacua wrote:
>
> On 28-8-2012 6:58, JJ Zolper wrote: 
>
> > My problem is that I want each contributor to have their own separate 
> page. 
> > So if the first guys name for some example is Mike Smith then if you 
> were 
> > to click his name for example you would be sent to 
> > /about/contributor/mikesmith and so on. 
>
> <
> https://docs.djangoproject.com/en/1.4/ref/models/instances/#django.db.models.Model.get_absolute_url>
>  
>
> and make sure you read the permalink bit. 
> -- 
> Melvyn Sopacua 
>

-- 
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/-/uFK1RTmzm5MJ.
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 Unobtrusive Ajax

2012-09-20 Thread Russell Keith-Magee
On Fri, Sep 21, 2012 at 1:10 AM, Kurt Pruhs  wrote:
> @Russell
> I understand what you are saying, as far as making AJAX a part of Django's
> core. It's a server-side framework. On the other hand, I was just in D.C.
> for DjangoCon and listened to Adrian Holovaty talk about making Django
> deliver real-time content. Did I misunderstand what he was saying? As far as
> I know, a JavaScript solution is the most viable for delivering real-time
> content to browsers. Is there another way to do this? Just curious what your
> thoughts are.

Put it this way - the question you need to answer is:

"Could I implement this externally, without making any changes to
Django's core?"

In the case of AJAX, the answer is definitely yes. You can write an
AJAX-compatible Django view entirely in user space. It requires no
modifications to Django itself. If someone wants to write a killer
AJAX library for Django, they should do so -- there's no reason it
needs to be baked into Django's core.

In the case of Real-time, the answer is maybe. Serving real-time data
will probably require some modifications to core -- the mechanisms
used to serve real-time data are different to traditional 'static
page' mechanisms. So yes, if we want to provide a solution for
real-time, it will probably mean making some changes to core. And,
since real-time data needs a front-end component, this may mean
including a front-end component.

That said, my overwhelming preference would be to follow up on Geoff
Schmidt's DjangoCon suggestion and concentrate on formalising a data
layer protocol for this sort of thing. This way, Django can maintain
it's server-side focus, and let those with a client-side focus
concentrate on their specialties. However, pragmatism may dictate that
this isn't possible - at least, not initially - because as Geoff
indicated, the protocol doesn't actually exist yet.

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: Strange rendering behaviour in template/user/auth

2012-09-20 Thread hevok
Hiya L,
Your are welcome!

It is not obvious from the tutorial, but RequestContext as its name 
suggests also passes the request context to the template. The 
context_instance uses the auth middleware context processor and provides 
the user in the view. You could also refer to `{{ request.user }}` in the 
template, but I wouldn't recommend it. RequestContext automatically 
populates everything for you with nice variable names.

Cheers,
Hevok



On Friday, September 21, 2012 12:50:13 AM UTC+2, Lachlan Musicman wrote:
>
> On Fri, Sep 21, 2012 at 10:29 AM, hevok  
> wrote: 
> > Hola Lachlan, 
> > Are you passing the `context_instance=RequestContext(request)` to all 
> > templates? It should provide the user tag. 
>
> Hi Hevok, 
>
> Thanks for the reply. 
>
> I did attempt to merely pass the request: 
>
> @login_required 
> def index(request): 
> """ 
> If users are authenticated, direct them to the main page. 
> Otherwise take them to the login page. 
> """ 
> daily_sessions = [] 
>
> for session in range(4): 
> daily_sessions.append([]) 
> daily_sessions[session] = 
> Session.objects.filter(date=today).filter(session_number=session) 
>
> return 
> render_to_response('tafe/timetable_today_detail.html',{'daily_sessions':daily_sessions,
>  
>
> 'request':request}) 
>
> but that didn't work. 
>
> I pass the RequestContext(request) for the forms I wrote to satisfy 
> CSRF stuff - I guess I just add something similar? 
>
> ...OK, I just added exactly the same as for the CSRF and it worked - 
> thanks Hevok! 
>
> cheers 
> L. 
>
>
>
> > 
> > Bests, 
> > Hevok 
> > 
> > 
> > On Friday, September 21, 2012 12:20:04 AM UTC+2, Lachlan Musicman wrote: 
> >> 
> >> Hola, 
> >> 
> >> I've noticed for a while that my home/index page wasn't registering 
> >> the {{ user }} tag when rendering the page: there was no "Welcome 
> >> Username. Change password / Log out" in the top right corner, and the 
> >> link to the admin interface that I'd put in the breadcrumbs for logged 
> >> in users wouldn't appear. 
> >> 
> >> But that was the only page - every other page showed it fine - so I 
> >> wasn't too concerned, and gave it a low priority to fix it. 
> >> 
> >> FWIW the whole site requires authentication (checked and confirmed in 
> >> another browser) - so Django knew I was auth'd - it just chose to 
> >> ignore some of the base.html 
> >> 
> >> Yesterday I added some thematic changes - a little js and css, plonked 
> >> it in path/project/app/static/{js|css} as advised in docs and added 
> >> them to the base template with {{ STATIC_URL }}. 
> >> 
> >> Suddenly the lack of auth recognition on some pages (turns out it was 
> >> more than one) is noticeable, because the graceful degrading of the 
> >> js/css is appalling enough to make it stick out. In particular, when I 
> >> "inspected element" I saw that the {{ STATIC_URL }} wasn't being 
> >> expanded - the resources were failing on bad paths. 
> >> 
> >> I've tracked everything down that could be the problem - I've 
> >> confirmed half a dozen times that the pages in question are extending 
> >> the correct base_site.html, which is extending the correct base.html, 
> >> I even tried sending the request context in render_to_response with no 
> >> luck. 
> >> 
> >> It was only this morning while doing some triage that I realised that 
> >> the pages without proper auth (no details in top right corner) where 
> >> also the ones with the wonky templating. 
> >> 
> >> Any clues on what I'm doing wrong or new ways to track down where the 
> >> mistake is? 
> >> 
> >> Cheers 
> >> L. 
> >> 
> >> 
> >> 
> >> -- 
> >> ...we look at the present day through a rear-view mirror. This is 
> >> something Marshall McLuhan said back in the Sixties, when the world 
> >> was in the grip of authentic-seeming future narratives. He said, “We 
> >> look at the present through a rear-view mirror. We march backwards 
> >> into the future.” 
> >> 
> >> http://www.warrenellis.com/?p=14314 
> > 
> > -- 
> > 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/-/uYEguNGN3CsJ. 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > django-users...@googlegroups.com . 
> > For more options, visit this group at 
> > http://groups.google.com/group/django-users?hl=en. 
>
>
>
> -- 
> ...we look at the present day through a rear-view mirror. This is 
> something Marshall McLuhan said back in the Sixties, when the world 
> was in the grip of authentic-seeming future narratives. He said, “We 
> look at the present through a rear-view mirror. We march backwards 
> into the future.” 
>
> http://www.warrenellis.com/?p=14314 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To 

Re: Strange rendering behaviour in template/user/auth

2012-09-20 Thread Lachlan Musicman
On Fri, Sep 21, 2012 at 10:29 AM, hevok  wrote:
> Hola Lachlan,
> Are you passing the `context_instance=RequestContext(request)` to all
> templates? It should provide the user tag.

Hi Hevok,

Thanks for the reply.

I did attempt to merely pass the request:

@login_required
def index(request):
"""
If users are authenticated, direct them to the main page.
Otherwise take them to the login page.
"""
daily_sessions = []

for session in range(4):
daily_sessions.append([])
daily_sessions[session] =
Session.objects.filter(date=today).filter(session_number=session)

return 
render_to_response('tafe/timetable_today_detail.html',{'daily_sessions':daily_sessions,
'request':request})

but that didn't work.

I pass the RequestContext(request) for the forms I wrote to satisfy
CSRF stuff - I guess I just add something similar?

...OK, I just added exactly the same as for the CSRF and it worked -
thanks Hevok!

cheers
L.



>
> Bests,
> Hevok
>
>
> On Friday, September 21, 2012 12:20:04 AM UTC+2, Lachlan Musicman wrote:
>>
>> Hola,
>>
>> I've noticed for a while that my home/index page wasn't registering
>> the {{ user }} tag when rendering the page: there was no "Welcome
>> Username. Change password / Log out" in the top right corner, and the
>> link to the admin interface that I'd put in the breadcrumbs for logged
>> in users wouldn't appear.
>>
>> But that was the only page - every other page showed it fine - so I
>> wasn't too concerned, and gave it a low priority to fix it.
>>
>> FWIW the whole site requires authentication (checked and confirmed in
>> another browser) - so Django knew I was auth'd - it just chose to
>> ignore some of the base.html
>>
>> Yesterday I added some thematic changes - a little js and css, plonked
>> it in path/project/app/static/{js|css} as advised in docs and added
>> them to the base template with {{ STATIC_URL }}.
>>
>> Suddenly the lack of auth recognition on some pages (turns out it was
>> more than one) is noticeable, because the graceful degrading of the
>> js/css is appalling enough to make it stick out. In particular, when I
>> "inspected element" I saw that the {{ STATIC_URL }} wasn't being
>> expanded - the resources were failing on bad paths.
>>
>> I've tracked everything down that could be the problem - I've
>> confirmed half a dozen times that the pages in question are extending
>> the correct base_site.html, which is extending the correct base.html,
>> I even tried sending the request context in render_to_response with no
>> luck.
>>
>> It was only this morning while doing some triage that I realised that
>> the pages without proper auth (no details in top right corner) where
>> also the ones with the wonky templating.
>>
>> Any clues on what I'm doing wrong or new ways to track down where the
>> mistake is?
>>
>> Cheers
>> L.
>>
>>
>>
>> --
>> ...we look at the present day through a rear-view mirror. This is
>> something Marshall McLuhan said back in the Sixties, when the world
>> was in the grip of authentic-seeming future narratives. He said, “We
>> look at the present through a rear-view mirror. We march backwards
>> into the future.”
>>
>> http://www.warrenellis.com/?p=14314
>
> --
> 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/-/uYEguNGN3CsJ.
> 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.



-- 
...we look at the present day through a rear-view mirror. This is
something Marshall McLuhan said back in the Sixties, when the world
was in the grip of authentic-seeming future narratives. He said, “We
look at the present through a rear-view mirror. We march backwards
into the future.”

http://www.warrenellis.com/?p=14314

-- 
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: syncdb is not creating auth tables

2012-09-20 Thread Mario Gudelj
I worked it out. I had another settings.py file inside one of the apps
which had auth inside INSTALLED APPS and it was being imported into the
main settings file.

-m

On 21 September 2012 08:14, Mario Gudelj  wrote:

> Thanks Amyth, but that doesn't work. I delete the sqlite file that gets
> created with syncdb and i still get the same error. The new db file gets
> created with some tables in it, but no auth tables.
> On Sep 20, 2012 5:44 PM, "Amyth Arora"  wrote:
>
>> You've changed the models after the tables were initially created. Delete
>> the current database and create a new one. Then ->> syncdb.
>>
>> On Thu, Sep 20, 2012 at 1:01 PM, Mario Gudelj wrote:
>>
>>> Hi Djangoers,
>>>
>>> I'm sure I'm missing something simple but for the life of me I can not
>>> figure this out.
>>>
>>> I'm trying to syncdb and I'm getting this error:
>>>
>>> File
>>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
>>> line 337, in execute
>>> return Database.Cursor.execute(self, query, params)
>>> django.db.utils.DatabaseError: no such table: auth_permission
>>>
>>> My installed apps in settings file:
>>>
>>> INSTALLED_APPS = (
>>> 'django.contrib.auth',
>>> 'django.contrib.contenttypes',
>>> 'django.contrib.admin',
>>> 'django.contrib.sessions',
>>> 'django.contrib.sites',
>>> 'django.contrib.staticfiles',
>>> 'forms',
>>> )
>>>
>>> I've tried changing the order since the docs say that permissions depend
>>> on contenttypes but that didn't work.
>>>
>>> Tried migration using south and it creates some migrations but then it
>>> gives me the same error.
>>>
>>> I'm using sqlite3.
>>>
>>> I can see that some of the tables do get created, but no auth tables.
>>>
>>> Googled for an hour and can't find anything.
>>>
>>> Any help would be greatly appreciated!
>>>
>>> -m
>>>
>>> --
>>> 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.
>>>
>>
>>
>>
>> --
>> Thanks & Regards
>> 
>>
>> Amyth [Admin - Techstricks]
>> Email - aroras.offic...@gmail.com, ad...@techstricks.com
>> Twitter - @mytharora
>> http://techstricks.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: Strange rendering behaviour in template/user/auth

2012-09-20 Thread hevok
Hola Lachlan,
Are you passing the `context_instance=RequestContext(request)` to all 
templates? It should provide the user tag.

Bests,
Hevok

On Friday, September 21, 2012 12:20:04 AM UTC+2, Lachlan Musicman wrote:
>
> Hola, 
>
> I've noticed for a while that my home/index page wasn't registering 
> the {{ user }} tag when rendering the page: there was no "Welcome 
> Username. Change password / Log out" in the top right corner, and the 
> link to the admin interface that I'd put in the breadcrumbs for logged 
> in users wouldn't appear. 
>
> But that was the only page - every other page showed it fine - so I 
> wasn't too concerned, and gave it a low priority to fix it. 
>
> FWIW the whole site requires authentication (checked and confirmed in 
> another browser) - so Django knew I was auth'd - it just chose to 
> ignore some of the base.html 
>
> Yesterday I added some thematic changes - a little js and css, plonked 
> it in path/project/app/static/{js|css} as advised in docs and added 
> them to the base template with {{ STATIC_URL }}. 
>
> Suddenly the lack of auth recognition on some pages (turns out it was 
> more than one) is noticeable, because the graceful degrading of the 
> js/css is appalling enough to make it stick out. In particular, when I 
> "inspected element" I saw that the {{ STATIC_URL }} wasn't being 
> expanded - the resources were failing on bad paths. 
>
> I've tracked everything down that could be the problem - I've 
> confirmed half a dozen times that the pages in question are extending 
> the correct base_site.html, which is extending the correct base.html, 
> I even tried sending the request context in render_to_response with no 
> luck. 
>
> It was only this morning while doing some triage that I realised that 
> the pages without proper auth (no details in top right corner) where 
> also the ones with the wonky templating. 
>
> Any clues on what I'm doing wrong or new ways to track down where the 
> mistake is? 
>
> Cheers 
> L. 
>
>
>
> -- 
> ...we look at the present day through a rear-view mirror. This is 
> something Marshall McLuhan said back in the Sixties, when the world 
> was in the grip of authentic-seeming future narratives. He said, “We 
> look at the present through a rear-view mirror. We march backwards 
> into the future.” 
>
> http://www.warrenellis.com/?p=14314 
>

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



Strange rendering behaviour in template/user/auth

2012-09-20 Thread Lachlan Musicman
Hola,

I've noticed for a while that my home/index page wasn't registering
the {{ user }} tag when rendering the page: there was no "Welcome
Username. Change password / Log out" in the top right corner, and the
link to the admin interface that I'd put in the breadcrumbs for logged
in users wouldn't appear.

But that was the only page - every other page showed it fine - so I
wasn't too concerned, and gave it a low priority to fix it.

FWIW the whole site requires authentication (checked and confirmed in
another browser) - so Django knew I was auth'd - it just chose to
ignore some of the base.html

Yesterday I added some thematic changes - a little js and css, plonked
it in path/project/app/static/{js|css} as advised in docs and added
them to the base template with {{ STATIC_URL }}.

Suddenly the lack of auth recognition on some pages (turns out it was
more than one) is noticeable, because the graceful degrading of the
js/css is appalling enough to make it stick out. In particular, when I
"inspected element" I saw that the {{ STATIC_URL }} wasn't being
expanded - the resources were failing on bad paths.

I've tracked everything down that could be the problem - I've
confirmed half a dozen times that the pages in question are extending
the correct base_site.html, which is extending the correct base.html,
I even tried sending the request context in render_to_response with no
luck.

It was only this morning while doing some triage that I realised that
the pages without proper auth (no details in top right corner) where
also the ones with the wonky templating.

Any clues on what I'm doing wrong or new ways to track down where the
mistake is?

Cheers
L.



-- 
...we look at the present day through a rear-view mirror. This is
something Marshall McLuhan said back in the Sixties, when the world
was in the grip of authentic-seeming future narratives. He said, “We
look at the present through a rear-view mirror. We march backwards
into the future.”

http://www.warrenellis.com/?p=14314

-- 
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: problem with html select box values

2012-09-20 Thread Mario Gudelj
There's no way this can be answered without code examples
On Sep 20, 2012 1:54 PM, "Navnath Gadakh"  wrote:

> i have project for online shoping in that i use product category and and
> product names.
>i have taken product name in select dropdown box.
>  now i want to create offer for any perticular product whatever i selected
> .
>
> but at the time of product name comparison in view it takes only first
> string (i.e for ex. product name = sony ericsson , it takes only sony )
> plz do needful...
>
> --
> 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/-/PMY2nBYTF2MJ.
> 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: syncdb is not creating auth tables

2012-09-20 Thread Mario Gudelj
Thanks Amyth, but that doesn't work. I delete the sqlite file that gets
created with syncdb and i still get the same error. The new db file gets
created with some tables in it, but no auth tables.
On Sep 20, 2012 5:44 PM, "Amyth Arora"  wrote:

> You've changed the models after the tables were initially created. Delete
> the current database and create a new one. Then ->> syncdb.
>
> On Thu, Sep 20, 2012 at 1:01 PM, Mario Gudelj wrote:
>
>> Hi Djangoers,
>>
>> I'm sure I'm missing something simple but for the life of me I can not
>> figure this out.
>>
>> I'm trying to syncdb and I'm getting this error:
>>
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
>> line 337, in execute
>> return Database.Cursor.execute(self, query, params)
>> django.db.utils.DatabaseError: no such table: auth_permission
>>
>> My installed apps in settings file:
>>
>> INSTALLED_APPS = (
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.admin',
>> 'django.contrib.sessions',
>> 'django.contrib.sites',
>> 'django.contrib.staticfiles',
>> 'forms',
>> )
>>
>> I've tried changing the order since the docs say that permissions depend
>> on contenttypes but that didn't work.
>>
>> Tried migration using south and it creates some migrations but then it
>> gives me the same error.
>>
>> I'm using sqlite3.
>>
>> I can see that some of the tables do get created, but no auth tables.
>>
>> Googled for an hour and can't find anything.
>>
>> Any help would be greatly appreciated!
>>
>> -m
>>
>> --
>> 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.
>>
>
>
>
> --
> Thanks & Regards
> 
>
> Amyth [Admin - Techstricks]
> Email - aroras.offic...@gmail.com, ad...@techstricks.com
> Twitter - @mytharora
> http://techstricks.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.



How to define a different Max-Age than the set @cache_control / @cache_page?

2012-09-20 Thread jicks83


I'd like to cache my view as follows:

@cache_page(10)
def myview:
return HttpResponse('content')

This automatically caches my view for 10 seconds and automatically sets 
Cache-Control/Expire header as well. I'd like to cache my view for only 10 
seconds but have a max-age of 3600 seconds.

Tried it for example this way:

@cache_page(10)
def myview:
response = HttpResponse('content')
patch_response_headers(response, 3600)

or this way:

@cache_page(10)
def myview:
response = HttpResponse('content')
response['Cache-Control'] = 'max-age=3600'

But when specifying one of those within my Django-View it caches the view 
for 3600 seconds and not 10 seconds. Also tried decorators like 
'cache_control' but nothing helps.

Is there a solution for this problem? I'm using Django 1.4.1.

Don't know if it is relavent, my activated middleware classes are


   - django.middleware.common.CommonMiddleware
   - django.contrib.sessions.middleware.SessionMiddleware
   - django.middleware.csrf.CsrfViewMiddleware
   - django.contrib.auth.middleware.AuthenticationMiddleware
   - django.contrib.messages.middleware.MessageMiddleware
   - django.middleware.http.ConditionalGetMiddleware
   
I've activated the ConditionalGetMiddleware to make sure a 304 will be sent 
depending on the last-modified header.

Thanks a lot!

Holger

-- 
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/-/cq2gAU8wiBIJ.
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: tree.io installation with django

2012-09-20 Thread Nick Apostolakis

On 20/09/2012 10:36 μμ, Fabian Weiss wrote:

And YES again! :) That solved it!
No alomost everything works! :)
Just when I go to /calendar/settings/integration I see: "available
resources: loading.." Is it normal?

Greetings and THX :)

   

You are welcome.
The calendar app as far as I understand is supposed to be able to sync 
with google cal.
That however has not worked for me, I think that this feature is broken. 
There was another glitch with the helpdesk module although I didn't try 
enough to resolve that.
I have installed tree.io mostly for the project management, and helpdesk 
support if it supported anonymous user's ticket creation of something

like that.
I think that the app does not support anonymous helpdesk, so I will use 
it for project management only for the moment.
It works reasonably well, although I have not managed yet to isolate my 
users from viewing each others projects.
I admit that I have dedicated only a small amount of time in the user 
separation issue, since my installation has only a few trusted users,

so project isolation is not a must have.

I am glad you have a working installation...

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: tree.io installation with django

2012-09-20 Thread Fabian Weiss
And YES again! :) That solved it! 
No alomost everything works! :)
Just when I go to /calendar/settings/integration I see: "available 
resources: loading.." Is it normal?

Greetings and THX :)

Am Donnerstag, 20. September 2012 20:34:17 UTC+2 schrieb Nick Apostolakis:
>
> On 20/09/2012 08:31 πμ, Fabian Weiss wrote: 
> > The trouble is still not over :( :( 
> > When I click on Calendar or Projects I get the error in the top: 
> "Something 
> > went wrong..." 
> > Exactly because of these two features I installed the software.. :/ 
> > So I remove the # in the link to activate the debug output and I 
> > get: http://snipurl.com/251x8oz 
> > (1054, "Unknown column 'projects_task.depends_id' in 'field list'") 
> > Does somebody know a solution? 
> > 
> > 
> I think that there is a south migration you have to perform 
> try python manage.py migrate projects 
>
> -- 
>   -- 
> Nick Apostolakis 
>e-mail: nick...@oncrete.gr  
>   Web Site: http://nick.oncrete.gr 
>   -- 
>
>
>

-- 
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/-/-mbU6UPDl0cJ.
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: tree.io installation with django

2012-09-20 Thread Nick Apostolakis

On 20/09/2012 08:31 πμ, Fabian Weiss wrote:

The trouble is still not over :( :(
When I click on Calendar or Projects I get the error in the top: "Something
went wrong..."
Exactly because of these two features I installed the software.. :/
So I remove the # in the link to activate the debug output and I
get: http://snipurl.com/251x8oz
(1054, "Unknown column 'projects_task.depends_id' in 'field list'")
Does somebody know a solution?

   

I think that there is a south migration you have to perform
try python manage.py migrate projects

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


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



Multi-level list (another ... I think)

2012-09-20 Thread refreegrata
Hello list
I have a question. I need to build a multi-level MultipleChoiceField. 
Something like this:
---

  

  Heavy Rain
  KOF XIII


  Halo 3

  
  

  Watchmen
  Swamp thing


  Spiderman

  

---
With just one level (1 optgroup) is easy, but optgroups inside other 
optgroups ... I don't know how.

I'm trying this: 

--
myChoices= (
('Videogames', (
('PS3', (
 ('1', 'Heavy Rain'),
 ('2', 'KOF XIII')
)),
('XBox', (
  ('3', 'Halo 3')
))
   ),
),
('Comics', (
('DC', (
('4', 'Watchmen'),
('5', 'Swamp thing')
)),
('Marvel', (
('6', 'Spiderman')
))
   )
)
   )

..
self.fields['myList'].choices= self.myChoices
--

But don't works

Somebody have an idea?

That's all. Bye

-- 
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/-/oQ5CNP_841cJ.
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 Unobtrusive Ajax

2012-09-20 Thread Kurt Pruhs
@Russell
I understand what you are saying, as far as making AJAX a part of Django's 
core. It's a server-side framework. On the other hand, I was just in D.C. 
for DjangoCon and listened to Adrian Holovaty talk about making Django 
deliver real-time content. Did I misunderstand what he was saying? As far 
as I know, a JavaScript solution is the most viable for delivering 
real-time content to browsers. Is there another way to do this? Just 
curious what your thoughts are.

Kurt



On Wednesday, September 19, 2012 5:09:42 PM UTC-6, Russell Keith-Magee 
wrote:
>
> … and, you can also see on that ticket that the chance of this getting 
> into Django itself is *very low*. 
>
> Django is, by design, a server side framework. AJAX is a primarily 
> client-side concern, with some light server-side data requirements. 
> There's absolutely no need for this to be tightly bound to Django's 
> core. If you want a more detailed explanation of why, I've spoken on 
> the topic at several conferences; most recently at PyCon AU: 
>
> http://www.youtube.com/watch?v=xFh40R5KcV8 
>
> Yours, 
> Russ Magee %-) 
>
> On Thu, Sep 20, 2012 at 12:20 AM, Faraz Masood Khan 
>  
> wrote: 
> > Yes Kurt, you can vote for this feature over here: 
> > https://code.djangoproject.com/ticket/18981 
> > 
> > 
> > On Wednesday, September 19, 2012 8:02:44 PM UTC+5, Faraz Masood Khan 
> wrote: 
> >> 
> >> Easiest way to do Ajax in Django: 
> >> http://codestand.feedbook.org/2012/09/django-unobtrusive-ajax.html 
> >> 
> > -- 
> > 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/-/M3yxmpry5NEJ. 
> > 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > django-users...@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 view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/6_09oW7Ef8QJ.
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.



calculated fields with foreign keys

2012-09-20 Thread kloetpatra
Hi!
I have the following models:

class Player(models.Model):
name = models.CharField('Name', max_length=40)
pub_date = models.DateTimeField('date added', 
default=datetime.datetime.now)
def __unicode__(self):
return self.name
def goals(self):
g = 0
ms1 = Match.objects.filter(opp1=self)
ms2 = Match.objects.filter(opp2=self)
for m in ms1:
g += m.opp1_goals
for m in ms2:
g += m.opp2_goals
return g

class Match(models.Model):
opp1 = models.ForeignKey(Player)
opp2 = models.ForeignKey(Player)
opp1_goals = models.IntegerField("Goals P1")
opp2_goals = models.IntegerField("Goals P2")
pub_date = models.DateTimeField('date published', 
default=datetime.datetime.now)

The problem is when I want to display a statistics overview with all 
players there will be 2 DB-Queries per player only to get the "goals" 
property.
And I got more "calculated fields" like number of won matches, number of 
lost matches, etc...
There are 364 Match entries and 46 Players.
At my overview page I got over 2000 SQL queries which take over 6 seconds 
to load the page.

How can I speed up the process?
I don't want to save those "calculated values" in the database.

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



Decorate 3rd party app's views

2012-09-20 Thread Garry Polley
Currently I am having to choose between two ways to decorate 3rd party apps 
views:

1) Use a middleware 
(http://stackoverflow.com/questions/2164069/best-way-to-make-djangos-login-required-the-default)
 

2) Use some url 'magic' to apply the decorator 
(http://stackoverflow.com/questions/2307926/is-it-possible-to-decorate-include-in-django-urls-with-login-required)

What I would like to do is this:

url(r'^authurls', login_required(include('someapp.urls'), 
login_url='path/to/login'))


So 2 questions:

1)  What does everyone else do to accomplish this?

2) What should 3rd party apps (or Django) do to allow you to decorate their 
views, if they should at all? 

-- 
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/-/iNTpy2RpTJAJ.
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: Beginer: Need Help in setting up goflow, could you please elaborate initial Gflow setup

2012-09-20 Thread Stephen Anto
I think it may be a import error. pls check 'goflow' which is available on
your project.

On Thu, Sep 20, 2012 at 5:02 PM, Enator24  wrote:

> After editing settings.py I am getting error
>
>
> C:\wf\mysite>python manage.py runserver
> Error: *No module named goflow.instances*
>
> Thanks.
>
>
>
> On Thursday, 20 September 2012 09:43:48 UTC+5:30, Stephen Anto wrote:
>>
>> Yes there are lot of necessary settings in settings.py based on the
>> requirement. If you need any other clarification, there are lot of docs
>> available on net, else send me your requirement in detail.
>>
>> Thank you for visiting 
>>
>> On Wed, Sep 19, 2012 at 11:52 PM, Enator24  wrote:
>>
>>> Thanks for your reply, I am able to setup the sample project, just need
>>> to know if  I need to do any thing other than specified on "
>>> https://code.djangoproject.**co**m/wiki/GoFlow_Doc"
>>>
>>>
>>>
>>>
>>> On Wednesday, 19 September 2012 23:10:35 UTC+5:30, Stephen Anto wrote:
>>>
 Hi,

 There are 7 steps only to start your django project..

 just visit 
 http://www.f2finterview.com/web/Django/17/
  it
 may give you solution. Than you for visiting

 On Wed, Sep 19, 2012 at 9:53 PM, Enator24  wrote:

>  Need Help in setting up goflow, could you please elaborate initial
> Gflow setup please 
> "https://code.djangoproject.**co**m/wiki/GoFlow_Doc"
> I have been referring this setup guide but still having lot of problem.
> Please let me know the exact prerequisite after I have install Django.
>
>  --
> 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/*
> *ms**g/django-users/-/-**jS7KCzcLEMJ
> .
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@**
> googlegroups.**com.
>
> For more options, visit this group at http://groups.google.com/**group
> **/django-users?hl=en
> .
>



 --
 Thanks & Regards
 Stephen S



 Website: www.f2finterview.com
 Blog:  blog.f2finterview.com
 Tutorial:  tutorial.f2finterview.com
 Group:www.charvigroups.com

   --
>>> 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/-/**iUE7NeZhgcQJ
>>> .
>>>
>>> To post to this group, send email to django...@googlegroups.com.
>>> To unsubscribe from this group, send email to django-users...@**
>>> googlegroups.com.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/django-users?hl=en
>>> .
>>>
>>
>>
>>
>> --
>> Thanks & Regards
>> Stephen S
>>
>>
>>
>> Website: www.f2finterview.com
>> Blog:  blog.f2finterview.com
>> Tutorial:  tutorial.f2finterview.com
>> Group:www.charvigroups.com
>>
>>  --
> 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/-/pwjJbk0VC8YJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.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: Django + mod_wsgi url rewriting issue

2012-09-20 Thread Sebastiaan Snoeckx


> I use something like that... i mean, for example if /foo/bar must to 
> execute with django the url must to be example.com/site.wsgi/foo/bar 
> (continue with the example of serverfault)... if you follow 
> example.com/foo/bar apache use your statics files. 
>
> (this part of my production virtualhost) 
>
> WSGIDaemonProcess domain.com processes=2 threads=15 display-name=%{GROUP} 
> WSGIProcessGroup domain.com 
> WSGIScriptAlias /dj /home/path/to/site/django/wsgi/django.wsgi 
>
> Alias /media/ /home/path/to/site/django/src/project/media/ 
> Alias /static/admin/ /home/path/to/site/django/src/project/static/admin/ 
>
> (End Virtualhost example) 
>
> Following my example i have an urlconf to see news: 
> url( r'^/news/', 'news-site' ), 
>
> but clients must to put http://www.mydomain.com/dj/news/  so apache 
> see that you put /dj in yours url... so execute django.wsgi... urlconf 
> see news in the url so execute news-site view. 
>
>
> Sorry about my english i hope that help you 
>
 > 

Well... first of all, my static files are not in separate '/static/' 
directories or on a separate server or anything (hence the RewriteCond), 
and secondly, the problem is that even when I do 
"example.com/site.wsgi/foo/" it still won't work and i only get my default 
view... always... as a matter of fact, instead of returning a Django error 
when I enter a known bogus address, it still shows my default view.

Btw, I'm unsure about the terminology here, but 'default view' is simply 
"url(r'', 'app.views.show_index')" which shouldn't actually match anything 
(just an empty GET) -- meaning the GET request is stripped by Django for 
some reason? that or there's a mistake in my RewriteRule.

I'm really stuck with this... :(

-- 
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/-/hmE103VGlEIJ.
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: Beginer: Need Help in setting up goflow, could you please elaborate initial Gflow setup

2012-09-20 Thread Enator24
Any other advise for a workflow applications.


On Thursday, 20 September 2012 20:05:06 UTC+5:30, guettli wrote:
>
> Hello 
>
> the last update on goFlow is some years ago (sept 2008). This projects 
> looks dead. If you are new to django, I guess 
> you will get a lot of errors  
>
> Thomas Güttler 
>
> Am 19.09.2012 18:23, schrieb Enator24: 
> > Need Help in setting up goflow, could you please elaborate initial Gflow 
> setup please 
> > "https://code.djangoproject.com/wiki/GoFlow_Doc; I have been referring 
> this setup guide but still having lot of problem. 
> > Please let me know the exact prerequisite after I have install Django. 
> > 
> > -- 
> > 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/-/-jS7KCzcLEMJ. 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> django-users...@googlegroups.com . 
> > For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en. 
>
> -- 
> Thomas Guettler, http://www.thomas-guettler.de/ 
> E-Mail : guettli (*) 
> thomas-guettler + de 
>

-- 
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/-/DSHU6YJnKMsJ.
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: Issues with validation

2012-09-20 Thread Tom Evans
On Tue, Sep 18, 2012 at 11:12 AM, neeraj dhiman  wrote:
> I am using two models in my app and different form for each model, when I
> tried to validate these two forms , one model is validated but other is not.
>

You need to be a bit more selective about what code you show, and more
explicit about where the errors occur (or where the errors should
occur, whichever).

In your CustomerRegistration view, when initially rendering the forms
you construct a Registration_Form and a Check_Attribute_Form, but when
the form is resubmitted back to you, you only call is_valid() on the
Registration_Form instance. Therefore, validation never occurs on the
Check_Attribute_Form instance.

I've not looked at the other three views you posted along with
CustomerRegistration…

By the way, naming views with CamelCaps makes them look like classes
and isn't recommended.

Cheers

Tom

-- 
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: ANN: Maymyo Business Application Infrastructre Beta 0.3.3

2012-09-20 Thread bobhaugen
Gaah!  I just re-read my message about Maymyo and if it was from somebody 
else, I would think they were related to the project and shilling, or else 
trying to selling the OP something.

I'm not, really. This is the first time I heard of the project. And I don't 
have anything to sell. But I am an old ERP programmer and liked where they 
were going, and think it's nice to see more serious business features in 
Django projects.

-- 
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/-/ckx7P9n8GX8J.
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: Issues with validation

2012-09-20 Thread Stephen Anto
Hi me too get the same problem... anyone help us..

On Tue, Sep 18, 2012 at 3:42 PM, neeraj dhiman  wrote:

> I am using two models in my app and different form for each model, when I
> tried to validate these two forms , one model is validated but other is not.
>
> model.py
>
> from django.db import models
> from django.contrib.auth.models import User
>
> class Customer(models.Model):
> user=models.OneToOneField(User)
> birthday=models.DateField()
> website=models.CharField(max_length=50)
> store=models.CharField(max_length=50)
> welcomemail=models.CharField(max_length=50)
>
>
>
>
>
>
> def __unicode__(self):
>  return self.user
>
> class Customer_check_attributes(models.Model):
> user=models.ManyToManyField(User)
> billing_add=models.CharField(max_length=50)
> shipping_add=models.CharField(max_length=50)
> payment_method=models.CharField(max_length=50)
> shipping_method=models.CharField(max_length=50)
> reward_points=models.CharField(max_length=50)
>
>
> form for first model **Customer**
>
> class Registration_Form(ModelForm):
>first_name  = forms.CharField(label=(u'First Name'))
>last_name   = forms.CharField(label=(u'Last Name'))
>username   = forms.CharField(label=(u'User Name'))
>email  = forms.EmailField(label=(u'Email Address'))
>password   = forms.CharField(label=(u'Password'),
> widget=forms.PasswordInput(render_value=False))
>
> :
>class Meta:
>   model=Customer
>
>   exclude=('user',)
>
> form for 2nd model **Customer_check_attributes**
>
> In template I am using this
> **for 1st model Customer** and it is validating the field first name
>
> 
> {% if form.first_name.errors %}{{
> form.first_name.errors }}{% endif %}
>  class="error"{% endif %}>Firstname:
> {{ form.first_name }}
> 
>
> **for 2nd model Customer_check_attributes** and it is not validating the
> field billing add
>
> 
> {% if check.billing_add.errors %}{{
> check.billing_add.errors }}{% endif %}
>  class="error"{% endif %}>Billing Address:
> {{ check.billing_add }}
> 
>
> here I am using **check** instead of form because I am storing the form in
> this and return it in context
>
>
> view.py
>
>
> from django.contrib.auth.models import User
> from customer_reg.models import Customer,Customer_check_attributes
> from django.http import HttpResponseRedirect
> from django.shortcuts import render_to_response
> from django.template import RequestContext
> from customer_reg.forms import Registration_Form,
> Check_Attribute_Form, LoginForm
> from django.contrib.auth import authenticate, login, logout
> from django.contrib.auth.decorators import login_required
>
>
> def CustomerRegistration(request):
> if request.user.is_authenticated():
> return HttpResponseRedirect('/profile/')
> if request.method == 'POST':
> form = Registration_Form(request.POST)
> if form.is_valid():
>
> user=User.objects.create_user(username=form.cleaned_data['username'],
> email=form.cleaned_data['email'], password = form.cleaned_data['password'])
> user.first_name = form.cleaned_data['first_name']
> user.last_name = form.cleaned_data['last_name']
> user.save()
>
> #customer=user.get_profile()
> #customer.birthday=form.cleaned_data['birthday']
> #customer.website=form.cleaned_data['website']
> #customer.store=form.cleaned_data['store']
> #customer.welcomemail=form.cleaned_data['welcomemail']
> #customer.save()
>
> customer=Customer(user=user,
> website=form.cleaned_data['website'],
> birthday=form.cleaned_data['birthday'], store=form.cleaned_data['store'],
> welcomemail=form.cleaned_data['welcomemail'])
> customer.save()
>
>   return HttpResponseRedirect('/profile/')
> else:
> check_form=Check_Attribute_Form()
> context={'form':form, 'check':check_form}
> return
> render_to_response('customer_register.html',context ,
> context_instance=RequestContext(request))
> else:
> ''' user is not submitting the form, show them a blank
> registration form '''
>
> form = Registration_Form()
> check_form = Check_Attribute_Form()
>  context={'form':form,'check':check_form}
>  return
> render_to_response('customer_register.html',context ,
> context_instance=RequestContext(request))
>
>
> 

Re: GeoDjango and shapefiles

2012-09-20 Thread George Silva
Hi Coulson,

GeoDjango is just Django. You can write an application that checks upon
initialization which type of environment it's located and then you can set
the DATABASES property on settings.py.

Using the technique I've told you above, you can store GIS data in two
databases (for web application you can use PostgreSQL with PostGIS) and for
offline use SQLite.

Natively, Django does not speaks "shapefile", so you will need to create a
routine to export your data to shapefile.

Anyways, you can always export your data to SQLite databases and use
GeoDjango to render those data to OpenLayers in GeoJSON. Should work on any
modern smartphone.

On Thu, Sep 20, 2012 at 11:36 AM, Coulson Thabo Kgathi
wrote:

> Hi guys i want to use geodjango for an application that gives map
> locations but offline using shapefiles and geodjango, any information that
> i can be refered to would be appreciated. I dont want to use google maps
> because its wil be used offline
>
> thank you
>
> --
> 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/-/u2kiG0kJd0UJ.
> 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.
>



-- 
George R. C. Silva

Desenvolvimento em GIS
http://geoprocessamento.net
http://blog.geoprocessamento.net

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



GeoDjango and shapefiles

2012-09-20 Thread Coulson Thabo Kgathi
Hi guys i want to use geodjango for an application that gives map locations 
but offline using shapefiles and geodjango, any information that i can be 
refered to would be appreciated. I dont want to use google maps because its 
wil be used offline

thank you

-- 
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/-/u2kiG0kJd0UJ.
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: Beginer: Need Help in setting up goflow, could you please elaborate initial Gflow setup

2012-09-20 Thread Thomas Guettler

Hello

the last update on goFlow is some years ago (sept 2008). This projects looks 
dead. If you are new to django, I guess
you will get a lot of errors 

Thomas Güttler

Am 19.09.2012 18:23, schrieb Enator24:

Need Help in setting up goflow, could you please elaborate initial Gflow setup 
please
"https://code.djangoproject.com/wiki/GoFlow_Doc; I have been referring this 
setup guide but still having lot of problem.
Please let me know the exact prerequisite after I have install Django.

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


--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de

--
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: Browser get closed when clicked on others links

2012-09-20 Thread Stephen Anto
pls check browser settings.

On Tue, Sep 18, 2012 at 5:20 PM, Pervez Mulla  wrote:

> Hi,
>
> I have developed simple website with Django framework.
>
> When i want to switch to other page, the browser getting closed..:(
>
> What the problem for this ?
>
> Thank You
> Pervez
>
> --
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.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: Beginer: Need Help in setting up goflow, could you please elaborate initial Gflow setup

2012-09-20 Thread Enator24
After editing settings.py I am getting error


C:\wf\mysite>python manage.py runserver
Error: *No module named goflow.instances*

Thanks.



On Thursday, 20 September 2012 09:43:48 UTC+5:30, Stephen Anto wrote:
>
> Yes there are lot of necessary settings in settings.py based on the 
> requirement. If you need any other clarification, there are lot of docs 
> available on net, else send me your requirement in detail.
>
> Thank you for visiting 
>
> On Wed, Sep 19, 2012 at 11:52 PM, Enator24  > wrote:
>
>> Thanks for your reply, I am able to setup the sample project, just need 
>> to know if  I need to do any thing other than specified on "
>> https://code.djangoproject.**com/wiki/GoFlow_Doc"
>>  
>>
>>
>>
>>
>> On Wednesday, 19 September 2012 23:10:35 UTC+5:30, Stephen Anto wrote:
>>
>>> Hi,
>>>
>>> There are 7 steps only to start your django project..
>>>
>>> just visit 
>>> http://www.f2finterview.**com/web/Django/17/
>>>  it 
>>> may give you solution. Than you for visiting
>>>
>>> On Wed, Sep 19, 2012 at 9:53 PM, Enator24  wrote:
>>>
  Need Help in setting up goflow, could you please elaborate initial 
 Gflow setup please 
 "https://code.djangoproject.**com/wiki/GoFlow_Doc"
  
 I have been referring this setup guide but still having lot of problem. 
 Please let me know the exact prerequisite after I have install Django.

  -- 
 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/-/-**jS7KCzcLEMJ
 .
 To post to this group, send email to django...@googlegroups.com.
 To unsubscribe from this group, send email to django-users...@**
 googlegroups.com.

 For more options, visit this group at http://groups.google.com/**
 group/django-users?hl=en
 .

>>>
>>>
>>>
>>> -- 
>>> Thanks & Regards
>>> Stephen S
>>>
>>>
>>>
>>> Website: www.f2finterview.com
>>> Blog:  blog.f2finterview.com
>>> Tutorial:  tutorial.f2finterview.com
>>> Group:www.charvigroups.com
>>>
>>>   -- 
>> 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/-/iUE7NeZhgcQJ.
>>
>> To post to this group, send email to django...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> django-users...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> -- 
> Thanks & Regards
> Stephen S
>
>
>
> Website: www.f2finterview.com
> Blog:  blog.f2finterview.com
> Tutorial:  tutorial.f2finterview.com
> Group:www.charvigroups.com
>
>

-- 
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/-/pwjJbk0VC8YJ.
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: SyntaxError Creating New Project

2012-09-20 Thread Stephen Anto
Hi Daniel,

I am not spamming. just inform you that how to create django projects with
initial steps.

I just replied for your 'SyntaxError Creating New Project' title.

I have prepared to make this answer for your questions. Is it related your
query or not?

On Thu, Sep 20, 2012 at 3:35 PM, Daniel Roseman wrote:

> On Thursday, 20 September 2012 05:20:56 UTC+1, Stephen Anto wrote:
>>
>> Hi,
>>
>> Just follow these 7 steps to start new project
>> http://f2finterview.com/web/**Django/17/For
>>  more
>> http://f2finterview.com/web/**Django 
>>
>>
>>
> Stephen, please stop spamming this list by posting the same link to your
> site over and over again.
> --
> Daniel.
>
> --
> 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/-/DmRKpNppH9MJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.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: Django confirm email. Change value from false to true

2012-09-20 Thread Stephen Anto
Hi,

Just fllow bellow steps:

In urls.py add bellow url

urlpatterns = patterns('',
url('^meeting/$',
'meeting', name='meeting'),
url('^meeting/confirm/(\w+)/$','meeting_confirm',
name='meeting_confirm'),
)

In views.py add bellow methods

def meeting(request):
form = MeetingForm()
pDict = request.POST.copy()
if request.method == 'POST':
form = MeetingForm(pDict)
if form.is_valid():
try:
meeting_obj = Meeting()
meeting_obj.name = pDict['name']
meeting_obj.time = pDict['time']
meeting_obj.confirmed = 0
meeting_obj.save()

path = reverse('meeting_confirm'',args=[meeting_obj.id])
activation_url = u"%s%s" % (unicode(settings.CURRENT_SITE),
path)

context = {
"email":pDict['user_email']
"first_name":pDict['user_name'],
"activation_url": activation_url,
}

 emails/user/meeting_subject.txt #
 emails/user/meeting_msg.txt ###
# Above are templates files for email. You should design as
you want

subject =
render_to_string('emails/user/meeting_subject.txt', context)
subject = "".join(subject.splitlines())
message = render_to_string('emails/user/meeting_msg.txt',
context)
msg = EmailMultiAlternatives(subject,message, '
ad...@example.com',pDict['user_email'])
msg.attach_alternative(message, "text/html")
msg.send()

except:
pass

return render_to_response('meeting.html',
locals(),context_instance=RequestContext(request))

def meeting_confirm(request,id):
meeting_obj = Meeting.objects.get(id=id)
meeting_obj.confirmed = 1
meeting_obj.save()

msg = 'Meeting has been confirmed!'

return render_to_response('meeting_confirm.html',
locals(),context_instance=RequestContext(request))

I believe it may help you. For more http://f2finterview.com/web/Django/ Than
you for visiting 
On Wed, Sep 19, 2012 at 1:23 AM, enemybass  wrote:

> This is my model:
>
> from django.db import models
>
> class Meeting(models.Model):
> name = models.CharField(max_length=255)
> time = models.DateTimeField()
> confirmed = models.BooleanField(default=False)
>
> This is my form:
>
> from django import forms
>
> class MeetingForm(forms.Form):
> name = forms.CharField(max_length=100)
> time = forms.DateTimeField()
> user_name = forms.CharField(max_length=100)
> user_email = forms.EmailField()
>
> How to create a view that send a mail to user with link and when user
> clicks on this link confrimed field will change value to true?
>
> Link is my biggest problem.
>
>
>
>  --
> 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/-/01tWYQEuJ9IJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.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: SyntaxError Creating New Project

2012-09-20 Thread Daniel Roseman
On Thursday, 20 September 2012 05:20:56 UTC+1, Stephen Anto wrote:
>
> Hi,
>
> Just follow these 7 steps to start new project 
> http://f2finterview.com/web/Django/17/ For more 
> http://f2finterview.com/web/Django
>
>
>
Stephen, please stop spamming this list by posting the same link to your 
site over and over again.
--
Daniel. 

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



Site stealing content

2012-09-20 Thread Ilian Iliev
Hello,

the site http://djangoblog.org/ is copying full articles from the community
feed
and presenting them as own(copyright at the website footer) without
mentioning
the original author/source.
I send a complain to the email in the domain whois( pa...@sychrovnet.cz) but
there was no response. From the hosting company told me that unfortunately
then can not do anything without police or court order.
The only step that I can think of now is to send a DMCA notice to Google(
http://support.google.com/bin/static.py?hl=en=1114905=ts.cs)
with the hope that they will remove the indexed content.
Please if anyone of you is also suffering from this content stealing send an
DMCA notice or share if you have other ideas how we can stop this.

Thanks in advance,
Ilian Iliev

--
eng. Ilian Iliev
Web Software Developer

Mobile: +359 88 66 08 400
Website: http://ilian.i-n-i.org
Skype: eng.ilian_iliev

-- 
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: ANN: Maymyo Business Application Infrastructre Beta 0.3.3

2012-09-20 Thread bobhaugen
This is a very ambitious project.  I wish you great success.

I did some browsing of the doc and code and am very impressed by what you 
have accomplished so far.  Your "glacial speed" comment is too modest.

I am working on business applications in Django, but they are not 
enterprise-oriented.  I'll send you a private message with some links, in 
case I have some code you could use.

-- 
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/-/EhH5pMej01cJ.
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: syncdb is not creating auth tables

2012-09-20 Thread Amyth Arora
You've changed the models after the tables were initially created. Delete
the current database and create a new one. Then ->> syncdb.

On Thu, Sep 20, 2012 at 1:01 PM, Mario Gudelj wrote:

> Hi Djangoers,
>
> I'm sure I'm missing something simple but for the life of me I can not
> figure this out.
>
> I'm trying to syncdb and I'm getting this error:
>
> File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
> line 337, in execute
> return Database.Cursor.execute(self, query, params)
> django.db.utils.DatabaseError: no such table: auth_permission
>
> My installed apps in settings file:
>
> INSTALLED_APPS = (
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.admin',
> 'django.contrib.sessions',
> 'django.contrib.sites',
> 'django.contrib.staticfiles',
> 'forms',
> )
>
> I've tried changing the order since the docs say that permissions depend
> on contenttypes but that didn't work.
>
> Tried migration using south and it creates some migrations but then it
> gives me the same error.
>
> I'm using sqlite3.
>
> I can see that some of the tables do get created, but no auth tables.
>
> Googled for an hour and can't find anything.
>
> Any help would be greatly appreciated!
>
> -m
>
> --
> 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.
>



-- 
Thanks & Regards


Amyth [Admin - Techstricks]
Email - aroras.offic...@gmail.com, ad...@techstricks.com
Twitter - @mytharora
http://techstricks.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.



syncdb is not creating auth tables

2012-09-20 Thread Mario Gudelj
Hi Djangoers,

I'm sure I'm missing something simple but for the life of me I can not
figure this out.

I'm trying to syncdb and I'm getting this error:

File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
line 337, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: no such table: auth_permission

My installed apps in settings file:

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.admin',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.staticfiles',
'forms',
)

I've tried changing the order since the docs say that permissions depend on
contenttypes but that didn't work.

Tried migration using south and it creates some migrations but then it
gives me the same error.

I'm using sqlite3.

I can see that some of the tables do get created, but no auth tables.

Googled for an hour and can't find anything.

Any help would be greatly appreciated!

-m

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



is Django by Example still relevant resource

2012-09-20 Thread Gour
Hello,

I'm starting to learn Django and considering that the present django is
1.4.1 and by the end of the year there will be 1.5 available, i wonder
if Django by Example (http://lightbird.net/dbe/index.html)  written for
1.2 is still good resource for learning?

What about The Django Book V2.0? 

Django tutorial is nice, but wonder how to proceed afterwards? Going
through 'topics' or consulting some older material like the one
mentioned above?


Sincerely,
Gour

-- 
As the embodied soul continuously passes, in this body, 
from boyhood to youth to old age, the soul similarly passes 
into another body at death. A sober person is not bewildered 
by such a change.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


signature.asc
Description: PGP signature


Re: httplib exception in Django model

2012-09-20 Thread airween
Hello,


On Wednesday, September 19, 2012 7:45:00 PM UTC+2, Alexis Roda wrote:
>
> Al 19/09/12 10:42, En/na airween ha escrit: 
>
> >File "/usr/lib/python2.6/socket.py", line 547, in create_connection 
> >  for res in getaddrinfo(host, port, 0, SOCK_STREAM): 
> > error: Int or String expected 
> >  >>> 
> > 
> > 
> > What should I do, what is the problem? 
>
> According to the last line it seems that 'host' or 'port' have the wrong 
> type. Since 'host' must be an string or None the problem seems to be 
> related with 'port'. 
>
> Printing httphost and httpport's type and value before creating the 
> connection may give you some clue. 
>
>
>  
well, you're right :), I printed out the values of those variables, but not 
types.
But now I see, the type of httpport is 'long' instead of 'int' (it cames 
from a Django model).

Typecast resolves this problem, thanks :)


a.


> HTH 
>
>

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