Re: Django real world website samples (with django source codes)

2011-04-07 Thread djangodjango django
thanks.

On Thu, Apr 7, 2011 at 4:38 PM, Nikos K  wrote:

> Here is a list with a lot of sites based in django
>
> http://www.djangosites.org/
>
> 
>
> On 7 April 2011 08:48, django beginner  wrote:
>
>> Hi all,
>>
>> Could someone please give a link on some of the samples for real world
>> Django websites?
>> Thanks and have a nice day!
>>
>> Regards,
>> Django Beginner
>>
>> --
>> 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: sample real world Django website sample scripts

2011-04-06 Thread djangodjango django
Thanks kenneth!

On Thu, Apr 7, 2011 at 2:28 PM, Kenneth Gonsalves wrote:

> On Thu, 2011-04-07 at 14:25 +0800, djangodjango django wrote:
> > thanks, but do they provide django source codes for making those
> > websites?
> > Thanks.
>
> http://www.djangosites.org/with-source/
> --
> regards
> KG
> http://lawgon.livejournal.com
> Coimbatore LUG rox
> http://ilugcbe.techstud.org/
>
>

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



Re: sample real world Django website sample scripts

2011-04-06 Thread djangodjango django
thanks, but do they provide django source codes for making those websites?
Thanks.


On Thu, Apr 7, 2011 at 1:47 PM, Kenneth Gonsalves wrote:

> On Thu, 2011-04-07 at 13:24 +0800, djangodjango django wrote:
> > Could someone please give a link on some of the samples for real world
> > Django websites?
>
> http://www.djangosites.org/
> --
> regards
> KG
> http://lawgon.livejournal.com
> Coimbatore LUG rox
> http://ilugcbe.techstud.org/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> 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.



sample real world Django website sample scripts

2011-04-06 Thread djangodjango django
Hi all,

Could someone please give a link on some of the samples for real world
Django websites?
Thanks and have a nice day!

Regards.

-- 
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 create message box in Django?

2011-03-29 Thread djangodjango django
Hi all,

Could someone please tell me how to create a Message Box using Django?

Thanks in advance.

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



Add, Edit and Delete link using Forms (not templates) per row without using built django-admin functionality

2011-03-17 Thread djangodjango django
Hi Django users,

I am having some dilemma over converting simple admin page
*Template*(without having to use the built in django-admin
functionality) by using
forms, and not templates, I have the following sample Admin page that allows
users to add, edit and delete record per row* to Forms*: (Edit and Delete
will be links that will be directed to designated forms)

*table.html:* (/timetable)

*Booking ID   Golf Club   Status   *
1 Country Golf  PendingEdit  Delete
2 Pacific Harbour  Cancelled  Edit  Delete
3 Pacific DunesBooked Edit Delete
4 Peninsula  Booked Edit Delete
---
*Model:*
class Booking(models.Model):
bookingId = models.AutoField(primary_key=True)
golfClubName = models.CharField(max_length=50)
status = models.CharField(max_length=20)

*
views.py*
def book_tee_delete(request, object_id):
conn = psycopg2.connect("dbname=my_db user=postgres password=sa
host=localhost")
cur = conn.cursor()
sql = "delete from booking where bookingId = '%s'"% (object_id)
cur.execute(sql)
conn.commit()
conn.close()
return HttpResponseRedirect("/timetable")

def edit_book_tee(request, object_id, model):
booking = Booking.objects.get(pk=int(object_id))
template_name = 'edit_form.html'
t = loader.get_template(template_name)
c = RequestContext(request, {"obj": booking, "id":object_id})
return HttpResponse(t.render(c))

def save_edit(request):
time_format = "%Y-%m-%d %H:%M"
if request.POST['submit'] == 'Save':
 bookingid = request.POST['id']
 golfclubname = request.POST['golfclubname1']
 status = request.POST['status1']
 conn = psycopg2.connect("dbname=my_db user=postgres password=sa
host=localhost")
 cur = conn.cursor()
 sql = "UPDATE booking SET golfClubName='%s', status='%s WHERE
bookingId='%s'" %(golfclubname,status,bookingid)
 cur.execute(sql)
 conn.commit()
 conn.close()
else:#for delete
bookingid = request.POST['id']
conn = psycopg2.connect("dbname=my_db user=postgres password=sa
host=localhost")
cur = conn.cursor()
sql = "delete from chasingbirdies_booking where bookingId = '%s'" %
(bookingid)
cur.execute(sql)
conn.commit()
conn.close()
return HttpResponseRedirect("/timetable")

*table.html: (Template)
*{% extends "base.html" %}
{% load i18n %}

{% block content %}



Booking ID
Golf Club
Status





{% if teetime_list%}

{% for res in teetime_list %}

{{ res.bookingId}}
{{ res.golfClubName }}
{{ res.status }}
Edit
Delete

{% endfor %}
{% else %}
No lists available.
{% endif %}


{% endblock %}

*edit.html* *(Template)*



{% if error_message %}{{ error_message }}{%
endif %}
{% csrf_token %}



Edit Teetime



Booking ID


   

Golf Club



Status














---
My question would be, how do I transform templates on the Edit/Delete link
into Forms, (my other question would be, is there any way I could show my
css using templates on Edit?)?
Thanks in advance!

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