Kenneth,

http://code.djangoproject.com/svn/djangoproject.com/

Is the URL you want for subversion.  The "browser" url uses the
web-based browser to look at it file by file.

Unfortunately though you won't find a lot of newforms / modelforms
stuff there I'm afraid (or lost-theories unless it's been updated
since I last looked).  I'm not positive if there is any public code
out there that does that.

I will share some simple code from one of my projects that is using it
and working.  This is all in a single app.  The
text_message_subscribe() view is called in my URLs.


models.py-----

class TeamNotification(models.Model):
    team = models.ForeignKey(Team)
    notification_type = models.ForeignKey(TeamNotificationType,
verbose_name='Type of Notification')
    destination_carrier = models.ForeignKey(NotificationCarrier,
verbose_name='Your Cellular Carrier', null=True, blank=True)
    destination = models.CharField('Your (Ten-Digit) Wireless Number
or Email Address (No dashes/spaces please)', max_length=255)
    welcome_sent = models.BooleanField(default=False)
    reminder_sent = models.BooleanField(default=False)
    active = models.BooleanField(default=True)

forms.py-----

from django import newforms as forms
from project.team.models import TeamNotification

class TeamNotificationForm(forms.ModelForm):
    class Meta:
        model = TeamNotification
        fields = ('team', 'notification_type', 'destination_carrier',
'destination')


views.py------
def text_message_subscribe(request, object_id=None):
    if request.method == 'POST':
        form = TeamNotificationForm(request.POST)
        if form.is_valid:
            new_subscription = form.save()
            return HttpResponseRedirect('/subscribed/')
    else:
        form = TeamNotificationForm()
    return render_to_response('team/team_detail_subscribe.html',
{'form': form.as_p(), })




On Tue, May 20, 2008 at 2:40 PM, Kenneth McDonald
<[EMAIL PROTECTED]> wrote:
>
> Thanks for the info. I got the jeffcroft.com dl, but an attempt to svn
> the django site
> code gives me an error:
>
> MBP:django-site Ken$ svn co 
> http://code.djangoproject.com/browser/djangoproject.com
> subversion/libsvn_ra_dav/util.c:826: (apr_err=175002)
> svn: PROPFIND request failed on '/browser/djangoproject.com'
> subversion/libsvn_ra_dav/util.c:296: (apr_err=175002)
> svn: PROPFIND of '/browser/djangoproject.com': 200 OK 
> (http://code.djangoproject.com
> )
>
> Thanks again,
> Ken McDonald
>
> On May 20, 2008, at 1:52 PM, kamil wrote:
>
>>
>> You can get www.djangoproject.com web itself by:
>> svn co http://code.djangoproject.com/browser/djangoproject.com
>>
>> or get http://jeffcroft.com/blog/2006/jun/06/lost-theories-with-source-code/
>>
>> sure there are many others
>> good luck
>>
>> On May 20, 2:39 pm, Kenneth McDonald
>> <[EMAIL PROTECTED]> wrote:
>>> Is there a downloadable example of a Django site that illustrates the
>>> various things one needs to do to get the various aspects of a Django
>>> site working? In my case, I still don't have ModelForms working,
>>> and a
>>> complete, simple example would be better than all the descriptive
>>> prose that could be written about this.
>>>
>>> Thanks,
>>> Ken
>> >
>
>
> >
>

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

Reply via email to