Re: New to Django (stuck at the end of the tutorial)
I just did another try with a different version of Django which is same version of Django used in the book I am reading. It turns out where the project(mysite) saved has no effect on it. I think it's how Django suppose to behave. Perhaps you are not working with the same version of Django as the tutorial?? The sense of achievement is great once the view function starts to working and progress are being made. I hope you could figure out your problem soon. Cheers~ Mie Rex於 2016年4月27日星期三 UTC-7下午7時02分56秒寫道: > > I had a smiliar problem with another Django tutorial. >> > > I was running Django with Anaconda environment and I took the advice from > "Two Scoop Django" to have all projects stored in one directory and all the > environment in another. Therefore the project "mysite" was initialized and > put in a folder, which was parallel to the environment folder. > I fixed all the problem by initializing the project inside the environment > used for Django. > > Took me 3 days to figure out what was the problem. > Hope you could figure out how to fix that soon. > Cheers > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f0794dab-736d-43a3-8b93-2ac69178e7bf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: I'm new to programming, I don't know where consider as "document root of web server"
for your case, site1 and site2 are two isolate webserver, correct? Will all the files under both of these directories open to public once the server is up and running? Is the article from the tutorial suggest to have .py files store in some other place to avoid it being see by visitors online? So the framework could just import scripts from designated place through PYTHONPATH even when the scripts are not placed within site1 or site2? Thank you for such a quick response especially to my extremely novice question. I hope I would learn a lot from this community, thank you very much Lachlan Musicman於 2016年4月27日星期三 UTC-7下午6時57分26秒寫道: > > Mie, > > Traditionally the document root to your webserver is (depending on your > system) /var/www. > > This will be defined in the webserver (apache2/httpd, nginx, etc) > configuration. > > I normally create a folder in my home dir called www and place my sites > within that > > /home/lachlan/www/site1 > /home/lachlan/www/site2 > > At a later point, you will need to set up your webserver to read from that > directory. > > > > Cheers > L. > > -- > The most dangerous phrase in the language is, "We've always done it this > way." > > - Grace Hopper > > On 28 April 2016 at 11:25, Mie Rex > > wrote: > >> Hello everyone, I am new to Django and quite new to Python as well. >> >> I came across this advice while I'm going through the Django tutorial here >> https://docs.djangoproject.com/en/1.9/intro/tutorial01/ >> >> It mentioned "It’s not a good idea to put any of this Python code within >> your Web server’s document root..." >> My very newbie question is: what's document root of web server? >> I have no knowledge in building a web site so please forgive my very >> shallow question. >> Cheers >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users...@googlegroups.com . >> To post to this group, send email to django...@googlegroups.com >> . >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/0d8833ce-1623-4811-836a-d82a1cc39ee9%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/0d8833ce-1623-4811-836a-d82a1cc39ee9%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9f33413c-5f4c-42c3-9d87-b4ac494f6508%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: New to Django (stuck at the end of the tutorial)
> > I had a smiliar problem with another Django tutorial. > I was running Django with Anaconda environment and I took the advice from "Two Scoop Django" to have all projects stored in one directory and all the environment in another. Therefore the project "mysite" was initialized and put in a folder, which was parallel to the environment folder. I fixed all the problem by initializing the project inside the environment used for Django. Took me 3 days to figure out what was the problem. Hope you could figure out how to fix that soon. Cheers -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/21ed70ea-9cf1-4b66-84e9-9d519d69b467%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: User Created Objects (models)
Thanks for the link. I'm spent a good part of the day trying to figure it out to no avail. My next approach was to describe how I walked through it and see where I went wrong. I went into my models.py from django.db import models from django.core.urlresolvers import reverse from datetime import * from django.forms import ModelForm # Create your models here. class Ride(models.Model): title = models.CharField(max_length=255) speed = models.CharField(max_length=255) discipline = models.CharField(max_length=255) slug = models.SlugField(unique=True, max_length=255) description = models.CharField(max_length=255) scheduletime = models.DateTimeField('date published') lat = models.FloatField(blank=True, null=True) lon = models.FloatField(blank=True, null=True) published = models.BooleanField(default=True) created = models.DateTimeField(auto_now_add=True) class Meta: ordering = ['-created'] def __unicode__(self): return u'%s' % self.title def get_absolute_url(self): return reverse('blog.views.post', args=[self.slug]) class RideForm(ModelForm): class Meta: model = Ride fields = ('title', 'speed', 'discipline', 'description', 'scheduletime', 'lat', 'lon') I became really confused after this point. It is unclear to me how I cause a html site to produce a request and for it to make its way to this model. *Approach #2* I tried to solve this another way. I looked at the polls-tutorial which I have done before. I tried to replicate their vote function in views.py. The challenge that I found was that I struggled to make a unique object on the response of the program. Does anyone have any tips for making this happen. Thanks On Monday, October 21, 2013 2:55:33 AM UTC-7, Daniel Roseman wrote: > > On Monday, 21 October 2013 01:24:22 UTC+1, Ideo Rex wrote: > >> Hello, >> I'm relatively new to Django. So I have a working (local) web >> application. I can create new model objects from the admin site, but I >> would like my users to be able to create their own objects and save them to >> the database. I'm really confused on the over arching process on how this >> is down and I would appreciate it if someone could lead me in the correct >> direction. >> >> I want to allow my users: >> 1. fill in information on a page >> 2. submit this page to the database >> 3. redirect them to a page that reflects their input ("You successfully >> submitted this {{title}}") >> >> Thanks >> > > > This is indeed a very simple request. And it is fully covered in the > documentation about forms: see > https://docs.djangoproject.com/en/1.5/topics/forms/ for an introduction, > and https://docs.djangoproject.com/en/1.5/topics/forms/modelforms/ for > the specifics about saving form data to a model instance. > > (The other answer to this question, from Sergiy, seems to have completely > missed the point with his link to the auth docs, unfortunately.) > -- > DR. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3110176c-ce5f-4b6e-bb78-b456423a78b6%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
User Created Objects (models)
Hello, I'm relatively new to Django. So I have a working (local) web application. I can create new model objects from the admin site, but I would like my users to be able to create their own objects and save them to the database. I'm really confused on the over arching process on how this is down and I would appreciate it if someone could lead me in the correct direction. I want to allow my users: 1. fill in information on a page 2. submit this page to the database 3. redirect them to a page that reflects their input ("You successfully submitted this {{title}}") Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a13ae0e4-ca48-4908-869c-d22589361032%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Using an external Server to serve Static files - Development Server
{% load staticfiles %} This is just for my css file (there are other categories under lifestream. server: https://my.site.com/DJStatic/static/livestream/css/style.css On Wednesday, August 21, 2013 6:18:37 PM UTC-7, Nikolas Stevenson-Molnar wrote: > > That should work... how are you referencing your static files from your > templates? > > _Nik > > On 8/21/2013 6:09 PM, Ideo Rex wrote: > > Hello, > > I have a different request that I couldn't find anywhere else on the > > internet. I'm an intern who has built a Django Web Application for my > > project (basically a large experiment). The cite will never leave > > development, but I'm holding my static files and templates on another > > server. I want Django to look for static files on this website. > > > > Currently my project is 'livestream', in livestream there are two sub > > directories: 'templates' & 'static' > > On my server I have https://my.site.com/DJStatic/ - inside of DJStatic > > are two sub directories: 'templates' & 'static' > > > > How do I tell django to look in the server for the static files rather > > than the local directory? > > > > > > Tests: > > I have removed the local static files and set STATIC_URL : > > https://my.site.com/DJStatic/static/, but it doesn't work this way. > > Any Ideas on how to fix this? > > > > Thanks > > -- > > You received this message because you are subscribed to the Google > > Groups "Django users" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to django-users...@googlegroups.com . > > To post to this group, send email to > > django...@googlegroups.com. > > > Visit this group at http://groups.google.com/group/django-users. > > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.
Using an external Server to serve Static files - Development Server
Hello, I have a different request that I couldn't find anywhere else on the internet. I'm an intern who has built a Django Web Application for my project (basically a large experiment). The cite will never leave development, but I'm holding my static files and templates on another server. I want Django to look for static files on this website. Currently my project is 'livestream', in livestream there are two sub directories: 'templates' & 'static' On my server I have https://my.site.com/DJStatic/ - inside of DJStatic are two sub directories: 'templates' & 'static' How do I tell django to look in the server for the static files rather than the local directory? Tests: I have removed the local static files and set STATIC_URL : https://my.site.com/DJStatic/static/, but it doesn't work this way. Any Ideas on how to fix this? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.
Inspect a Model in Django
Hi All, I am using Django 1.1, say I have a model like: class MyModel(Model): someField = CharField(max_length=32) if I have another class that receives an instance of the model, can I read the max_length there? class Hypothetical_form (forms.Form): def __init__(self, model_instance): self.someField = forms.CharField(label = u'Some Label', widget = forms.TextInput(attrs={'size': this.magicalGetSize(model_instance,'someField')})) def magicalGetSize(instance, fieldname): return some_how_find_the_max_length(instance, fieldname) this will give me the ability to keep my db and forms sync. Thank you for any help Rex disclaimer: I know about ModelForm and all that, but I want to see if there is a way to inspect a Model's meta data and field options. I found functions like get_field_by_name() but they are not in the django documentation. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Finding a Django expert to review my code
I just created my first Django site (as an academic research project). Now that it is done, I would like to get feedback on my code from a Django expert so that I can learn where I can improve as a Django dev. How can I find someone to spend 1 or 2 hours reviewing my code with me? I found a few employment posting websites, but they seemed more geared toward posting jobs or large freelance projects, not something small like this. Thanks, Rex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
How do I display custom error messages to users?
There are situations on my site where I'd like to show the a page telling them what they did wrong: their browser doesn't support cookies, they erroneously try to re-submit a form, and so on. However, I want to be notified by email whenever a user encounters one of these errors, since I want to monitor that these errors don't happen too frequently. I see two options for doing this: (1) Throw a 404/500 error whenever this occurs, and include a custom error message in the template (e.g. "You weren't supposed to resubmit the form."). I already have email error reporting turned on. However, it doesn't look like there's built-in support for passing custom strings to 404/500 templates (although I think I could just stick it somewhere in the request object, which I can pass to the 404/500 template). (2) Instead of throwing an error, just write a function called report_error that emails an alert to the admin, like this: report_error('ad...@mysite.com', request) And then render a template to the user: render_to_response('my_error_page.html', 'you weren't supposed to resubmit the form') Is there a better way of doing this? What is the best practice? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
PyDev users: how do you manage tabs?
Kind of a petty question: I've been using PyDev to do my Django work and find it to be great. However, my only gripe is that it's hard to keep track of tabs, since they display only the (non-qualified) file name, which is a problem given Django's very regular naming scheme. So for example I'll often have 4+ tabs that are all named "views.py", and I have to mouse over each to find which one is the one I'm looking for. For those of you who use PyDev, have you found this to be an issue as well? Are there any solutions, like a plugin that adds the parent directory name to the tab? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Question about ForeignKeys and subclasses
Hello, I have a question that is best illustrated by the following fictional example. (I put my question at the end.) #= # In models.py class Room(models.Model): animal = models.ForeignKey(Animal) class Animal(models.Model): #[...] class Duck(Animal): #[...] # In views.py my_duck = Duck() #[...] my_room = Room(animal=my_duck) #[...] # QUESTION: What should the following expression return? isinstance(my_room.animal, Duck) #= Django appears to return False. Accordingly, I get an error when I try to call the quack() method on my_room.animal, since that method is defined for Ducks but not for Animals. I am running into a situation where I would like to call the quack() method if the room's animal is an instance of Duck. Is there some way to do this? Regards, Rex --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Email error reporting not working
Hi, I am having trouble getting error reporting via email to work (as described here http://docs.djangoproject.com/en/dev/howto/error-reporting/ ). When I hit a 500 error, no email reaches the admin's inbox. Here is what I have done: - I set DEBUG to False - I defined an Admin user and entered my email address - I ensured that Postfix is installed and running Is there anything else I need to do? I will gladly provide any extra information to troubleshoot this. Rex --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Fixed: Why does form.is_valid() throw ValueError?
On May 23, 1:40 am, Daniel Roseman wrote: > On May 23, 5:07 am, Rex wrote: > > On May 22, 4:33 pm, "R. Gorman" wrote: > > > On May 21, 10:48 pm, Rex wrote: > > > > > I have the following code in a view, where UserSurveyForm is a > > > > ModelForm. > > > > > f = UserSurveyForm(request.POST, instance=thisuser) > > > > if f.is_valid(): > > > > [...] > > > > > When I try submitting valid data, this works fine. However, when I > > > > submit an incomplete form, I get the following traceback: > > > > > [...] > > > > 50. if f.is_valid(): > > > > File "/usr/lib/python2.5/site-packages/django/forms/models.py" in save > > > > 319. return save_instance(self, self.instance, > > > > self._meta.fields, fail_message, commit) > > > > File "/usr/lib/python2.5/site-packages/django/forms/models.py" in > > > > save_instance > > > > 42. " validate." % (opts.object_name, > > > > fail_message)) > > > > > Exception Type: ValueError at /games/pd/survey/ > > > > Exception Value: The User could not be changed because the data didn't > > > > validate. > > > > > Based on the documentation I've read, I thought that is_valid() should > > > > just return False if the form doesn't validate, instead of throwing an > > > > error. Any information on this? > > > > > Thanks! > > > Thanks for the reply. It is that very "f.is_valid()" line that causes > > the error, as indicated by the stack trace. (The next line is an > > HttpResponse("foo").) > > > Is the above stack trace expected? The is_valid method appears cause > > save() to be called. Is the issue (1) that save() isn't supposed to > > throw a ValueError, or (2) that save() should not be called in the > > first place? > > is_valid() should definitely not cause save() to be called. Can you > post the code of your form? Maybe you have something weird in one of > the clean methods. > -- > DR. I tried debugging the line "if f.is_valid():" a little more. It turns out that the problem was not caused by the is_valid() method; it was caused by evaluating the UserSurveyForm instance f (although I'm not sure why). I didn't make any changes to my code. Instead, I deleted and re-created the table corresponding to the User model (on which UserSurveyForm was based), and now everything works correctly. Thanks for all the valuable help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Why does form.is_valid() throw ValueError?
On May 22, 4:33 pm, "R. Gorman" wrote: > You are correct in your understand that .is_valid() returns False if > the data is invalid. Are you sure you are not processing data > irrespective of whether the data validated or not? A little more > detail on how your processing your data might provide some insight. > > R. > > On May 21, 10:48 pm, Rex wrote: > > > > > I have the following code in a view, where UserSurveyForm is a > > ModelForm. > > > f = UserSurveyForm(request.POST, instance=thisuser) > > if f.is_valid(): > > [...] > > > When I try submitting valid data, this works fine. However, when I > > submit an incomplete form, I get the following traceback: > > > [...] > > 50. if f.is_valid(): > > File "/usr/lib/python2.5/site-packages/django/forms/models.py" in save > > 319. return save_instance(self, self.instance, > > self._meta.fields, fail_message, commit) > > File "/usr/lib/python2.5/site-packages/django/forms/models.py" in > > save_instance > > 42. " validate." % (opts.object_name, > > fail_message)) > > > Exception Type: ValueError at /games/pd/survey/ > > Exception Value: The User could not be changed because the data didn't > > validate. > > > Based on the documentation I've read, I thought that is_valid() should > > just return False if the form doesn't validate, instead of throwing an > > error. Any information on this? > > > Thanks! Thanks for the reply. It is that very "f.is_valid()" line that causes the error, as indicated by the stack trace. (The next line is an HttpResponse("foo").) Is the above stack trace expected? The is_valid method appears cause save() to be called. Is the issue (1) that save() isn't supposed to throw a ValueError, or (2) that save() should not be called in the first place? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Why does form.is_valid() throw ValueError?
I have the following code in a view, where UserSurveyForm is a ModelForm. f = UserSurveyForm(request.POST, instance=thisuser) if f.is_valid(): [...] When I try submitting valid data, this works fine. However, when I submit an incomplete form, I get the following traceback: [...] 50. if f.is_valid(): File "/usr/lib/python2.5/site-packages/django/forms/models.py" in save 319. return save_instance(self, self.instance, self._meta.fields, fail_message, commit) File "/usr/lib/python2.5/site-packages/django/forms/models.py" in save_instance 42. " validate." % (opts.object_name, fail_message)) Exception Type: ValueError at /games/pd/survey/ Exception Value: The User could not be changed because the data didn't validate. Based on the documentation I've read, I thought that is_valid() should just return False if the form doesn't validate, instead of throwing an error. Any information on this? Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Loading a filter module for all templates: possible?
I have a module called myfilters.py that contains my custom filters. Is there some way around putting the command "{% load myfilters %}" in every template I want to use a custom filter in? I tried putting the load command in a base template, but templates that inherit from this one don't appear to inherit the filters that get loaded. Is this correct? Thanks, Rex --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Can the admin site link foreign keys?
Let's say I've got two models: User, and Country. Each user is from one country, and each country has multiple users. so the User model contains a ForeignKey for a Country object. Can I do either of the following through the Django admin web interface? (1) When I'm looking at the list of Users, have the "country" column contain a hyperlink that takes me to that particular Country object. (2) When I'm looking at a Country object, show the set of all users that have a ForeignKey to this Country, along with a hyperlink to those User objects. Any tips would be appreciated. Thanks, Rex --~--~-~--~~~---~--~~ 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: Blocking multiple form submissions from the same IP address
On Apr 26, 6:58 pm, Will Hardy wrote: > I would allow the multiple submissions, but make a note of any IP > addresses to let you exclude the data in the analysis stage. From > memory the following "meta" variables might be relevant: > HTTP_CLIENT_IP, REMOTE_ADDR, HTTP_X_FORWARDED_FOR comma separated) > > Although I don't know who your users are, people behind a firewall > will have the same IP, so will people who switch browsers or close > cookie-cleaning browsers to complete the survey at another time. Plus > by doing it this way, you may be able to stop the more determined > participants, who would try methods you wouldn't be able to detect if > they knew that their data weren't being accepted. > > If this is a more scientific survey, doing it this way helps you show > that the data are valid (you can say in your report that X > participants had the same IP address and have therefore been > excluded). > > Cheers, > > Will Thanks Will and Malcolm for the answers. That is just what I was looking for. It works great. Best, Rex --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Blocking multiple form submissions from the same IP address
On my Django site, I have an HTML form survey split across a few consecutive pages. I want to make sure that if a user gets to the last page and clicks "submit", they can't go back to the first page of the form and repeat the whole process. (I know it is impossible to stop determined users from circumventing whatever measures I put in place, but I want to deter casual users from doing so.) I currently do this by setting a "has_submitted" cookie through request.session. However, I'd like to experiment with doing something similar based on IP address, so that I block off users from IP addresses that have already submitted the survey. What modules/ functions would I use to do this? Thanks, Rex --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
FIXED: Can't run django on Apache
On Mar 14, 7:52 pm, Rex wrote: > On Mar 4, 12:47 pm, John Maines wrote: > > > > > Hello: > > > I've installed Django 1.0 on Ubuntu and am trying to get it to run on > >Apache.Apacheis installed, working fine, with mod-python also in > > place. I'm new at everything Linux. > > > But when I try to run my app (a test blog),Apachegives an > > ImportError message (below) I have come across NUMEROUS references to > > this error message, and the solution usually seems to involve changing > > the Python Path. But nothing I try seems to work. I've tried using / > > user/local for a path, /var/www; the path to my app. Nothing works. > > Any suggestions? > > > MOD_PYTHON ERROR > > > ProcessId: 9980 > > Interpreter: 'mysite' > > > ServerName: 'ubuntu.ubuntu-domain' > > DocumentRoot: '/var/www/' > > > URI: '/mysite' > > Location: '/' > > Directory: None > > Filename: '/var/www/mysite' > > PathInfo: '' > > > Phase: 'PythonHandler' > > Handler: 'django.core.handlers.modpython' > > > Traceback (most recent call last): > > [snip] > > ImportError: Could not import settings 'settings' (Is it on sys.path? > > Does it have syntax errors?): No module named settings > > I'm having the same issue as the OP. Each time I go to mysite.com/ > myapp,Apacheseems to look for a file called /var/www/myapp, instead > of launching the Django project I attempt to specify in my > directive. > > I have a project called "mturk". I want to run it on from mysite.com/ > myapp. Based on the answers to the OP's questions, it seems like I > should be putting something like this in one of my configuration > files: > > > SetHandler python-program > PythonHandler django.core.handlers.modpython > SetEnv DJANGO_SETTINGS_MODULE mysite.settings > PythonOption django.root /home/rex/django/mturk > PythonDebug On > PythonPath "['/home/rex/django/mturk'] + sys.path" > > > Some sources say this snippet should go in /etc/apache2/httpd.conf, > and some sources say it should go in /etc/apache2/sites-enabled/000- > default. Which should I go with? Also, I read somewhere that I should > change my DocumentRoot to the path to the Django project, but wouldn't > that expose my database and my Python source? > > Thanks, > > Rex It turns out the problem was my PythonPath directive -- whereas I had it set to contain the project directory, /home/rex/django/mturk, I needed to set it to the parent directory, /home/rex/django. It works now. --~--~-~--~~~---~--~~ 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: Can't run django on Apache
On Mar 4, 12:47 pm, John Maines wrote: > Hello: > > I've installed Django 1.0 on Ubuntu and am trying to get it to run on > Apache. Apache is installed, working fine, with mod-python also in > place. I'm new at everything Linux. > > But when I try to run my app (a test blog), Apache gives an > ImportError message (below) I have come across NUMEROUS references to > this error message, and the solution usually seems to involve changing > the Python Path. But nothing I try seems to work. I've tried using / > user/local for a path, /var/www; the path to my app. Nothing works. > Any suggestions? > > MOD_PYTHON ERROR > > ProcessId: 9980 > Interpreter: 'mysite' > > ServerName: 'ubuntu.ubuntu-domain' > DocumentRoot: '/var/www/' > > URI: '/mysite' > Location: '/' > Directory: None > Filename: '/var/www/mysite' > PathInfo: '' > > Phase: 'PythonHandler' > Handler: 'django.core.handlers.modpython' > > Traceback (most recent call last): > [snip] > ImportError: Could not import settings 'settings' (Is it on sys.path? > Does it have syntax errors?): No module named settings I'm having the same issue as the OP. Each time I go to mysite.com/ myapp, Apache seems to look for a file called /var/www/myapp, instead of launching the Django project I attempt to specify in my directive. I have a project called "mturk". I want to run it on from mysite.com/ myapp. Based on the answers to the OP's questions, it seems like I should be putting something like this in one of my configuration files: SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonOption django.root /home/rex/django/mturk PythonDebug On PythonPath "['/home/rex/django/mturk'] + sys.path" Some sources say this snippet should go in /etc/apache2/httpd.conf, and some sources say it should go in /etc/apache2/sites-enabled/000- default. Which should I go with? Also, I read somewhere that I should change my DocumentRoot to the path to the Django project, but wouldn't that expose my database and my Python source? Thanks, Rex --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Moving a Django project to another directory/server
I'd like to use a revision control system to keep up to 3 versions of my Django project: - A production version, which will be running on a remote Linux server - A test version, which will be running on the same remote server for my colleagues to test out before I make it public - (Possibly) a local development version on my machine. So far I have been planning to use Bazaar for version control. I am wondering the following: - How can I simultaneously run two versions of the same project on the same machine? I am primarily concerned about PYTHONPATH conflicts, since both projects would have the same name (unless there's an easy workaround). - Is copying a Django project to another machine/directory simply a matter of transferring the project's directory to the desired location, or does some other work have to be done first too? Thanks, Rex --~--~-~--~~~---~--~~ 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 are request.session assignments persisted?
On Mar 7, 5:12 pm, Malcolm Tredinnick wrote: > Sure, "request" is a local variable, but since Python uses > pass-by-reference, it is a reference to an object that is also > referenced by other variables in other scopes (including the session > middleware). > > So by assigning to request.session, all the other variables referring to > that object will see the updates. > > Cheers, > Malcolm Thanks for the helpful reply, Malcolm! It makes perfect sense now. Cheers, Rex --~--~-~--~~~---~--~~ 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 are request.session assignments persisted?
I'm reading the documentation on sessions (http:// docs.djangoproject.com/en/dev/topics/http/sessions/?from=olddocs) and saw the following example: def post_comment(request, new_comment): if request.session.get('has_commented', False): return HttpResponse("You've already commented.") c = comments.Comment(comment=new_comment) c.save() request.session['has_commented'] = True return HttpResponse('Thanks for your comment!') "request" seems to be a local variable, so I would think that setting request.session['has_commented'] = True would have no effect, since that variable is not used again (e.g. not returned by the function). Does assigning a value in the request.session dictionary somehow send a cookie to the user's browser? I tested whether I could store a value in request.session in one view function and retrieve it in a subsequent view function, and that didn't work for me, as I had expected. Could somebody shed some light on this? --~--~-~--~~~---~--~~ 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-admin.py not working on Vista
On Jan 9, 11:51 pm, "Karen Tracey" wrote: > On Fri, Jan 9, 2009 at 10:55 PM, Rex wrote: > ... > > I Googled around, and the only thing I found was this comment: > > > "you have to change the file association from (cant remember) to "%1″ > > %* and it should work" > > Source: > >http://i.justrealized.com/2008/04/08/how-to-install-python-and-django... > > > Does anyone understand what this means? > > I do, but I don't have Vista so I can't give you step-by-step instructions > for changing the file associations there. On earlier levels you would do > something like Start->Settings->Control Panel->Folder Options, then select > "File Types" tab, then find .py in the list, click "Advanced" button, select > the "open" action and click the "Edit" button, and put that "%1″ %* string > at the end replacing whatever follows the actual "c:\path\to\python.exe". I > have no idea if the procedure under Vista is similar or substantially > different. > > Karen Thanks Karen. Unfortunately, those instructions don't seem to apply to Vista. I also tried poking around in Control Panel > Default Programs, but nothing is turning up there either. Does anyone know how this is done on Vista? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
django-admin.py not working on Vista
I installed Django on my Vista box. Using the Windows command shell, I go to the site-packages/django/bin directory and here's what I get when I type various commands: > django-admin.py help Type 'django-admin.py help' for usage. > python django-admin.py help [This gives me the proper help instructions] Why is it only giving me the correct output when I prepend "python"? This is a problem because when I'm in a different folder (such as my Django projects folder), I can't type "python django-admin.py", since that will not look in different Path directories for the file django- admin.py. However, typing "django-admin.py help" in any other directory gives me the same output as above. I Googled around, and the only thing I found was this comment: "you have to change the file association from (cant remember) to “%1″ %* and it should work" Source: http://i.justrealized.com/2008/04/08/how-to-install-python-and-django-in-windows-vista/#comment-329 Does anyone understand what this means? --~--~-~--~~~---~--~~ 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: urlpatterns and generic views cheatsheet
Tim Chase <[EMAIL PROTECTED]> [2008-08-25 08:43]: > >> It's not terribly obvious from the scribd layout, but at the >> top (above the document) there's a "download" link or similar, >> and there you can download the original PDF. > >...which expects that I create login... Copy & paste doesn't work. Trying to email it to myself results in nothing happening. >Given that the source is likely just a PDF, posting a link to it >somewhere is a lot less painful than using Scribd. It's like >they (Scribd) asked the question "how can we best come between >site-visitors and the content our users want visitors to view?" >resulting in this solution. It's not like they're charging for >the content (AFAIK) so forcing me to create a login fails to net >them anything but useless marketing data, a plonk in my >cookie-jar, and a seething user that will now decry them at any >convenient opportunity. Exactly my thoughts. This company has a solution to a non-existent problem. >From the FAQ: My account has been suspended/terminated for abuse! Will I get access to my documents? All documents belonging to users that we have terminated for abuse are deleted at the point of termination. Scribd will not provide backups or access to these deleted documents. How does Scribd define "abuse?" Abuse is any activity that detracts from Scribd, or Scribd's community. IOW, your documents may vanish at the whim of Scribd, and they cannot be recovered. -rex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django-survey fails with beta-1
[EMAIL PROTECTED] <[EMAIL PROTECTED]> [2008-08-20 17:49]: > >On Aug 20, 2:58 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> >wrote: >> If you like, you can >> put it on another field in the model, just not an ImageField or >> FileField. > > >Oops. Bad advice. With newforms-admin, core isn't needed or used >anymore at all. But the first part of your post was good advice, and thanks to it, I got Django-survey running. I commented out the problematic image code in the file that was causing the problem, and also in forms.py, and it works. Thank you much for your help. Now if I can just understand the level of abstraction... -rex -- I ain't goin' to buy my kids an encyclopedia. Let them walk to school the way I did. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Django-survey fails with beta-1
Running Debian Lenny, I uninstalled Django 0.96-2, installed Django beta 1, and downloaded Django-survey. The result of running it is below. Any help appreciated, thanks. -rex XXX:~/djcode/django-survey-read-only$ python examples/manage.py runserver Validating models... Unhandled exception in thread started by Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/django/core/management/commands/runserver.py", line 47, in inner_run self.validate(display_num_errors=True) File "/usr/lib/python2.5/site-packages/django/core/management/base.py", line 122, in validate num_errors = get_validation_errors(s, app) File "/usr/lib/python2.5/site-packages/django/core/management/validation.py", line 28, in get_validation_errors for (app_name, error) in get_app_errors().items(): File "/usr/lib/python2.5/site-packages/django/db/models/loading.py", line 128, in get_app_errors self._populate() File "/usr/lib/python2.5/site-packages/django/db/models/loading.py", line 57, in _populate self.load_app(app_name, True) File "/usr/lib/python2.5/site-packages/django/db/models/loading.py", line 72, in load_app mod = __import__(app_name, {}, {}, ['models']) File "/home/rex/djcode/django-survey-read-only/survey/models.py", line 159, in class Question(models.Model): File "/home/rex/djcode/django-survey-read-only/survey/models.py", line 172, in Question null=True, blank= True, core=False) File "/usr/lib/python2.5/site-packages/django/db/models/fields/files.py", line 283, in __init__ FileField.__init__(self, verbose_name, name, **kwargs) File "/usr/lib/python2.5/site-packages/django/db/models/fields/files.py", line 131, in __init__ raise TypeError("'%s' is not a valid argument for %s." % (arg, self.__class__)) TypeError: 'core' is not a valid argument for . --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Template help, gotta be simple
it *should* be in the view anyway??? it's logic... but it should be possible? Something like this would work... although.. it's hideously innefficient. {% for row in data %} {% for key,val in row.items %} {% for field in fields %} {% ifequal field key %} {{ key }}: {{ val }} {% endifequal %} {% endfor %} {% endfor %} {% endfor %} To iterate a dictionary by Key and Value in the template.. you need to iterate on .items :) - alex On Feb 3, 1:45 am, Ned Batchelder <[EMAIL PROTECTED]> wrote: > I'm not sure there's a way to do this purely in the template language. > You can munge the data in the view instead. This line creates a new > filtered_data list that has only the data you want to display: > > filtered_data = [ dict([ (k,d[k]) for k in fields ]) for d in data ] > > --Ned.http://nedbatchelder.com/blog > > > > Michael Hipp wrote: > > I'm trying to do something with a template that I thought would be very > > simple but I've not yet found a way to make it work at all. > > > from django.template import Template, Context > > fields = ("f1", "f3") > > data = [ > > {"f1": "Foo", "f2": "Skip ","f3": "Bar"}, > > {"f1": "Cat", "f2": "Ignore","f3": "Dog"}, > > {"f1": "Him", "f2": "Avoid ","f3": "Her"}, > > ] > > t = Template(""" > > {% for row in data %} > > {% for f in fields %} > > {{ row.f }} > > {% endfor %} > > {% endfor %} > > """) > > print t.render(Context({'fields': fields, 'data': data})) > > > I want to print out the data items row-by-row but skipping 'f2' since > > it's not listed in 'fields'. The above is how it seems like it ought to > > work, but it just ignores me. Lots of other crazy permutations didn't > > work either. > > > Can someone show me what (very simple) thing I'm missing? > > > Thanks, > > Michael > > -- > Ned Batchelder,http://nedbatchelder.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Creating dynamically expanding forms
Hello, I'm trying to create an app that uses "dynamic" forms, where the number of fields can be increased and decreased by the user. It would be something like this: the form starts out with fields to input a mailing address. Then, when the user is finished adding that address, he has the option "Enter another address", and if he clicks on that button, a new set of fields is created, and which the a user can fill out the new address, and can keep adding new addresses until he feels he is finished. What is the easiest way to do this in Django? Thanks, Rex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: (Newbie) TemplateSyntaxError in admin panel
Hi, Is there any solution to the below described problem? I still haven't been able to get it to work. Best, Rex On Dec 20, 3:11 am, Rex Eastbourne <[EMAIL PROTECTED]> wrote: > Hello, > > I'm going through the Django tutorial for Django 0.9.6 on Windows > Vista. Everything is going smoothly, and I'm following the tutorial to > a T; except when I'm in my admin site (step 2 of the tutorial), > clicking any of the links (Groups/Users/Sites/Polls), I get a > TemplateSyntaxError, appended below. Any ideas on how to fix this? The > only thing I did outside of the tutorial instructions was to follow > the fix described here because of an apparent flaw with > 0.96.:http://forums.devshed.com/showpost.php?p=1856484&postcount=2 > > Thanks! > > Rex > > === > TemplateSyntaxError at /admin/polls/poll/ > Invalid arguments to 'cycle': ['cycle', "'row1'", "'row2'"] > Request Method: GET > Request URL:http://127.0.0.1:8000/admin/polls/poll/ > Exception Type: TemplateSyntaxError > Exception Value:Invalid arguments to 'cycle': ['cycle', "'row1'", > "'row2'"] > Exception Location: C:\Python25\lib\site-packages\django\template > \defaulttags.py in cycle, line 434 > Template error > > In template C:\Python25\lib\site-packages\django\contrib\admin > \templates\admin/change_list_results.html, error at line 13 > Invalid arguments to 'cycle': ['cycle', "'row1'", "'row2'"] > 3 > 4 > 5 {% for header in result_headers %} > 6 {% if header.sortable %}{% endif %} > 7 {{ header.text|capfirst }} > 8 {% if header.sortable %}{% endif %}{% endfor %} > 9 > 10 > 11 > 12 {% for result in results %} > 13 {% for item in result %} > {{ item }}{% endfor %} > 14 {% endfor %} > 15 > 16 > 17 {% endif %} > 18 > === --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Installing mod_python in xampp
Thanks to both of you! I got it working. I also checked out InstantDjango; reminds me of InstantRails, which I liked. Rex On Dec 19, 10:03 pm, cjl <[EMAIL PROTECTED]> wrote: > Rex: > > You might want to check out my stupid little project: > > http://www.instantdjango.com > > It's a portable and standalone Django development environment for > Windows. It uses the built in Django development server, and sqlite as > the database backend. > > It's due for some updates and bugfixes, and I really need to finish > the second chapter of the tutorial, but it should work for you, unless > you really need apache, mod_python, and a full database. > > -CJL > > On Dec 19, 8:43 pm, Rex Eastbourne <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I am new to web development (but not to programming) and am interested > > in trying out Django. What is the easiest way to get started? I have > > xampp working, but I'm running into a roadblock getting the mod_python > > add-on installed. I have seen the following instructions: > > >http://addons.xampp.org/project/3.html > > > But I'm still unsure about where to place the files in the 'lampp' > > folder. > > > Any advice? > > > Thank you, > > > Rex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
(Newbie) TemplateSyntaxError in admin panel
Hello, I'm going through the Django tutorial for Django 0.9.6 on Windows Vista. Everything is going smoothly, and I'm following the tutorial to a T; except when I'm in my admin site (step 2 of the tutorial), clicking any of the links (Groups/Users/Sites/Polls), I get a TemplateSyntaxError, appended below. Any ideas on how to fix this? The only thing I did outside of the tutorial instructions was to follow the fix described here because of an apparent flaw with 0.96.: http://forums.devshed.com/showpost.php?p=1856484&postcount=2 Thanks! Rex === TemplateSyntaxError at /admin/polls/poll/ Invalid arguments to 'cycle': ['cycle', "'row1'", "'row2'"] Request Method: GET Request URL:http://127.0.0.1:8000/admin/polls/poll/ Exception Type: TemplateSyntaxError Exception Value:Invalid arguments to 'cycle': ['cycle', "'row1'", "'row2'"] Exception Location: C:\Python25\lib\site-packages\django\template \defaulttags.py in cycle, line 434 Template error In template C:\Python25\lib\site-packages\django\contrib\admin \templates\admin/change_list_results.html, error at line 13 Invalid arguments to 'cycle': ['cycle', "'row1'", "'row2'"] 3 4 5 {% for header in result_headers %} 6 {% if header.sortable %}{% endif %} 7 {{ header.text|capfirst }} 8 {% if header.sortable %}{% endif %}{% endfor %} 9 10 11 12 {% for result in results %} 13 {% for item in result %} {{ item }}{% endfor %} 14 {% endfor %} 15 16 17 {% endif %} 18 === --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Installing mod_python in xampp
Hello, I am new to web development (but not to programming) and am interested in trying out Django. What is the easiest way to get started? I have xampp working, but I'm running into a roadblock getting the mod_python add-on installed. I have seen the following instructions: http://addons.xampp.org/project/3.html But I'm still unsure about where to place the files in the 'lampp' folder. Any advice? Thank you, Rex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django deployment à lá Capistrano
Hello. I'd be interested in helping with writing a Capistrano replacement for Django in python (not a port!). I'm relatively new to django sites, but quite an old hand at python. Regarding names... surely this is the least important part of a project like this :) My 2c though: dojango! That's what it's doing.. it's doing my django site... so i don't have to stuff around in an ssh session for 100 years to get the thing working :) Flame away. Alex Ps: Chris: estas en españa? verdad? On Sep 10, 3:05 am, qwerty <[EMAIL PROTECTED]> wrote: > Well, I'm interesed in the project and as first idea from the bainstrom is > the name: Capistrano's url ishttp://www.capify.org/, why can we call it > capipy, the py at the end is a clasic (tm) of projects coded in Python. > > Another good idea is to review the concept of the tool to draw what it > should and what it should not do: > > "automating django's deployment tasks" sounds like a good start for me. > > -- > Angel > > 2007/9/8, Chris Hoeppner <[EMAIL PROTECTED]>: > > > > > Hi there, > > > This is just to make it a bit more obvious. I've decided to make up a > > python application similar to Capistrano, for Django. > > > I plan it to be similar in the sense of "it uses the same goal, and a > > few same ideas", and it's not going to be a port of Capistrano to > > Python. > > > I've called this project Djangostrano, though I'll come up with a better > > name before the folks at 37signals run storms of fury on me :) > > > If anyone has done some steps in this direction, please let me know, as > > we could join forces. Also, if anyone is *interested* in contributing a > > bit, don't hesitate to contact me. > > > A few fundamental guidelines lay already, but I'm still in the > > brainstorming stage. This is the right stage for anyone to join me. > > > I'll be glad to hear from you. > > -- > > > Saludos, > > > Chris Hoeppner, > > Passionate about on-line interaction > > 627 471 720 > > [EMAIL PROTECTED] > > www.pixware.org > > > -BEGIN PGP SIGNATURE- > > Version: GnuPG v1.4.6 (GNU/Linux) > > > iD8DBQBG4uAdSyMaQ2t7ZwcRAt1NAKDMwg2Pt4PNNO3E3WcxGCJ7T82QAgCgx+25 > > hUzCBlmfaOU4xpcEIO67b2g= > > =T5O4 > > -END PGP SIGNATURE- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: License Terms
Thanks for the insight! Though I myself like to have new development open to the community, my client insists that he own the code, I have no choice. I wish to us django in a big way and delight him :) On Jan 7, 4:45 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 1/6/07, Rex <[EMAIL PROTECTED]> wrote: > > > Django will be delivered in terms of BSD license. But what about thee > > code we have written? Can we sell it with our own license?The only thing > > the Django license obligates you to do is keep the > Django copyright statement associated with Django. > > Any code you develop against Django is completely unaffected (the BSD > license is *not* viral and does not affect related code like the GPL > does). You are free to choose any license terms, fees, etc. you like. > > -- > "May the forces of evil become confused on the way to your house." > -- George Carlin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
License Terms
Hi, I understand the terms of the BSD license. One thing still eludes me: What if I want to develop a web application / enterprise application which I want to sell to a company. Does the license terms allow it? Django will be delivered in terms of BSD license. But what about thee code we have written? Can we sell it with our own license? regards, Prateek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---