how to deploy Django on the web server?
This has been driving me nuts for a month. I wanted to use a free web server to do development testing and have found : 000webhost.com and heliohost.com which apparently support Python, but what about Django? Do I install that myself? I have read the django book on deployment chapter but find it doesnt tell me what I want. Could someone please just tell me simply how I can get my scripts running on the webserver. justinjo...@googlemail.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: how to deploy Django on the web server?
thanks for the reply but I have access to a server for free so I wanted to set it up myself, how can it be so difficult? Django is renowned as an easy rapid development framework so why is it so difficult to deploy? On Fri, Aug 7, 2009 at 8:34 PM, lzantal wrote: > > > > On Aug 7, 12:06 pm, justin jools wrote: > > This has been driving me nuts for a month. > > > > I wanted to use a free web server to do development testing and have > > found : 000webhost.com and heliohost.com which apparently support > > Python, but what about Django? Do I install that myself? > > > > I have read the django book on deployment chapter but find it doesnt > > tell me what I want. > > > > Could someone please just tell me simply how I can get my scripts > > running on the webserver. > > > Try http://webfaction.com . > They have super easy install for django through their control panel > > hope that helps > > lzantal > http://twitter.com/lzantal > > > justinjo...@googlemail.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: how to deploy Django on the web server?
Yes Ive read these docs and I understand certain script changes are needed before running on the server but I want to know about: installing Django on the server, do i need to use telnet to do this? or can i upload already executed django directory from local server? On Fri, Aug 7, 2009 at 10:25 PM, Milan Andric wrote: > > > Justin, it's not. Have you seen the deployment docs? > > > http://docs.djangoproject.com/en/dev/howto/deployment/#howto-deployment-index > > -- > Milan > > On Aug 7, 1:56 pm, justin jools wrote: > > thanks for the reply but I have access to a server for free so I wanted > to > > set it up myself, how can it be so difficult? Django is renowned as an > easy > > rapid development framework so why is it so difficult to deploy? > > > > > > > > On Fri, Aug 7, 2009 at 8:34 PM, lzantal wrote: > > > > > On Aug 7, 12:06 pm, justin jools wrote: > > > > This has been driving me nuts for a month. > > > > > > I wanted to use a free web server to do development testing and have > > > > found : 000webhost.com and heliohost.com which apparently support > > > > Python, but what about Django? Do I install that myself? > > > > > > I have read the django book on deployment chapter but find it doesnt > > > > tell me what I want. > > > > > > Could someone please just tell me simply how I can get my scripts > > > > running on the webserver. > > > > > Tryhttp://webfaction.com. > > > They have super easy install for django through their control panel > > > > > hope that helps > > > > > lzantal > > >http://twitter.com/lzantal > > > > > > justinjo...@googlemail.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: how to deploy Django on the web server?
ok well thanks for your reply: first I have free access and they have told me python is installed but it's not working as I ran a hello world test script which doesbt execute. That is the first of my problems. My second problem is installing Django... and third configuring the django scripts to run as outlined in the django book, but I am stuck and the first and second hurdles... I have been looking for a web host server that does support but seems there isnt any.. python support is a paid for service. If you can offer any advice here its would be great. I guess the first thing i need to do is bug the administrator to get a Python test script running. On Fri, Aug 7, 2009 at 10:45 PM, Daniel Roseman wrote: > > On Aug 7, 9:56 pm, justin jools wrote: > > thanks for the reply but I have access to a server for free so I wanted > to > > set it up myself, how can it be so difficult? Django is renowned as an > easy > > rapid development framework so why is it so difficult to deploy? > > > You haven't said why you think it's difficult. The documentation is > clear, and most people here have found it fairly easy to deploy. What > has been your problem? Why has the Django book not told you want you > want? > -- > DR. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: how to deploy Django on the web server?
o thanks for that :) as soon as my administrator finally sorts out Python script executing for me - omg! ,I'll try that On Sat, Aug 8, 2009 at 6:43 PM, Larrik Jaerico wrote: > > I'll bet a lot of the mailing list will faint when they see this, but > I've gotten it to work pretty easily by just dropping the django > directory directly into my project directory. > > On Aug 8, 8:24 am, justin jools wrote: > > ok well thanks for your reply: > > > > first I have free access and they have told me python is installed but > it's > > not working as I ran a hello world test script which doesbt execute. That > is > > the first of my problems. > > > > My second problem is installing Django... > > > > and third configuring the django scripts to run as outlined in the django > > book, but I am stuck and the first and second hurdles... > > > > I have been looking for a web host server that does support but seems > there > > isnt any.. python support is a paid for service. > > > > > > > > If you can offer any advice here its would be great. I guess the first > thing > > i need to do is bug the administrator to get a Python test script > running. > > > > On Fri, Aug 7, 2009 at 10:45 PM, Daniel Roseman >wrote: > > > > > > > > > On Aug 7, 9:56 pm, justin jools wrote: > > > > thanks for the reply but I have access to a server for free so I > wanted > > > to > > > > set it up myself, how can it be so difficult? Django is renowned as > an > > > easy > > > > rapid development framework so why is it so difficult to deploy? > > > > > You haven't said why you think it's difficult. The documentation is > > > clear, and most people here have found it fairly easy to deploy. What > > > has been your problem? Why has the Django book not told you want you > > > want? > > > -- > > > DR. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
newbies Deployment docs
I hope this helps anyone starting, cos i learnt this the hard way! --- get your python path working: (scroll down to environment variables) http://www.voidspace.org.uk/python/articles/command_line.shtml#path --- django deployment: Apache, Python, Django, PostgreSQl - the whole shebang (helped me a lot) http://wiki.thinkhole.org/howto:django_on_windows%E2%80%8F --- p.s. !important when downloading mod_python make sure it matches your Python and Apache versions: e.g. mod_python-3.3.1.win32-py2.5-Apache2.2.exe if they dont match your LoadModule python_module wont work! hope this helps y'all ;) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Apache mod_wsgi Django setup - Forbidden You don't have permission to access /mysite on this server.
Ive been the install instructions in : http://wiki.thinkhole.org/howto:django_on_windows%E2%80%8F (with mod_wsgi) install python 26, Apache 2.2, modwsgi ap2.2 py26 and apache loads modwsgi fine. when I check localhost: apache says - It works! when I check 127.0.0.1:8000: Django says - It worked! but when i try to open the Django directory mysite: localhost/mysite i get : Forbidden You don't have permission to access /mysite on this server. I have re-installed and installed this many times but still the same thing. The tutorial says should get: It worked httpd.conf LoadModule wsgi_module modules/mod_wsgi.so WSGIScriptAlias / /usr/local/mysite/django.ws runs fine, as in: http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango could someone please help with 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 -~--~~~~--~~--~--~---
Google app engine patch translation : model_set.all doesnt work
It seems google app engine patch doesnt support _set.all. I have tried my original django only version and it works but with google app engine patch does not. my template code: {% for model in object.product_model_set.all %} {{ model.full_title }} {% endfor %} I dont how / what to replace _set.all with, if I set it to model.all it still does nothing. Thanks... here is my model: class Product_Model(db.Model): """ Model Details """ type = db.ReferenceProperty(Product_Make, required=True, collection_name='make_set') title = db.StringProperty(required=True) slug = db.StringProperty(required=True) derivative= db.StringProperty(required=True) released = db.DateProperty(auto_now_add = 1) picture = db.BlobProperty(default=None) review= db.TextProperty(required=True) genre = db.ReferenceProperty(Product_Type, required=True, collection_name='genre_set') def __unicode__(self): return '%s' % (self.title) class Meta: ordering = ('title',) @property def full_title(self): return '%s %s' % (self.title, self.type) @permalink def get_absolute_url(self): return ('model_detail_url', None, { 'slug': self.slug }) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
generic view list_detail: how do I pass id to another list? newbie help please!
generic view list_detail: how do I pass id to another list? (I'm using google app engine patch) Ive defined my first view as follows: def list_make(request): return object_list(request, Product_Make.all()) which works fine, now I want to pass the id selection to another list on a different table/model, like this: def list_model(request, key): return object_list(request, Product_Model.all()) but I dont know how to get/pass the id. my first list are makes: Audi, BMW, Ford in Product_Make so I select e.g. BMW and want to pass that id to look up BMW models in Product_Model, e.g. 300 series my models: class Product_Make(db.Model): """ Make model """ title = db.StringProperty(required=True, verbose_name='MakeTitle') slug = db.StringProperty(required=True) class Product_Model(db.Model): make = db.ReferenceProperty(Product_Make, required=True, collection_name='make_set') title = db.StringProperty(required=True, verbose_name='Model') slug = db.StringProperty(required=True) derivative= db.StringProperty(required=True) released = db.DateProperty(auto_now_add = 1) picture = db.BlobProperty(default=None) review= db.TextProperty(required=True) help please! thanks very much --~--~-~--~~~---~--~~ 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 can't I pass id/key to an object_list? please help
I'm trying to pass id/key from one list then filter the next. If I try: def show_make(request, key): return object_list(request, Product_Model.all(), key) I get: invalid literal for float(): agphZXAtc2FtcGxlchgLEhJteWFwcF9wcm9kdWN0X21ha2UYAQw N.B. the key is from google app but works the same as id. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
newbie help: how to list, list, detail
how can I show a list then pass the id to next list lookup then detail? basically I'm writing a car product database with make, type and model tables: so first list is Audi, BMW, Ford... the next list is e.g. Audi models: T100, Quattro, then last selection is detail. I used this view model and tried to change the Product.Make to lookup Product.Model but get 'kind error - is not a sub class of...' def list_make(request): return object_list(request, Product_Make.all()) (show_make called in template) def show_make(request, key): return object_detail(request, Product_Make.all(), key) : this is detail which works I tried to change to look up the model list, but get error: def show_make(request, key): return object_list(request, Product_Model.all(), key) my models look like this: class Product_Make(models.Model): """ Make model """ title = models.CharField(max_length=100) slug = models.SlugField(unique=True) class Product_Type(models.Model): """ Type model """ title = models.CharField(max_length=100) slug = models.SlugField(unique=True) class Product_Model(models.Model): """ Model model """ title = models.CharField(max_length=255) slug = models.SlugField(unique=True) derivative= models.CharField(blank=True, max_length=255) type = models.ForeignKey(Product_Type) released = models.DateField(blank=True, null=True) cover = models.ImageField(upload_to='media', blank=True) review= models.TextField(blank=True) genre = models.ManyToManyField(Product_Make, blank=True) Can anyone give an example of how to do a list, list, detail lookup. I've looked at many tutorials and books but can't figure it out. Many 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 -~--~~~~--~~--~--~---
Re: newbie help: how to list, list, detail
key is used in replacement of 'id' in Google app engine (patch) Essentially this doesnt matter, assume it is id in normal django. I would just like to know how to do a list, list, detail query. When I pass the id from first list to query a second list in a different table: i.e. first list/table is car make: Audi, BMW and second list/ table is Car Model: e.g. Audi: T100, Qauttro i get 'kind error - is not a sub class of...' My question is not about errors though, I would just like to know a method for doing list, list category drill down queries, as I cant find any examples. I guess another obvious example for a product database like this could be a grocery list: type: veg, meat/fish, alcohol: choice Alcohol. second list: whiskey, gin, vodka, beer: choice beer. third list: beer by brand. I think you get the idea. Thanks for your help. On Aug 22, 7:16 pm, Daniel Roseman wrote: > On Aug 22, 6:08 pm, justin jools wrote: > > > > > how can I show a list then pass the id to next list lookup then > > detail? > > > basically I'm writing a car product database with make, type and model > > tables: > > > so first list is Audi, BMW, Ford... the next list is e.g. Audi models: > > T100, Quattro, then last selection is detail. > > > I used this view model and tried to change the Product.Make to lookup > > Product.Model but get 'kind error - is not a sub class of...' > > > def list_make(request): > > return object_list(request, Product_Make.all()) > > > (show_make called in template) > > > def show_make(request, key): > > return object_detail(request, Product_Make.all(), key) : this is > > detail which works > > > I tried to change to look up the model list, but get error: > > > def show_make(request, key): > > return object_list(request, Product_Model.all(), key) > > But you haven't told us what 'key' is. Is it the ID of a make, or > what? > -- > DR. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Can anyone give a method/example for doing drill down category queries: list, list, list detail
Can anyone give a method/example for doing drill down category queries: list, list, list detail I'm writing car database. With make, type, model as seperate tables. model containing all the details. essentially 1st choice could be: make: Audi, BMW, Ford 2nd BMW: 200 series, 300 series... 3rd Detail I'm stuck with list, detail and cant work out how to add another list query after the first. Thanks for your 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: Django vs Joomla
The previous author is right Django is a framework to build systems and not an already built system like a Content Management System, like Joomla. If you do want a comparison you have to compare a Django built CMS like : http://www.django-cms.org/. I don't know the reasons for your comparison but having used most popular CMS systems: Wordpress, Joomla and Concrete 5: http://www.concrete5.org/ I can tell you that Concrete 5 is the easiest and quickest to setup for the user and developer. In comparison Joomla is a headache, a messy and hard to learn system. Just check out concrete 5 demo to see why: http://www.concrete5.org/ You should only really consider using Django CMS (although a very good system) if you need to add custom apps and custom functionality that you cannot find with a system like Concrete5 and you should also have a good grounding in Django/Python to start with in order to set the system up and seeing as you are asking this question I assume you have not. I am not a salesman, I have just tried many other CMS systems and concrete5 will make you smile at its ease of use and quick build time :) A comparison here Joomla/Drupal and C5: http://www.cmswire.com/cms/web-cms/drupal-and-joomla-to-lose-market-share-to-concrete5-web-cms-004347.php Hope this helps you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Seeking Django vs. Joomla comparison
The previous author is right Django is a framework to build systems and not an already built system like a Content Management System, like Joomla. If you do want a comparison you have to compare a Django built CMS like : http://www.django-cms.org/. I don't know the reasons for your comparison but having used most popular CMS systems: Wordpress, Joomla and Concrete 5: http://www.concrete5.org/ I can tell you that Concrete 5 is the easiest and quickest to setup for the user and developer. In comparison Joomla is a headache, a messy and hard to learn system. Just check out concrete 5 demo to see why: http://www.concrete5.org/ You should only really consider using Django CMS (although a very good system) if you need to add custom apps and custom functionality that you cannot find with a system like Concrete5 and you should also have a good grounding in Django/Python to start with in order to set the system up and seeing as you are asking this question I assume you have not. I am not a salesman, I have just tried many other CMS systems and concrete5 will make you smile at its ease of use and quick build time :) A comparison here Joomla/Drupal and C5: http://www.cmswire.com/cms/web-cms/drupal-and-joomla-to-lose-market-share-to-concrete5-web-cms-004347.php Hope this helps you. On Jun 15, 2:19 am, Kenneth Gonsalves wrote: > On Tuesday 15 June 2010 00:05:44 Hooshyar wrote: > > > I have a question. Do you know any reference, link or white paper that > > compares Joomla to Django? I know how wrong this comparison could be, > > but an avid Joomla/PHP vendor is making it. > > django is a framework, joomla is a cms - so they cannot be compared. You > should look to comparing django to something like cakephp > > > Also, if you know a reference material to compare Django to PHP, that > > would be nice too, although even this one might not come across as an > > apple-to-apple comparison. > > django is a framework, php is a scripting language - you should look to > compare php with python. > > -- > Regards > Kenneth Gonsalves > Senior Associate > NRC-FOSS at AU-KBC -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Seeking Django vs. Joomla comparison
The previous author is right Django is a framework to build systems and not an already built system like a Content Management System, like Joomla. If you do want a comparison you have to compare a Django built CMS like : http://www.django-cms.org/. I don't know the reasons for your comparison but having used most popular CMS systems: Wordpress, Joomla and Concrete 5: http://www.concrete5.org/ I can tell you that Concrete 5 is the easiest and quickest to setup for the user and developer. In comparison Joomla is a headache, a messy and hard to learn system. Just check out concrete 5 demo to see why: http://www.concrete5.org/ You should only really consider using Django CMS (although a very good system) if you need to add custom apps and custom functionality that you cannot find with a system like Concrete5 and you should also have a good grounding in Django/Python to start with in order to set the system up and seeing as you are asking this question I assume you have not. I am not a salesman, I have just tried many other CMS systems and concrete5 will make you smile at its ease of use and quick build time :) A comparison here Joomla/Drupal and C5: http://www.cmswire.com/cms/web-cms/drupal-and-joomla-to-lose-market-share-to-concrete5-web-cms-004347.php Hope this helps you. On Jun 15, 2:19 am, Kenneth Gonsalves wrote: > On Tuesday 15 June 2010 00:05:44 Hooshyar wrote: > > > I have a question. Do you know any reference, link or white paper that > > compares Joomla to Django? I know how wrong this comparison could be, > > but an avid Joomla/PHP vendor is making it. > > django is a framework, joomla is a cms - so they cannot be compared. You > should look to comparing django to something like cakephp > > > Also, if you know a reference material to compare Django to PHP, that > > would be nice too, although even this one might not come across as an > > apple-to-apple comparison. > > django is a framework, php is a scripting language - you should look to > compare php with python. > > -- > Regards > Kenneth Gonsalves > Senior Associate > NRC-FOSS at AU-KBC -- 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.
context porcessors request.context media_url breaks admin
I am trying to use media_url with generic views: When I set context processors to media_url, with generic views it breaks Admin: Caught an exception while rendering: user settings.py TEMPLATE_CONTEXT_PROCESSORS = ('portfolio.context_processors.media_url',) context_processors.py def media_url(request): from django.conf import settings return {'media_url': settings.MEDIA_URL} urls.py from django.template import RequestContext urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), (r'^work/$', 'django.views.generic.list_detail.object_list', dict(info_dict, template_name="portfolio/projects_list.html")), ) and when I remove it the admin works, but I have no media_url reference Any suggestions please? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: context porcessors request.context media_url breaks admin
Yes I did accidentally set my ADMIN_MEDIA_PREFIX = '/site-media/' instead of media I'll try this On Jun 29, 8:57 am, bruno desthuilliers wrote: > On 29 juin, 00:44, justin jools wrote: > > > > > > > I am trying to use media_url with generic views: > > When I set context processors to media_url, with generic views it > > breaks Admin: > > > Caught an exception while rendering: user > > > settings.py > > TEMPLATE_CONTEXT_PROCESSORS = > > ('portfolio.context_processors.media_url',) > > > context_processors.py > > def media_url(request): > > from django.conf import settings > > return {'media_url': settings.MEDIA_URL} > > > urls.py > > from django.template import RequestContext > > > urlpatterns = patterns('', > > (r'^admin/', include(admin.site.urls)), > > (r'^work/$', 'django.views.generic.list_detail.object_list', > > dict(info_dict, template_name="portfolio/projects_list.html")), > > ) > > > and when I remove it the admin works, but I have no media_url > > reference > > > Any suggestions please? > > Check your MEDIA_URL and ADMIN_MEDIA_PREFIX settings, collisions can > happen - like if your MEDIA_URL is '/medias/' and your > ADMIN_MEDIA_PREFIX is '/medias/ too - that have this exact result. > FWIW, you can set the ADMIN_MEDIA_PREFIX to whatever you want (I > usually use '/admins-medias/' to avoid the above problem). > > HTH- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django Tagging: no module named tagging, locally win7
I've installed Django Tagging SVN checkout, 0.3.1 zip, 0.3 exe and 0.2.1 versions and I keep getting 'no module named tagging' when I try to run python manage.py syncdb. I've checked my Python path and added extra links: C:\Python26\Lib\site-packages\tagging; C:\Python26\Lib\site-packages; C:\Python26; C:\Python26\Scripts; C:\Python26\Lib\site-packages\django\bin; and other modules are woking no problem, so it leads me to believe there is something wrong with the module? Any help please. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: context porcessors request.context media_url breaks admin
I corrected my settings.py links: TEMPLATE_DIRS = 'C:/django/portfolio_root/templates/' MEDIA_ROOT = 'C:/django/portfolio_root/site-media/' MEDIA_URL = '/site-media/' ADMIN_MEDIA_PREFIX = '/media/' but I still get this error: TemplateSyntaxError at /admin/ Caught an exception while rendering: userRequest Method: GET Request URL: http://127.0.0.1:8000/admin/ Exception Type: TemplateSyntaxError Exception Value: Caught an exception while rendering: user Exception Location: C:\Python26\lib\site-packages\django\template \debug.py in render_node, line 81 Python Executable: C:\Python26\python.exe Python Version: 2.6.4 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django Tagging: no module named tagging, locally win7
I tried installing by python setup.py install: SVN checkout, 0.3.1 zip and also tried installing binary 0.3 exe. They all installed fine everytime, I also just tried moving 'tagging' to python/Lib/site-packages It seems that Python isnt finding it. On Jun 29, 12:19 pm, Venkatraman S wrote: > On Tue, Jun 29, 2010 at 4:35 PM, justin jools wrote: > > I've installed Django Tagging SVN checkout, 0.3.1 zip, 0.3 exe and > > 0.2.1 versions > > and I keep getting 'no module named tagging' when I try to run python > > manage.py syncdb. > > > I've checked my Python path and added extra links: > > C:\Python26\Lib\site-packages\tagging; > > C:\Python26\Lib\site-packages; > > C:\Python26; > > C:\Python26\Scripts; > > C:\Python26\Lib\site-packages\django\bin; > > > and other modules are woking no problem, so it leads me to believe > > there is something wrong with the module? > > Have you installed tagging module? If not, just place that module parallel > to your apps, check INSTALLED_APPS and try once more? > > -V-http://twitter.com/venkasub- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django Tagging: no module named tagging, locally win7
Yes, great ;) that worked. I put it in my root Apps folder... seems very strange that it doesnt work in site-packages. Anyway this will do fine :) On Jun 29, 12:19 pm, Venkatraman S wrote: > On Tue, Jun 29, 2010 at 4:35 PM, justin jools wrote: > > I've installed Django Tagging SVN checkout, 0.3.1 zip, 0.3 exe and > > 0.2.1 versions > > and I keep getting 'no module named tagging' when I try to run python > > manage.py syncdb. > > > I've checked my Python path and added extra links: > > C:\Python26\Lib\site-packages\tagging; > > C:\Python26\Lib\site-packages; > > C:\Python26; > > C:\Python26\Scripts; > > C:\Python26\Lib\site-packages\django\bin; > > > and other modules are woking no problem, so it leads me to believe > > there is something wrong with the module? > > Have you installed tagging module? If not, just place that module parallel > to your apps, check INSTALLED_APPS and try once more? > > -V-http://twitter.com/venkasub- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: context porcessors request.context media_url breaks admin
Hi Tom if you read my original post you will realise that the error is being caused by setting of context processors to media_url (see original post). When context processors are active the {media_url} tag works perfectly, but breaks the admin. If I comment out : settings.py #TEMPLATE_CONTEXT_PROCESSORS = ('portfolio.context_processors.media_url',) and urls.py #from django.template import RequestContext the admin then works. I believe this has nothing to do with a template error, but some kind of conflict. To satisfy mystic meg, I have included error with traceback: TemplateSyntaxError at /admin/ Caught an exception while rendering: userRequest Method: GET Request URL: http://127.0.0.1:8000/admin/ Exception Type: TemplateSyntaxError Exception Value: Caught an exception while rendering: user Exception Location: C:\Python26\lib\site-packages\django\template \debug.py in render_node, line 81 Python Executable: C:\Python26\python.exe Python Version: 2.6.4 Python Path: ['c:\\django\\portfolio_root', 'C:\\Python26\\lib\\site- packages\\html5lib-0.90-py2.6.egg', 'C:\\Python26\\lib\\site-packages\ \django_page_cms-1.1.1-py2.6.egg', 'C:\\Python26\\lib\\site-packages\ \django_cms-2.0.2-py2.6.egg', 'C:\\Python26\\lib\\site-packages\ \django_admin_tools-0.2.0-py2.6.egg', 'C:\\Python26\\lib\\site-packages \\django_friends-0.1.5-py2.6.egg', 'C:\\Python26\\lib\\site-packages\ \django_schedule-0.1.0-py2.6.egg', 'C:\\Python26\\lib\\site-packages\ \python_dateutil-1.5-py2.6.egg', 'C:\\Python26\\lib\\site-packages\ \django_forum-r53-py2.6.egg', 'C:\\Python26\\lib\\site-packages\ \django_notification-0.1.4-py2.6.egg', 'C:\\Python26\\lib\\site- packages\\django_pagination-1.0.5-py2.6.egg', 'C:\\Python26\\lib\\site- packages\\sphinx-0.6.5-py2.6.egg', 'C:\\Python26\\lib\\site-packages\ \docutils-0.6-py2.6.egg', 'C:\\Python26\\lib\\site-packages\ \jinja2-2.4.1-py2.6.egg', 'C:\\Python26\\lib\\site-packages\ \pygments-1.3.1-py2.6.egg', 'C:\\Python26\\lib\\site-packages\ \django_avatar-1.0.4-py2.6.egg', 'C:\\Python26\\lib\\site-packages\ \django_locations-0.1.0-py2.6.egg', 'C:\\Windows\\system32\ \python26.zip', 'C:\\Python26\\DLLs', 'C:\\Python26\\lib', 'C:\ \Python26\\lib\\plat-win', 'C:\\Python26\\lib\\lib-tk', 'C:\ \Python26', 'C:\\Python26\\lib\\site-packages', 'C:\\Python26\\lib\ \site-packages\\PIL', 'c:\\python26\\lib\\site-packages'] Server time: Tue, 29 Jun 2010 13:36:03 +0100 Template error In template c:\python26\lib\site-packages\django\contrib\admin \templates\admin\index.html, error at line 56 Caught an exception while rendering: user 46 {% endif %} 47 48 {% endblock %} 49 50 {% block sidebar %} 51 52 53 {% trans 'Recent Actions' %} 54 {% trans 'My Actions' %} 55 {% load log %} 56 {% get_admin_log 10 as admin_log for_user user %} 57 {% if not admin_log %} 58 {% trans 'None available' %} 59 {% else %} 60 61 {% for entry in admin_log %} 62 63 {% if entry.is_deletion %} 64 {{ entry.object_repr }} 65 {% else %} 66 {{ entry.object_repr }} Environment: Request Method: GET Request URL: http://127.0.0.1:8000/admin/ Django Version: 1.1.1 Python Version: 2.6.4 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.markup', 'portfolio'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware') Template error: In template c:\python26\lib\site-packages\django\contrib\admin \templates\admin\index.html, error at line 56 Caught an exception while rendering: user 46 : {% endif %} 47 : 48 : {% endblock %} 49 : 50 : {% block sidebar %} 51 : 52 : 53 : {% trans 'Recent Actions' %} 54 : {% trans 'My Actions' %} 55 : {% load log %} 56 : {% get_admin_log 10 as admin_log for_user user %} 57 : {% if not admin_log %} 58 : {% trans 'None available' %} 59 : {% else %} 60 : 61 : {% for entry in admin_log %} 62 : 63 : {% if entry.is_deletion %} 64 : {{ entry.object_repr }} 65 : {% else %} 66 : {{ entry.object_repr }} Traceback: File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in get_response 92. response = callback(request, *callback_args, **callback_kwargs) File "C:\Python26\lib\site-packages\django\contrib\admin\sites.py" in wrapper 196. return self.admin_view(view, cacheable)(*args, **kwargs) File "C:\Python26\lib\site-packages\django\v
Re: context porcessors request.context media_url breaks admin
Thanks for that. I did read something about having to add services back in to the context processors. The reason I am doing this way is because I could not pass the {media url} with generic views. I did a search for trying to do this and hit a couple of posts saying it is not possible to use {media url} with generic views. If you have a solution I would be happy to hear this. On 29 June, 13:55, Daniel Roseman wrote: > On Jun 29, 1:41 pm, justin jools wrote: > > > Hi Tom if you read my original post you will realise that the error is > > being caused by setting of context processors to media_url (see > > original post). > > When context processors are active the {media_url} tag works > > perfectly, but breaks the admin. > > > If I comment out : > > settings.py > > #TEMPLATE_CONTEXT_PROCESSORS = > > ('portfolio.context_processors.media_url',) > > and > > urls.py > > #from django.template import RequestContext > > > the admin then works. > > You have completely overridden the default template context > processors. All the functionality that the admin depends on - > authentication, csrf protection, internationalisation, messages - has > all now gone thanks to this setting. > > You should just *add* your processor to the existing list. However, I > don't understand why you want to do this at all, given that the > default list already includes the > "django.core.context_processors.media" processor which does exactly > the same as your version. > -- > DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: context porcessors request.context media_url breaks admin
Thank for your quick response Daniel. I'm just confused about using media_url with generic views, I have done it previously with: from django.conf import settings# for media_url media_url = settings.MEDIA_URL def dblist(request): obj_list_menu = dbModel1.objects.all() return render_to_response('products/dblist.html', {'make_list': obj_list_menu, 'media_url': media_url }) but with generic views, have no views.py obviously, so I put it in settings.py: from django.conf import settings# for media_url media_url = settings.MEDIA_URL and in my base.html template: {{ media_url }}css/base.css but it's not picking it up? do i need to pass it with generic views? On 8 July, 12:35, Daniel Roseman wrote: > On Jul 8, 11:40 am, justin jools wrote: > > > Thanks for that. I did read something about having to add services > > back in to the context processors. > > The reason I am doing this way is because I could not pass the {media > > url} with generic views. > > I did a search for trying to do this and hit a couple of posts saying > > it is not possible to use {media url} with generic views. > > > If you have a solution I would be happy to hear this. > > I'd be interested to know where you read this, because in fact the > opposite is true. Generic views all use the RequestContext, which > means they automatically gain access to all the existing context > processors - including the default > "django.core.context_processors.media" processor. So, all generic > views *already* have access to MEDIA_URL. > -- > DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: context porcessors request.context media_url breaks admin
The 2 methods of using media_url with generic views I have tried: 1. http://www.b-list.org/weblog/2006/jun/14/django-tips-template-context-processors/ This knocked out my admin, but media_url did work 2. using templatetags yourApp/templatetags/media_url.py: from django.template import Library from yourapp.settings import MEDIA_URL register = Library() @register.simple_tag def media_url(): return MEDIA_URL And in my template file: {% load media_url %} I could not get either of these methods to work, can you give best guideline for this, Thanks, Justin Jools On 8 July, 12:35, Daniel Roseman wrote: > On Jul 8, 11:40 am, justin jools wrote: > > > Thanks for that. I did read something about having to add services > > back in to the context processors. > > The reason I am doing this way is because I could not pass the {media > > url} with generic views. > > I did a search for trying to do this and hit a couple of posts saying > > it is not possible to use {media url} with generic views. > > > If you have a solution I would be happy to hear this. > > I'd be interested to know where you read this, because in fact the > opposite is true. Generic views all use the RequestContext, which > means they automatically gain access to all the existing context > processors - including the default > "django.core.context_processors.media" processor. So, all generic > views *already* have access to MEDIA_URL. > -- > DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: context porcessors request.context media_url breaks admin
Wow... django docs can be so confusing... I could not believe it worked just by using upper case MEDIA_URL Thanks so much :) :) I spent a day trying figure this out... On 8 July, 13:14, Daniel Roseman wrote: > On Jul 8, 12:57 pm, justin jools wrote: > > > > > > > Thank for your quick response Daniel. > > I'm just confused about using media_url with generic views, I have > > done it previously with: > > > from django.conf import settings # for media_url > > media_url = settings.MEDIA_URL > > > def dblist(request): > > obj_list_menu = dbModel1.objects.all() > > return render_to_response('products/dblist.html', {'make_list': > > obj_list_menu, 'media_url': media_url }) > > > but with generic views, have no views.py obviously, so I put it in > > settings.py: > > > from django.conf import settings # for media_url > > media_url = settings.MEDIA_URL > > > and in my base.html template: > > > {{ media_url }}css/base.css > > > but it's not picking it up? do i need to pass it with generic views? > > But you don't need to set anything! As I said, generic views already > have access to MEDIA_URL, as long as you don't remove it from the list > of installed context processors. So I don't know why you want to > define another variable called "media_url". Just use the existing > upper-case one. > -- > DR.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
'django.contrib.comments', Error: No module named comments. Can someone explain why?
I've set up basic blog with, all running fine but when I runserver I get Error: No module named comments. I've checked the Python path (below) and the app/function is there. Can someone explain why it is isn't finding this when it finds all other installed apps e.g. markup, tagging. C:\Python26\Lib\site-packages\django\contrib\comments INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.comments', 'django.contrib.markup', 'portfolio', 'basic.blog', 'basic.inlines', 'tagging', 'comments', ) Many 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-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
RE: 'django.contrib.comments', Error: No module named comments.
Oops! I had 'comments' in my settings.py installed apps for some reason... removed and works fine -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
RE: 'django.contrib.comments', Error: No module named comments.
Oops! I had 'comments' in my settings.py installed apps for some reason... removed and works fine -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Jquery nav disabled in Django base template??? help please
Hi thanks for your reply the links are correct because the css works fine... I do have blocks andchild templates but I took all this out to figure out why the jquery nav function was being reset/disabled... I tested alert('hello') function with $(document).ready(function() { $('#nav li a').click(function() { alert('here!'); On Jul 15, 2:40 pm, David De La Harpe Golden wrote: > On 15/07/10 13:40, justin jools wrote: > > > 2. base.html with jquery nav, exactly the same except for > > {{ MEDIA_URL }} which is correct. > > FWIW, we use a jquery load line in our base template and it works fine > (pretty disastrous for us if it didn't). > > You're 100% sure the pathss correct (like when you "view source" the > rendered page and look at the rendered links in your browser) - > forgetting a trailing slash on settings.MEDIA_URL is a common mistake, > as is inserting an extra one somewhere. > > In case you've been away on mars or something: the "firebug" extension > for firefox is extremely useful for poking about rendered pages. > > > > [That's now a pretty old jquery version, not that it should matter > particularly.] > > It's not clear to me if you've just got a test view that renders the > base template directly, or if you've really got child templates: > Was that really your base template though? I mean you've got no > {% block blah %} things for child pages to override. > > They're relevant because you presumably have blocks in your base > template, and you presumably override them in the child templates, so > you might want to make sure you're not overriding a block containing the > jquery-loading script tag, or at least use {{block.super}} to pull it > in if you do. > > our base looks something like (simplified): > > <html> > <head> > <title>{% block title %}BlahProj{% endblock title %}</title> > > <link type="text/css" > href="{{MEDIA_URL}}ext/jquery-ui/css/redmond/jquery-ui-1.8.2.custom.css" > rel="stylesheet" /> > <link type="text/css" href="{{MEDIA_URL}}blahproj/screen.css" > media="screen" > rel="stylesheet" /> > > <script type="text/javascript" > src="{{MEDIA_URL}}ext/jquery-ui/js/jquery-1.4.2.min.js"> > src="{{MEDIA_URL}}ext/jquery-ui/js/jquery-ui-1.8.2.custom.min.js"> > > {% block extra_head %} > {% endblock extra_head %} > > > {% block content %} > {% endblock content %} > > > > Then child templates might do this: > > {% extends "base.html" %} > {% block title %}{{block.super}} :: Foo{% endblock title %} > > {% block extra_head %} > {# maybe, say a grandchild: block.super #} > > $(function () { > ... > }); > > {% endblock extra_head %} > > {% block content %} > Foo > {% endblock content %} -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Jquery nav disabled in Django base template??? help please
the paths are correct, as I have tested the jquery click function with alert () I do have child templates and blocks but I took all this out to see why the jquery was being overriden/reset/disabled by django. It finds the jquery no problem but always resets to the default base template, and doesn't change it: Home I see from our example I should put the function in the child template, I'll try this but seems strange it doesnt work in base template. On Jul 15, 2:40 pm, David De La Harpe Golden wrote: > On 15/07/10 13:40, justin jools wrote: > > > 2. base.html with jquery nav, exactly the same except for > > {{ MEDIA_URL }} which is correct. > > FWIW, we use a jquery load line in our base template and it works fine > (pretty disastrous for us if it didn't). > > You're 100% sure the pathss correct (like when you "view source" the > rendered page and look at the rendered links in your browser) - > forgetting a trailing slash on settings.MEDIA_URL is a common mistake, > as is inserting an extra one somewhere. > > In case you've been away on mars or something: the "firebug" extension > for firefox is extremely useful for poking about rendered pages. > > > > [That's now a pretty old jquery version, not that it should matter > particularly.] > > It's not clear to me if you've just got a test view that renders the > base template directly, or if you've really got child templates: > Was that really your base template though? I mean you've got no > {% block blah %} things for child pages to override. > > They're relevant because you presumably have blocks in your base > template, and you presumably override them in the child templates, so > you might want to make sure you're not overriding a block containing the > jquery-loading script tag, or at least use {{block.super}} to pull it > in if you do. > > our base looks something like (simplified): > > <html> > <head> > <title>{% block title %}BlahProj{% endblock title %}</title> > > <link type="text/css" > href="{{MEDIA_URL}}ext/jquery-ui/css/redmond/jquery-ui-1.8.2.custom.css" > rel="stylesheet" /> > <link type="text/css" href="{{MEDIA_URL}}blahproj/screen.css" > media="screen" > rel="stylesheet" /> > > <script type="text/javascript" > src="{{MEDIA_URL}}ext/jquery-ui/js/jquery-1.4.2.min.js"> > src="{{MEDIA_URL}}ext/jquery-ui/js/jquery-ui-1.8.2.custom.min.js"> > > {% block extra_head %} > {% endblock extra_head %} > > > {% block content %} > {% endblock content %} > > > > Then child templates might do this: > > {% extends "base.html" %} > {% block title %}{{block.super}} :: Foo{% endblock title %} > > {% block extra_head %} > {# maybe, say a grandchild: block.super #} > > $(function () { > ... > }); > > {% endblock extra_head %} > > {% block content %} > Foo > {% endblock content %} -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Jquery nav disabled in Django base template??? help please
tried putting the nav function in the child template made no difference. I have another button jquery script which is working fine, so maybe it is my script but when I test in straight in html it works... bizarre complete script: http://www.w3.org/ TR/html4/strict.dtd"> Devhead {%block pagetitle %}{% endblock %} <!-- google analytics --> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-17360645-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/ javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https:// ssl' : '<a rel="nofollow" href="http://www">http://www</a>') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); $(document).ready(function() { $(".button-list .next").click(function() { project = $(this).parents().filter(".project").eq(0); currentimg = project.find(".images-list li.current"); nextimg = currentimg.next(); firstimg = project.find(".images-list li:first"); currentimg.removeClass("current"); if (nextimg.is("li")) nextimg.addClass("current"); else firstimg.addClass("current"); return false; }); $(".button-list .prev").click(function() { project = $(this).parents().filter(".project").eq(0); currentimg = project.find(".images-list li.current"); previmg = currentimg.prev(); lastimg = project.find(".images-list li:last"); currentimg.removeClass("current"); if (previmg.is("li")) previmg.addClass("current"); else lastimg.addClass("current"); return false; }); }); $(document).ready(function() { $('#nav li a').click(function() { $('.active').removeClass('active'); $(this).addClass('active'); }); }); Home About Work Blog Contact {% block extra-head %}{% endblock %} {% block title %}{% endblock %} {% block content %}{% endblock %} c 2010 Powered by http://www.djangoproject.com/";>Django Hosted by https://servqc.net/";>ServQc. On Jul 15, 3:11 pm, justin jools wrote: > the paths are correct, as I have tested the jquery click function with > alert () > I do have child templates and blocks but I took all this out to see > why the jquery was being overriden/reset/disabled by django. > It finds the jquery no problem but always resets to the default base > template, and doesn't change it: > Home a> > > I see from our example I should put the function in the child > template, I'll try this but seems strange it doesnt work in base > template. > > On Jul 15, 2:40 pm, David De La Harpe Golden > > > > wrote: > > On 15/07/10 13:40, justin jools wrote: > > > > 2. base.html with jquery nav, exactly the same except for > > > {{ MEDIA_URL }} which is correct. > > > FWIW, we use a jquery load line in our base template and it works fine > > (pretty disastrous for us if it didn't). > > > You're 100% sure the pathss correct (like when you "view source" the > > rendered page and look at the rendered links in your browser) - > > forgetting a trailing slash on settings.MEDIA_URL is a common
Re: Jquery nav disabled in Django base template??? help please
Solved it!!! really stupid! I knew it would be something like this. I removed class="active" on home, now it works. Seems django was resetting to default base.html settings. It doesn't do this in straight HTML. So now I'll have to set the home active onload dynamically. hope this tip helps someone. Home About Work Blog Contact -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Jquery nav disabled in Django base template??? help please
I thought I had solved but I haven't. Re: That means a whole different page is requested by the browser. I get your point, you are saying when clicking a link even though the script and navigation are in base.html it is still loading a new instance of base.html and therefore can't keep state for jquery... jquery only wokrs when page is in static and not navigated away from... makes sense... how do I store state across pages then to achieve this? save to JSON? using seperate block nav for evey page seems like a lot of duplication... On Jul 15, 3:52 pm, David De La Harpe Golden wrote: > On 15/07/10 15:19, justin jools wrote: > > > > > $(document).ready(function() { > > $('#nav li a').click(function() { > > $('.active').removeClass('active'); > > $(this).addClass('active'); > > }); > > }); > > > > Okay hold on here, I'm obviously too used to there being some ajaxy hook > on clicked links - you are just toggling a class there, clicking such a > link will still navigate away immediately to an entirely different page > since you haven't actually prevented the default action in that event > handler. > > That means a whole different page is requested by the browser. > Django is on the server side. Once it's spat out the generated page > (rendered from the template) to the client (browser), it doesn't have > further involvement until the next time the client requests something > from the server. > > If you haven't taken some sort of steps to arrange for a different link > in your nav bar to _start out_ as active on that different page, then it > will be whatever it is set to in your first template. > > If you want a different link to _start out_ with class "active" in > different pages, you can do that in the templates. > > e.g. (one of several ways to do it, not necessarily the neatest): > > parent: > > {% block nav %} > > > href="/home/"> > Home > > > > href="/about/"> > About > > > > ... > {% endblock nav %} > > child: > > {% block nav %} > {% with 'about' as nav_current %} > {{block.super}} > {% endwith %} > {% endblock nav %} -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Jquery nav disabled in Django base template??? help please
I'm just going to go with nav blocks for the time being and find something dynamic later... I was looking at Jquery json cookies but seems a lot of effort for a small menu very interesting about context variables, I'll look into this ;) Thanks On Jul 15, 5:15 pm, David De La Harpe Golden wrote: > On 15/07/10 16:31, justin jools wrote: > > > I thought I had solved but I haven't. > > [...] > > using seperate block nav for evey page seems like a lot of > > duplication... > > Well, you could also pass through a context variable to the template > from each of your view functions telling what item in your navbar to > make current, you don't need to do the "{%with ...%}{{block.super}}" > hack I showed, that just helps make which navbar item is current a > "purely in the templates" issue, which is potentially handy. > > i.e. in your view you might do something like > > return render_to_response('blah.html', > dict(nav_current='blah',...), > context_instance=RequestContext(request)) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Jquery nav disabled in Django base template??? help please
wow works like a dream :) perfect time saver bit of script thanks :) On Jul 15, 6:00 pm, natebeacham wrote: > Or, if you don't want to over complicate things... > > $(function() { > $('#nav li a').each(function() { > if ($(this).attr('href') == window.location.pathname) { > $(this).addClass('active'); > } > }); > > }); > > On Jul 15, 12:15 pm, David De La Harpe Golden > > > > wrote: > > On 15/07/10 16:31, justin jools wrote: > > > > I thought I had solved but I haven't. > > > [...] > > > using seperate block nav for evey page seems like a lot of > > > duplication... > > > Well, you could also pass through a context variable to the template > > from each of your view functions telling what item in your navbar to > > make current, you don't need to do the "{%with ...%}{{block.super}}" > > hack I showed, that just helps make which navbar item is current a > > "purely in the templates" issue, which is potentially handy. > > > i.e. in your view you might do something like > > > return render_to_response('blah.html', > > dict(nav_current='blah',...), > > context_instance=RequestContext(request))- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck
RE: http://djangoadvent.com/1.2/everything-i-hate-about-mingus/ I tried following this to install Django-Mingus, it says it is easy but not for a newbie who knows nothing about virtualenv! tsk! I don't have pip so I ran easy_install 1. easy_install virtualenv... no problem 2. easy_instal virtualenvwrapper... no problem 3. mkvirtualenv myblog —-no-site-packages I get error: mkvirtualenv myblog —-no-site-packages What am I doing wrong... thanks for your 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-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck
Hi, sorry was c:\django>mkvirtualenv myblog 'mkvirtualenv' is not recognized as an internal or external command, operable program or batch file. but I figured out that on windows virtualenv myblog works but now (folowing tutorial as bottom), workon myblog porduces error: c:\django>workon myblog 'workon' is not recognized as an internal or external command, operable program or batch file. - mkvirtualenv myblog —-no-site-packages workon myblog cdvirtualenv git clone git://github.com/montylounge/django-mingus.git cd django-mingus/mingus pip install -r stable-requirements.txt cp local_settings.py.template local_settings.py ./manage.py syncdb ./manage.py loaddata test_data.json ./manage.py runserver On 16 July, 22:29, Ivan wrote: > Hi Justin, > > What is the error message? > > Cheers, > Ivan > > On Sat, Jul 17, 2010 at 7:09 AM, justin jools wrote: > > RE:http://djangoadvent.com/1.2/everything-i-hate-about-mingus/ > > I tried following this to install Django-Mingus, it says it is easy > > but not for a newbie who knows nothing about virtualenv! tsk! > > > I don't have pip so I ran easy_install > > 1. easy_install virtualenv... no problem > > 2. easy_instal virtualenvwrapper... no problem > > 3. mkvirtualenv myblog —-no-site-packages > > I get error: mkvirtualenv myblog —-no-site-packages > > > What am I doing wrong... > > > thanks for your 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-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck
aha... thanks for that My development server is linux but I always test locally on windows before uploading... Will try this out, thanks... Maybe I should setup a linux local test environment On 16 July, 23:40, Ivan wrote: > Hi Justin, > > I guess, you are using Windows OS, > > Fromhttp://stackoverflow.com/questions/2615968/installing-virtualenvwrapp... > virtualenvwrapper does not work in Windows, unless you are using cygwin. > > Alternate solution is Virtualenv Helper for Windows > (http://justindriscoll.us/2009/03/virtualenv-helper-for-windows.html) > > Hope it helps. > > Cheers, > Ivan > > On Sat, Jul 17, 2010 at 7:42 AM, justin jools wrote: > > Hi, > > sorry was > > > c:\django>mkvirtualenv myblog > > 'mkvirtualenv' is not recognized as an internal or external command, > > operable program or batch file. > > > but I figured out that on windows virtualenv myblog works > > > but now (folowing tutorial as bottom), > > workon myblog porduces error: > > > c:\django>workon myblog > > 'workon' is not recognized as an internal or external command, > > operable program or batch file. > > > - > > > mkvirtualenv myblog —-no-site-packages > > workon myblog > > cdvirtualenv > > git clone git://github.com/montylounge/django-mingus.git > > cd django-mingus/mingus > > pip install -r stable-requirements.txt > > cp local_settings.py.template local_settings.py > > ./manage.py syncdb > > ./manage.py loaddata test_data.json > > ./manage.py runserver > > > On 16 July, 22:29, Ivan wrote: > >> Hi Justin, > > >> What is the error message? > > >> Cheers, > >> Ivan > > >> On Sat, Jul 17, 2010 at 7:09 AM, justin jools > >> wrote: > >> > RE:http://djangoadvent.com/1.2/everything-i-hate-about-mingus/ > >> > I tried following this to install Django-Mingus, it says it is easy > >> > but not for a newbie who knows nothing about virtualenv! tsk! > > >> > I don't have pip so I ran easy_install > >> > 1. easy_install virtualenv... no problem > >> > 2. easy_instal virtualenvwrapper... no problem > >> > 3. mkvirtualenv myblog —-no-site-packages > >> > I get error: mkvirtualenv myblog —-no-site-packages > > >> > What am I doing wrong... > > >> > thanks for your 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-us...@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > django-users+unsubscr...@googlegroups.com. > >> > For more options, visit this group > >> > athttp://groups.google.com/group/django-users?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck
still trying to install django-mingus I loggged into my server with ssh and installed virtualenv and virtualenvwrapper easy_install virtualenv pip virtualenvwrapper ok... trying to follow the install instructions(bottom). I guess virtualenv/ virtualenvwrapper need setting up? 1. mkvirtualenv myblog --no-site-packages (virtualenv myblog --no- site-packages works but I guess this is not correct) error: -bash: mkvirtualenv: command not found 2.workon myblog error: -bash: workon: command not found -- The quick start assumes basic familiarity with "vitualenv":http:// virtualenv.openplans.org/, "virtualenv wrapper":http:// www.doughellmann.com/projects/virtualenvwrapper/. It also assumes you have both subversion, mecurial, and git clients locally. * mkvirtualenv myblog --no-site-packages * workon myblog * cd myblog * git clone git://github.com/montylounge/django-mingus.git * cd django-mingus/mingus * pip install -r stable-requirements.txt * ... wait a bit * mv local_settings.py.template local_settings.py * ./manage.py syncdb * .manage.py loaddata test_data.json * ./manage.py runserver -- 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.
trying to install django-mingus/ virtualenv / virtualenvwrapper help!
still trying to install django-mingus I loggged into my server with ssh and installed virtualenv and virtualenvwrapper easy_install virtualenv pip virtualenvwrapper also installed git ok... trying to follow the install instructions(bottom). I guess virtualenv/ virtualenvwrapper need setting up? 1. mkvirtualenv myblog --no-site-packages (virtualenv myblog --no- site-packages works but I guess this is not correct) error: -bash: mkvirtualenv: command not found 2.workon myblog error: -bash: workon: command not found -- The quick start assumes basic familiarity with "vitualenv":http:// virtualenv.openplans.org/, "virtualenv wrapper":http:// www.doughellmann.com/projects/virtualenvwrapper/. It also assumes you have both subversion, mecurial, and git clients locally. * mkvirtualenv myblog --no-site-packages * workon myblog * cd myblog * git clone git://github.com/montylounge/django-mingus.git * cd django-mingus/mingus * pip install -r stable-requirements.txt * ... wait a bit * mv local_settings.py.template local_settings.py * ./manage.py syncdb * .manage.py loaddata test_data.json * ./manage.py runserver -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck
I followed the docs install (below), but: source /usr/local/bin/ virtualenvwrapper.sh No such file or directory: Any ideas? (virtfs)-bash-3.2$ pip install virtualenvwrapper Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /home/cc11/public_html/virtfs/lib/python2.4/ site-packages (virtfs)-bash-3.2$ export WORKON_HOME=~/Envs (virtfs)-bash-3.2$ mkdir -p $WORKON_HOME (virtfs)-bash-3.2$ source /usr/local/bin/virtualenvwrapper.sh -bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory On Jul 17, 3:12 pm, Peter Herndon wrote: > From the virtualenvwrapper instructions: > "First, some initialization steps. Most of this only needs to be done one > time. You will want to add the command tosource > /usr/local/bin/virtualenvwrapper.sh to your shell startup file, changing the > path to virtualenvwrapper.sh depending on where it was installed by pip." > > Did you do this part? > > On Jul 17, 2010, at 9:28 AM, justin jools wrote: > > > still trying to install django-mingus > > > I loggged into my server with ssh and installed virtualenv and > > virtualenvwrapper > > easy_install virtualenv > > pip virtualenvwrapper > > ok... > > > trying to follow the install instructions(bottom). I guess virtualenv/ > > virtualenvwrapper need setting up? > > 1. mkvirtualenv myblog --no-site-packages (virtualenv myblog --no- > > site-packages works but I guess this is not correct) > > error: > > -bash: mkvirtualenv: command not found > > > 2.workon myblog > > error: > > -bash: workon: command not found > > > -- > > The quick start assumes basic familiarity with "vitualenv":http:// > > virtualenv.openplans.org/, "virtualenv wrapper":http:// > >www.doughellmann.com/projects/virtualenvwrapper/. > > > It also assumes you have both subversion, mecurial, and git clients > > locally. > > > * mkvirtualenv myblog --no-site-packages > > * workon myblog > > * cd myblog > > * git clone git://github.com/montylounge/django-mingus.git > > * cd django-mingus/mingus > > * pip install -r stable-requirements.txt > > * ... wait a bit > > * mv local_settings.py.template local_settings.py > > * ./manage.py syncdb > > * .manage.py loaddata test_data.json > > * ./manage.py runserver > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck
says virtualenvwrapper is in /home/cc11/public_html/virtfs/lib/ python2.4/site-packages (bottom) so I tried: source /home/cc11/public_html/virtfs/lib/python2.4/site-packages/ virtualenvwrapper.sh error: -bash: /home/cc11/public_html/virtfs/lib/python2.4/site-packages/ virtualenvwrapper.sh: No such file or directory --- (virtfs)-bash-3.2$ pip install virtualenvwrapper Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /home/cc11/public_html/virtfs/lib/python2.4/ site-packages virtualenvwrapper in /home/cc11/public_html/virtfs/lib/python2.4/ site-packages On Jul 17, 3:12 pm, Peter Herndon wrote: > From the virtualenvwrapper instructions: > "First, some initialization steps. Most of this only needs to be done one > time. You will want to add the command tosource > /usr/local/bin/virtualenvwrapper.sh to your shell startup file, changing the > path to virtualenvwrapper.sh depending on where it was installed by pip." > > Did you do this part? > > On Jul 17, 2010, at 9:28 AM, justin jools wrote: > > > still trying to install django-mingus > > > I loggged into my server with ssh and installed virtualenv and > > virtualenvwrapper > > easy_install virtualenv > > pip virtualenvwrapper > > ok... > > > trying to follow the install instructions(bottom). I guess virtualenv/ > > virtualenvwrapper need setting up? > > 1. mkvirtualenv myblog --no-site-packages (virtualenv myblog --no- > > site-packages works but I guess this is not correct) > > error: > > -bash: mkvirtualenv: command not found > > > 2.workon myblog > > error: > > -bash: workon: command not found > > > -- > > The quick start assumes basic familiarity with "vitualenv":http:// > > virtualenv.openplans.org/, "virtualenv wrapper":http:// > >www.doughellmann.com/projects/virtualenvwrapper/. > > > It also assumes you have both subversion, mecurial, and git clients > > locally. > > > * mkvirtualenv myblog --no-site-packages > > * workon myblog > > * cd myblog > > * git clone git://github.com/montylounge/django-mingus.git > > * cd django-mingus/mingus > > * pip install -r stable-requirements.txt > > * ... wait a bit > > * mv local_settings.py.template local_settings.py > > * ./manage.py syncdb > > * .manage.py loaddata test_data.json > > * ./manage.py runserver > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck
I found it in: source /home/cc11/public_html/virtfs/bin/virtualenvwrapper.sh Thanks for your help, I shall now try django-mingus again On 17 July, 15:27, justin jools wrote: > says virtualenvwrapper is in /home/cc11/public_html/virtfs/lib/ > python2.4/site-packages (bottom) so I tried: > > source /home/cc11/public_html/virtfs/lib/python2.4/site-packages/ > virtualenvwrapper.sh > error: > > -bash: /home/cc11/public_html/virtfs/lib/python2.4/site-packages/ > virtualenvwrapper.sh: No such file or directory > > --- > (virtfs)-bash-3.2$ pip install virtualenvwrapper > Requirement already satisfied (use --upgrade to upgrade): > virtualenvwrapper in /home/cc11/public_html/virtfs/lib/python2.4/ > site-packages > > virtualenvwrapper in /home/cc11/public_html/virtfs/lib/python2.4/ > site-packages > > On Jul 17, 3:12 pm, Peter Herndon wrote: > > > From the virtualenvwrapper instructions: > > "First, some initialization steps. Most of this only needs to be done one > > time. You will want to add the command tosource > > /usr/local/bin/virtualenvwrapper.sh to your shell startup file, changing > > the path to virtualenvwrapper.sh depending on where it was installed by > > pip." > > > Did you do this part? > > > On Jul 17, 2010, at 9:28 AM, justin jools wrote: > > > > still trying to install django-mingus > > > > I loggged into my server with ssh and installed virtualenv and > > > virtualenvwrapper > > > easy_install virtualenv > > > pip virtualenvwrapper > > > ok... > > > > trying to follow the install instructions(bottom). I guess virtualenv/ > > > virtualenvwrapper need setting up? > > > 1. mkvirtualenv myblog --no-site-packages (virtualenv myblog --no- > > > site-packages works but I guess this is not correct) > > > error: > > > -bash: mkvirtualenv: command not found > > > > 2.workon myblog > > > error: > > > -bash: workon: command not found > > > > -- > > > The quick start assumes basic familiarity with "vitualenv":http:// > > > virtualenv.openplans.org/, "virtualenv wrapper":http:// > > >www.doughellmann.com/projects/virtualenvwrapper/. > > > > It also assumes you have both subversion, mecurial, and git clients > > > locally. > > > > * mkvirtualenv myblog --no-site-packages > > > * workon myblog > > > * cd myblog > > > * git clone git://github.com/montylounge/django-mingus.git > > > * cd django-mingus/mingus > > > * pip install -r stable-requirements.txt > > > * ... wait a bit > > > * mv local_settings.py.template local_settings.py > > > * ./manage.py syncdb > > > * .manage.py loaddata test_data.json > > > * ./manage.py runserver > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Django users" group. > > > To post to this group, send email to django-us...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > django-users+unsubscr...@googlegroups.com. > > > For more options, visit this group > > > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck
I got the virtualenvwrapper working, now tried: mkvirtualenv myblog, get: (env1)-bash-3.2$ mkvirtualenv myblog .-no-site-packages There must be only one argument: DEST_DIR (you gave myblog .-no-site- packages) usage: virtualenv [OPTIONS] DEST_DIR options: --version show program's version number and exit -h, --helpshow this help message and exit -v, --verbose Increase verbosity -q, --quiet Decrease verbosity -p PYTHON_EXE, --python=PYTHON_EXE The Python interpreter to use, e.g., --python=python2.5 will use the python2.5 interpreter to create the new environment. The default is the interpreter that virtualenv was installed with (/home/cc11/public_html/virtfs/bin/python) --clear Clear out the non-root install and start from scratch --no-site-packagesDon't give access to the global site-packages dir to the virtual environment --unzip-setuptoolsUnzip Setuptools or Distribute when installing it --relocatable Make an EXISTING virtualenv environment relocatable. This fixes up scripts and makes all .pth files relative --distribute Use Distribute instead of Setuptools. Set environ variableVIRTUALENV_USE_DISTRIBUTE to make it the default On 17 July, 15:12, Peter Herndon wrote: > From the virtualenvwrapper instructions: > "First, some initialization steps. Most of this only needs to be done one > time. You will want to add the command tosource > /usr/local/bin/virtualenvwrapper.sh to your shell startup file, changing the > path to virtualenvwrapper.sh depending on where it was installed by pip." > > Did you do this part? > > On Jul 17, 2010, at 9:28 AM, justin jools wrote: > > > still trying to install django-mingus > > > I loggged into my server with ssh and installed virtualenv and > > virtualenvwrapper > > easy_install virtualenv > > pip virtualenvwrapper > > ok... > > > trying to follow the install instructions(bottom). I guess virtualenv/ > > virtualenvwrapper need setting up? > > 1. mkvirtualenv myblog --no-site-packages (virtualenv myblog --no- > > site-packages works but I guess this is not correct) > > error: > > -bash: mkvirtualenv: command not found > > > 2.workon myblog > > error: > > -bash: workon: command not found > > > -- > > The quick start assumes basic familiarity with "vitualenv":http:// > > virtualenv.openplans.org/, "virtualenv wrapper":http:// > >www.doughellmann.com/projects/virtualenvwrapper/. > > > It also assumes you have both subversion, mecurial, and git clients > > locally. > > > * mkvirtualenv myblog --no-site-packages > > * workon myblog > > * cd myblog > > * git clone git://github.com/montylounge/django-mingus.git > > * cd django-mingus/mingus > > * pip install -r stable-requirements.txt > > * ... wait a bit > > * mv local_settings.py.template local_settings.py > > * ./manage.py syncdb > > * .manage.py loaddata test_data.json > > * ./manage.py runserver > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck
sorry was copy error, now works: (env1)-bash-3.2$ mkvirtualenv myblog --no-site-packages Using real prefix '/usr' New python executable in myblog/bin/python Installing setuptools.done. (env1)-bash-3.2$ (env1)-bash-3.2$ On 17 July, 15:12, Peter Herndon wrote: > From the virtualenvwrapper instructions: > "First, some initialization steps. Most of this only needs to be done one > time. You will want to add the command tosource > /usr/local/bin/virtualenvwrapper.sh to your shell startup file, changing the > path to virtualenvwrapper.sh depending on where it was installed by pip." > > Did you do this part? > > On Jul 17, 2010, at 9:28 AM, justin jools wrote: > > > still trying to install django-mingus > > > I loggged into my server with ssh and installed virtualenv and > > virtualenvwrapper > > easy_install virtualenv > > pip virtualenvwrapper > > ok... > > > trying to follow the install instructions(bottom). I guess virtualenv/ > > virtualenvwrapper need setting up? > > 1. mkvirtualenv myblog --no-site-packages (virtualenv myblog --no- > > site-packages works but I guess this is not correct) > > error: > > -bash: mkvirtualenv: command not found > > > 2.workon myblog > > error: > > -bash: workon: command not found > > > -- > > The quick start assumes basic familiarity with "vitualenv":http:// > > virtualenv.openplans.org/, "virtualenv wrapper":http:// > >www.doughellmann.com/projects/virtualenvwrapper/. > > > It also assumes you have both subversion, mecurial, and git clients > > locally. > > > * mkvirtualenv myblog --no-site-packages > > * workon myblog > > * cd myblog > > * git clone git://github.com/montylounge/django-mingus.git > > * cd django-mingus/mingus > > * pip install -r stable-requirements.txt > > * ... wait a bit > > * mv local_settings.py.template local_settings.py > > * ./manage.py syncdb > > * .manage.py loaddata test_data.json > > * ./manage.py runserver > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck
making progress but now get error at *8 (bottom) ./manage.py syncdb (myblog)-bash-3.2$ ./manage.py syncdb Traceback (most recent call last): File "./manage.py", line 7, in ? from django.core.management import execute_manager ImportError: No module named django.core.management (myblog)-bash-3.2$ -- 1. mkvirtualenv myblog —-no-site-packages 2. workon myblog 3. cdvirtualenv 4. git clone git://github.com/montylounge/django-mingus.git 5. cd django-mingus/mingus 6. pip install -r stable-requirements.txt 7. cp local_settings.py.template local_settings.py 8. ./manage.py syncdb 9. ./manage.py loaddata test_data.json 10. ./manage.py runserver On 17 July, 15:12, Peter Herndon wrote: > From the virtualenvwrapper instructions: > "First, some initialization steps. Most of this only needs to be done one > time. You will want to add the command tosource > /usr/local/bin/virtualenvwrapper.sh to your shell startup file, changing the > path to virtualenvwrapper.sh depending on where it was installed by pip." > > Did you do this part? > > On Jul 17, 2010, at 9:28 AM, justin jools wrote: > > > still trying to install django-mingus > > > I loggged into my server with ssh and installed virtualenv and > > virtualenvwrapper > > easy_install virtualenv > > pip virtualenvwrapper > > ok... > > > trying to follow the install instructions(bottom). I guess virtualenv/ > > virtualenvwrapper need setting up? > > 1. mkvirtualenv myblog --no-site-packages (virtualenv myblog --no- > > site-packages works but I guess this is not correct) > > error: > > -bash: mkvirtualenv: command not found > > > 2.workon myblog > > error: > > -bash: workon: command not found > > > -- > > The quick start assumes basic familiarity with "vitualenv":http:// > > virtualenv.openplans.org/, "virtualenv wrapper":http:// > >www.doughellmann.com/projects/virtualenvwrapper/. > > > It also assumes you have both subversion, mecurial, and git clients > > locally. > > > * mkvirtualenv myblog --no-site-packages > > * workon myblog > > * cd myblog > > * git clone git://github.com/montylounge/django-mingus.git > > * cd django-mingus/mingus > > * pip install -r stable-requirements.txt > > * ... wait a bit > > * mv local_settings.py.template local_settings.py > > * ./manage.py syncdb > > * .manage.py loaddata test_data.json > > * ./manage.py runserver > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck
python2.4 manage.py syncdb, runs but now get another error: (myblog)-bash-3.2$ python2.4 manage.py syncdb Traceback (most recent call last): File "manage.py", line 16, in ? execute_manager(settings) File "/usr/lib/python2.4/site-packages/django/core/management/ __init__.py", line 360, in execute_manager setup_environ(settings_mod) File "/usr/lib/python2.4/site-packages/django/core/management/ __init__.py", line 343, in setup_environ project_module = import_module(project_name) File "/usr/lib/python2.4/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/home/cc11/Envs/myblog/django-mingus/mingus/../mingus/ __init__.py", line 2, in ? from django_proxy.signals import proxy_save, proxy_delete ImportError: No module named django_proxy.signals (myblog)-bash-3.2$ On 17 July, 15:12, Peter Herndon wrote: > From the virtualenvwrapper instructions: > "First, some initialization steps. Most of this only needs to be done one > time. You will want to add the command tosource > /usr/local/bin/virtualenvwrapper.sh to your shell startup file, changing the > path to virtualenvwrapper.sh depending on where it was installed by pip." > > Did you do this part? > > On Jul 17, 2010, at 9:28 AM, justin jools wrote: > > > still trying to install django-mingus > > > I loggged into my server with ssh and installed virtualenv and > > virtualenvwrapper > > easy_install virtualenv > > pip virtualenvwrapper > > ok... > > > trying to follow the install instructions(bottom). I guess virtualenv/ > > virtualenvwrapper need setting up? > > 1. mkvirtualenv myblog --no-site-packages (virtualenv myblog --no- > > site-packages works but I guess this is not correct) > > error: > > -bash: mkvirtualenv: command not found > > > 2.workon myblog > > error: > > -bash: workon: command not found > > > -- > > The quick start assumes basic familiarity with "vitualenv":http:// > > virtualenv.openplans.org/, "virtualenv wrapper":http:// > >www.doughellmann.com/projects/virtualenvwrapper/. > > > It also assumes you have both subversion, mecurial, and git clients > > locally. > > > * mkvirtualenv myblog --no-site-packages > > * workon myblog > > * cd myblog > > * git clone git://github.com/montylounge/django-mingus.git > > * cd django-mingus/mingus > > * pip install -r stable-requirements.txt > > * ... wait a bit > > * mv local_settings.py.template local_settings.py > > * ./manage.py syncdb > > * .manage.py loaddata test_data.json > > * ./manage.py runserver > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to install django-mingus blog? installed vrtualenv + virtualenvwrapper now I'm stuck
hunted down error here: http://github.com/montylounge/django-mingus/issues/issue/36 something to do with error in beautiful soup version On 17 July, 15:12, Peter Herndon wrote: > From the virtualenvwrapper instructions: > "First, some initialization steps. Most of this only needs to be done one > time. You will want to add the command tosource > /usr/local/bin/virtualenvwrapper.sh to your shell startup file, changing the > path to virtualenvwrapper.sh depending on where it was installed by pip." > > Did you do this part? > > On Jul 17, 2010, at 9:28 AM, justin jools wrote: > > > still trying to install django-mingus > > > I loggged into my server with ssh and installed virtualenv and > > virtualenvwrapper > > easy_install virtualenv > > pip virtualenvwrapper > > ok... > > > trying to follow the install instructions(bottom). I guess virtualenv/ > > virtualenvwrapper need setting up? > > 1. mkvirtualenv myblog --no-site-packages (virtualenv myblog --no- > > site-packages works but I guess this is not correct) > > error: > > -bash: mkvirtualenv: command not found > > > 2.workon myblog > > error: > > -bash: workon: command not found > > > -- > > The quick start assumes basic familiarity with "vitualenv":http:// > > virtualenv.openplans.org/, "virtualenv wrapper":http:// > >www.doughellmann.com/projects/virtualenvwrapper/. > > > It also assumes you have both subversion, mecurial, and git clients > > locally. > > > * mkvirtualenv myblog --no-site-packages > > * workon myblog > > * cd myblog > > * git clone git://github.com/montylounge/django-mingus.git > > * cd django-mingus/mingus > > * pip install -r stable-requirements.txt > > * ... wait a bit > > * mv local_settings.py.template local_settings.py > > * ./manage.py syncdb > > * .manage.py loaddata test_data.json > > * ./manage.py runserver > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: install django-mingus blog / http://djangoadvent.com/1.2/everything-i-hate-about-mingus/ pls help
Trying to install django-mingus (see bottom, not easy at all!) When installing * 6 pip install -r stable-requirements.txt ironed out 1 error with BeautifulSoup==3.0.8.1 - see bottom (http:// github.com/montylounge/django-mingus/issues/issue/36) now I get markdown error, tried changing markdown2.0 to eariler verion markdown1.7 made no difference: any ideas? from markdown import version File "markdown/__init__.py", line 173, in ? etree = etree_loader.importETree() File "markdown/etree_loader.py", line 21, in importETree message(CRITICAL, "Failed to import ElementTree") File "markdown/__init__.py", line 112, in message raise MarkdownException, text markdown.MarkdownException: Failed to import ElementTree - http://djangoadvent.com/1.2/everything-i-hate-about-mingus/ 1. mkvirtualenv myblog --no-site-packages 2. workon myblog 3. cdvirtualenv 4. git clone git://github.com/montylounge/django-mingus.git 5. cd django-mingus/mingus 6. pip install -r stable-requirements.txt 7. cp local_settings.py.template local_settings.py 8. ./manage.py syncdb 9. ./manage.py loaddata test_data.json 10. ./manage.py runserver -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
django-friends | setup views.py with templates
trying to setup simple social network have installed: registration, profiles, accoutns, messages but am stuck as how to setup/link the views.py to templates/ notification. I guess this is what is needed to be done. Any help much appreciated -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django-friends | setup views.py with templates
Hi I have setup jtauber notification and friends apps but now I am stuck as to how to add views/urls to produce add friends/friends accept/friends list etc. please help me through the process thx On 6 Sep, 18:24, justin jools wrote: > trying to setup simple social network > have installed: registration, profiles, accoutns, messages > > but am stuck as how to setup/link the views.py to templates/ > notification. I guess this is what is needed to be done. > > Any help much appreciated -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django-friends help
Canyone with experience of django-friends give some setup guidelines. I have read the docs but can't follow it easily, they are a bit sparse for myself as beg-internediate level user. I have installed: dajngo apps: registration, profiles, accounts, messages, notifications and friends. I'm having understanding how to connect the notice types to friends and setup views and templates. Thanks for your 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-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.
Anyone used django-simple-friends?
Have setup django-simple-friends, adn can pass url to add/block/delete friends easily: http://127.0.0.1:8000/friends/add/jim/ http://127.0.0.1:8000/friends/block/jim/ http://127.0.0.1:8000/friends/list/admin/ I have the friend list template setup but don't know what variables to pick up from views @login_required def friend_list(request, username=None, paginate_by=None, page=None, allow_empty=True, template_name='friends/friends_list.html', extra_context=None, template_object_name='friends'): if username: user = get_object_or_404(User, username=username) else: user = request.user friends = Friendship.objects.friends_of(user) if extra_context is None: extra_context = {} incoming_requests = FriendshipRequest.objects.filter( to_user=request.user, accepted=False) outgoing_requests = FriendshipRequest.objects.filter( from_user=request.user, accepted=False) extra_context['target_user'] = user extra_context['friendship_requests'] = {'incoming': incoming_requests, 'outgoing': outgoing_requests} extra_context['user_blocks'] = request.user.user_blocks.blocks.all() return object_list(request, queryset=friends, paginate_by=paginate_by, page=page, allow_empty=allow_empty, template_name=template_name, extra_context=extra_context, template_object_name=template_object_name): full app/views: http://github.com/muhuk/django-simple-friends/blob/master/friends/views.py Have tried: {% for myfriend in friends_list %} {{ myfriend.friends.username }} {% endfor %} also how to setup friends tags: http://github.com/muhuk/django-simple-friends/blob/master/friends/templatetags/friends_tags.py Any help gretaly appreciated -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
django-simple-freinds: template tags and Friendship request
Hi Muhuk, I am using django-simple-friends app, much easier to setup than django- friends. but need a little help and was hoping for some guidance. I have set up friends_list.html no problem: Friend List Friends for {{ user }} {% for friends in friends_list %} {{ friends.username }} {% endfor %} and understand how to send friend request via url: http://127.0.0.1:8000/friends/add/jim but I am having problems listing friend requests: {{ friendship_requests.incoming }} spits out (below) and I coudn't work how to remove the [< >] or access the User sending the friend request. [] So I figured this is wrong to do it. So I tried templatetags: {% load friends_tags %} {% add_to_friends 3 %} which works, and redirects to _add_to.html which I'm guessing should have a message like You have made a friend request to User _ don't know how to get User being sent to. Do you have a working example or can you help me clear up these issues. Thanks for your help Sincerely, JusinJools -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
django simple friends help
Hi Muhuk, I am using django-simple-friends app and I was hoping someone would give me some guidance. http://github.com/muhuk/django-simple-friends I have set up friends_list.html no problem: Friend List Friends for {{ user }} {% for friends in friends_list %} {{ friends.username }} {% endfor %} and understand how to send friend request via url: http://127.0.0.1:8000/friends/add/jim but I am having problems listing friend requests: {{ friendship_requests.incoming }} spits out (below) and I coudn't work how to remove the [< >] or access the User sending the friend request. [] So I figured this is wrong to do it. So I tried templatetags: {% load friends_tags %} {% add_to_friends 3 %} which works, and redirects to _add_to.html which I'm guessing should have a message like You have made a friend request to User _ don't know how to get User being sent to. Does anyone have a working example or can you help me clear up these issues. Thanks for your help Sincerely, JusinJools -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
django-simple-friends help
Hi, I am using django-simple-friends app and was hoping you would give me some guidance. http://github.com/muhuk/django-simple-friends I have set up friends_list.html no problem: Friend List Friends for {{ user }} {% for friends in friends_list %} {{ friends.username }} {% endfor %} and understand how to send friend request via url: http://127.0.0.1:8000/friends/add/jim but I am having problems listing friend requests: {{ friendship_requests.incoming }} spits out (below) and I coudn't work how to remove the [< >] or access the User sending the friend request. [] So I figured this is wrong to do it. So I tried templatetags: {% load friends_tags %} {% add_to_friends 3 %} which works, and redirects to _add_to.html which I'm guessing should have a message like You have made a friend request to User _ don't know how to get User being sent to. Does anyone have a working example or can you help me clear up these issues. Thanks for your help Sincerely, JusinJools -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django-simple-freinds: template tags and Friendship request
Hi Preston thanks for your response but still having problem with this: views.py (full list below) passes: extra_context['friendship_requests'] = {'incoming': incoming_requests, 'outgoing': outgoing_requests} I have tried looping through this to extract from_user and to_user as seperate variables but it doesnt work: test for friendship_requests {% for friendship_requests in friendsrequest_list %} {{ friendship_requests.incoming.from_user}} {% endfor %} although not producing an error it write out no data... Could you suggest how to extract from_user and to_user variables. My other question is regarding the templatetags (full listing add bottom) I think it works like this: {% load friends_tags %} {% add_to_friends target_user %} it then redirects to _add_to.htmtl template, I'm not entirely sure what I should have in this template: something like 'User1 was added to your friends' Thanks for your help views @login_required def friend_list(request, username=None, paginate_by=None, page=None, allow_empty=True, template_name='friends/friends_list.html', extra_context=None, template_object_name='friends'): if username: user = get_object_or_404(User, username=username) else: user = request.user friends = Friendship.objects.friends_of(user) if extra_context is None: extra_context = {} incoming_requests = FriendshipRequest.objects.filter( to_user=request.user, accepted=False) outgoing_requests = FriendshipRequest.objects.filter( from_user=request.user, accepted=False) extra_context['sender_user'] = request.user extra_context['target_user'] = user extra_context['friendship_requests'] = {'incoming': incoming_requests, 'outgoing': outgoing_requests} extra_context['user_blocks'] = request.user.user_blocks.blocks.all() return object_list(request, queryset=friends, paginate_by=paginate_by, page=page, allow_empty=allow_empty, template_name=template_name, extra_context=extra_context, template_object_name=template_object_name) models class FriendshipRequest(models.Model): from_user = models.ForeignKey(User, related_name="invitations_from") to_user = models.ForeignKey(User, related_name="invitations_to") message = models.CharField(max_length=200, blank=True) created = models.DateTimeField(default=datetime.datetime.now, editable=False) accepted = models.BooleanField(default=False) class Meta: verbose_name = _(u'friendship request') verbose_name_plural = _(u'friendship requests') unique_together = (('to_user', 'from_user'),) def __unicode__(self): return _(u'%(from_user)s wants to be friends with % (to_user)s') % \ {'from_user': unicode(self.from_user), 'to_user': unicode(self.to_user)} def accept(self): Friendship.objects.befriend(self.from_user, self.to_user) self.accepted = True self.save() signals.friendship_accepted.send(sender=self) def decline(self): signals.friendship_declined.send(sender=self, cancelled=False) self.delete() def cancel(self): signals.friendship_declined.send(sender=self, cancelled=True) self.delete() template tags full version at : http://github.com/muhuk/django-simple-friends/blob/master/friends/templatetags/friends_tags.py @register.tag def add_to_friends(parser, token): bits = token.split_contents() tag_name, bits = bits[0], bits[1:] if not bits: raise template.TemplateSyntaxError( '%s tag requires at least one argument' % tag_name) elif len(bits) > 3: raise template.TemplateSyntaxError( '%s tag takes at most three arguments' % tag_name) if len(bits) == 3: if bits[2].startswith('"') and bits[2].endswith('"'): bits[2] = bits[2][1:-1] else: raise template.TemplateSyntaxError( 'Third argument for %s tag must be a string' % tag_name) return AddToFriendsNode(*bits) class AddToFriendsNode(template.Node): def __init__(self, target_user, current_user='user', template_name='friends/_add_to.html'): self.target_user = template.Variable(target_user) self.current_user = template.Variable(current_user) self.template_name = template_name def render(self, context): target_user = self.target_user.resolve(context) current_user = self.curren
have gdata-2.0.11 installed | cant find gdata.contacts.service | error: no attribute 'GDATA_NAMESPACE'
I am installing django-friends and am getting error from importer.py: (full file at: http://github.com/jtauber/django-friends/blob/master/friends/importer.py) cannot not import this, yet I have gdata-2.0.11 on my python path, with contacts.service inside import gdata.contacts.service is causing this error Tried contacts in module friends_app.views. Error was: 'module' object has no attribute 'GDATA_NAMESPACE' Any ideas why it cant run or find gdata.contacts.service? Many 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-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.
Template library account_tags not found | 'account_tags' is not a valid tag library
getting this error trying to load templatetag in my account_tags template: {% load account_tags %} get this error: (detail at btootm) Template library account_tags not found | 'account_tags' is not a valid tag library tried at bash: from django.contrib.admin.templatetags import account_tags get error: ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined so tried (as suggested on one site): set DJANGO_SETTINGS_MODULE=mysite.settings but didnt make any difference Does anyone have any ideas? Have been bashing my head with this for a couple of hours Many Thanks. --- TemplateSyntaxError at /friends/invite/ 'account_tags' is not a valid tag library: Template library account_tags not found, tried django.templatetags.account_tags,django.contrib.admin.templatetags.account_tags,django.contrib.humanize.templatetags.account_tags,tagging.templatetags.account_tags,timezones.templatetags.account_tags Request Method: GET Request URL:http://127.0.0.1:8000/friends/invite/ Django Version: 1.3 pre-alpha Exception Type: TemplateSyntaxError Exception Value: 'account_tags' is not a valid tag library: Template library account_tags not found, tried django.templatetags.account_tags,django.contrib.admin.templatetags.account_tags,django.contrib.humanize.templatetags.account_tags,tagging.templatetags.account_tags,timezones.templatetags.account_tags Exception Location: C:\Python26\lib\site-packages\django\template \defaulttags.py in load, line 921 Python Executable: C:\Python26\python.exe Python Version: 2.6.4 Python Path:['C:\\django\\swift', 'C:\\Python26\\lib\\site-packages\ \html5lib-0.90-py2.6.egg', 'C:\\Python26... -- 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.
help setting 'apps' folder Error: No module named registration
I have setup 'apps' folder with __init__.py inside and 'registration' app inside 'apps' I then refer to it with: 'apps.registration' in installed_apps/settings.py When I run syncdb it gives error: Error: No module named registration -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: help setting 'apps' folder Error: No module named registration
add to settings.py: import os import sys PROJECT_ROOT = os.path.dirname(__file__) sys.path.insert(0, os.path.join(PROJECT_ROOT, "apps")) full article: http://codespatter.com/2009/04/10/how-to-add-locations-to-python-path-for-reusable-django-apps/ On Sep 21, 10:14 pm, justin jools wrote: > I have setup 'apps' folder with __init__.py inside and > 'registration' app inside 'apps' > > I then refer to it with: > 'apps.registration' in installed_apps/settings.py > > When I run syncdb it gives error: > > Error: No module named registration -- 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.
help setting 'apps' folder... path issue
I am trying to run my apps from 'apps' folder and have 'apps.registration' installed apps/settings.py but the admin.py is having some problem with the path and I get error in admin: ImportError at /admin No module named registration.models Request Method: GET Request URL: http://devhead.alwaysdata.net/admin Django Version: 1.2 Exception Type: ImportError Exception Value: No module named registration.models Exception Location: /home/devhead/www/mysite/apps/registration/ admin.py in , line 3 -- 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.
InterfaceError at /admin/ Error binding parameter 1 - probably unsupported type.
Have searched everywhere for solution to this error (below) when loggin in to admin I also get this error during form post rediect, thinking it it something to do with intalled apps/middleware or post setting maybe but dont know what. Anyone come across this? Many Thanks InterfaceError at /admin/ Error binding parameter 1 - probably unsupported type.Request Method: POST Request URL: http://127.0.0.1:8000/admin/ Django Version: 1.3 pre-alpha Exception Type: InterfaceError Exception Value: Error binding parameter 1 - probably unsupported type. Exception Location: C:\Python26\lib\site-packages\django\db\backends \sqlite3\base.py in execute, line 200 Python Executable: C:\Python26\python.exe Python Version: 2.6.4 Environment: Request Method: POST Request URL: http://127.0.0.1:8000/admin/ Django Version: 1.3 pre-alpha Python Version: 2.6.4 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.humanize', 'django.contrib.messages', 'django.contrib.admin', 'registration', 'notification', 'messages', 'templatetags', 'account', 'django_openid', 'openid', 'announcements', 'basic_profiles', 'signup_codes', 'authsub', 'autocomplete_app', 'uni_form', 'core', 'emailconfirmation', 'about'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django_openid.consumer.SessionConsumer', 'account.middleware.LocaleMiddleware', 'django.middleware.doc.XViewMiddleware', 'pagination.middleware.PaginationMiddleware') Traceback: File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in get_response 100. response = callback(request, *callback_args, **callback_kwargs) File "C:\Python26\lib\site-packages\django\contrib\admin\sites.py" in wrapper 207. return self.admin_view(view, cacheable)(*args, **kwargs) File "C:\Python26\lib\site-packages\django\utils\decorators.py" in _wrapped_view 76. response = view_func(request, *args, **kwargs) File "C:\Python26\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func 69. response = view_func(request, *args, **kwargs) File "C:\Python26\lib\site-packages\django\contrib\admin\sites.py" in inner 189. return self.login(request) File "C:\Python26\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func 69. response = view_func(request, *args, **kwargs) File "C:\Python26\lib\site-packages\django\contrib\admin\sites.py" in login 342. login(request, user) File "C:\Python26\lib\site-packages\django\contrib\auth\__init__.py" in login 69. user.save() File "C:\Python26\lib\site-packages\django\db\models\base.py" in save 434. self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "C:\Python26\lib\site-packages\django\db\models\base.py" in save_base 542. created=(not record_exists), raw=raw, using=using) File "C:\Python26\lib\site-packages\django\dispatch\dispatcher.py" in send 162. response = receiver(signal=self, sender=sender, **named) File "C:\django\pinax_rip\apps\account\models.py" in create_account 67. account, created = Account.objects.get_or_create(user=instance) File "C:\Python26\lib\site-packages\django\db\models\manager.py" in get_or_create 135. return self.get_query_set().get_or_create(**kwargs) File "C:\Python26\lib\site-packages\django\db\models\query.py" in get_or_create 373. obj.save(force_insert=True, using=self.db) File "C:\Python26\lib\site-packages\django\db\models\base.py" in save 434. self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "C:\Python26\lib\site-packages\django\db\models\base.py" in save_base 527. result = manager._insert(values, return_id=update_pk, using=using) File "C:\Python26\lib\site-packages\django\db\models\manager.py" in _insert 195. return insert_query(self.model, values, **kwargs) File "C:\Python26\lib\site-packages\django\db\models\query.py" in insert_query 1480. return query.get_compiler(using=using).execute_sql(return_id) File "C:\Python26\lib\site-packages\django\db\models\sql\compiler.py" in execute_sql 783. cursor = super(SQLInsertCompiler, self).execute_sql(None) File "C:\Python26\lib\site-packages\django\db\models\sql\compiler.py" in execute_sql 727. cursor.execute(sql, params) File "C:\Python26\lib\site-packages\django\db\backends\util.py" in execute 15. return self.cursor.execute(sql, params) File "C:\Python26\lib\site-packages\django\db\backends \sqlite3\base.py" in execute 200. return Database.Curs
django-registration vs django-account + django-url | opinions?
I have tried out django-registration and liked the simplicity of it, but following the pinax project, (and using their apps to instruct my own build) I see they use: django-account which also requires django-url I have started just started playing with it and was wondering if anyone has any opinions of using django-account over django- registration? Is one more flexible/has more features? Pinax must have some reason for choosing this app over the impressive django-registration appreciate your feedback -- 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.
newbie: how do i filter a list in a template?
models.py - for Car Manufacturer and Models class dbModel1(models.Model): dbfield1 = models.CharField("Product Manufacturer", max_length=200, unique=True) class dbModel2(models.Model): dbforeignkey = models.ForeignKey(dbModel1) dbfield1 = models.CharField("Model", max_length=20) dbfield2 = models.CharField("Info", max_length=200) I want to create a complete list of manufacturers and models for the menu sidebar like this (below) for using with Ajax menu, (this is the first list so no id is passed). Audi model1 model2 BMW model1 model2 Saab model1 model2 I have tried a nested loop like this but can't find anyway of filtering the second loop of models on manufacturer, so i just get a list of all models in the second loop. {% extends "base.html" %} {% block title %}The current time{% endblock %} {% block sidebar %} Manufacturer {% for make in make_list %} {{ make.dbfield1 }}/ {% for model in model_list %} Model {{ model.dbfield1}}/ {% endfor %} {% endfor %} {% endblock %} -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: newbie: how do i filter a list in a template?
I solved it after playing around for 3 hours it came to me: compare the make.id to model.dbforeignkey.id hope this helps someone :) {% for make in make_list %} make {{ make }} {% for model in model_list %} {% ifequal make.id model.dbforeignkey.id %} model {{ model}} {% endifequal %} {% endfor %} {% endfor %} -- 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.
simple friends template help
need some help setting up templates for friends list: how do I iterate a list of invited friends and are friends? I have tried: {% for friends in Friendship.objects.are_friends %} target_user: {{ friends.target_user}} current_user:{{ friends.current_user}} are_friends: {{ friends.are_friends}} is_invited: {{ friends.is_invited}} {% endfor %} gives me nothing but: {{ is_invited }} {{ are_friends }} {{ target_user }} {{ current_user }} output: false false name name I have been trying to figure this out for months. Please 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.
django-simple-friends template help
need some help setting up templates for friends list: how do I iterate a list of invited friends and are friends? I have tried: {% for friends in Friendship.objects.are_friends %} target_user: {{ friends.target_user}} current_user:{{ friends.current_user}} are_friends: {{ friends.are_friends}} is_invited: {{ friends.is_invited}} {% endfor %} gives me nothing but: {{ is_invited }} {{ are_friends }} {{ target_user }} {{ current_user }} output: false false name name I have been trying to figure this out for months. Please 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: simple friends template help
I now have a different overriding problem with this simple-friends app: url patterns are simple: urlpatterns = patterns('friends.views', url(r'^$', 'friend_list', name='friends_home'), url(r'^list/(?P\w+)/$', 'friend_list', name='friend_list'), url(r'^add/(?P\w+)/$', 'friendship_request', name='friendship_request'), url(r'^accept/(?P\w+)/$', 'friendship_accept', name='friendship_accept'), url(r'^decline/(?P\w+)/$', 'friendship_decline', name='friendship_decline'), url(r'^cancel/(?P\w+)/$', 'friendship_cancel', name='friendship_cancel'), url(r'^delete/(?P\w+)/$', 'friendship_delete', name='friendship_delete'), url(r'^block/(?P\w+)/$', 'block_user', name='block_user'), url(r'^unblock/(?P\w+)/$', 'unblock_user', name='unblock_user'), ) but when I try /friends/add/jo I get: DoesNotExist at /friends/add/jo/ Friendship matching query does not exist. Request Method: GET Request URL:http://127.0.0.1:8000/friends/add/jo/ Django Version: 1.3 pre-alpha Exception Type: DoesNotExist Exception Value: Friendship matching query does not exist. Any ideas? -- 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: simple friends template help
I think I've resolved some of my problems: I was wondering how to list friend request but now I think I have to use Django-Notifications to pick up the signals, would this be right? complete models: class FriendshipRequest(models.Model): from_user = models.ForeignKey(User, related_name="invitations_from") to_user = models.ForeignKey(User, related_name="invitations_to") message = models.CharField(max_length=200, blank=True) created = models.DateTimeField(default=datetime.datetime.now, editable=False) accepted = models.BooleanField(default=False) class Meta: verbose_name = _(u'friendship request') verbose_name_plural = _(u'friendship requests') unique_together = (('to_user', 'from_user'),) def __unicode__(self): return _(u'%(from_user)s wants to be friends with % (to_user)s') % \ {'from_user': unicode(self.from_user), 'to_user': unicode(self.to_user)} def accept(self): Friendship.objects.befriend(self.from_user, self.to_user) self.accepted = True self.save() signals.friendship_accepted.send(sender=self) def decline(self): signals.friendship_declined.send(sender=self, cancelled=False) self.delete() def cancel(self): signals.friendship_declined.send(sender=self, cancelled=True) self.delete() class FriendshipManager(models.Manager): def friends_of(self, user, shuffle=False): qs = User.objects.filter(friendship__friends__user=user) if shuffle: qs = qs.order_by('?') return qs def are_friends(self, user1, user2): return bool(Friendship.objects.get(user=user1).friends.filter( user=user2).count()) def befriend(self, user1, user2): Friendship.objects.get(user=user1).friends.add( Friendship.objects.get(user=user2)) def unfriend(self, user1, user2): Friendship.objects.get(user=user1).friends.remove( Friendship.objects.get(user=user2)) class Friendship(models.Model): user = models.OneToOneField(User, related_name='friendship') friends = models.ManyToManyField('self', symmetrical=True) objects = FriendshipManager() class Meta: verbose_name = _(u'friendship') verbose_name_plural = _(u'friendships') def __unicode__(self): return _(u'%(user)s\'s friends') % {'user': unicode(self.user)} def friend_count(self): return self.friends.count() friend_count.short_description = _(u'Friends count') def friend_summary(self, count=7): friend_list = self.friends.all().select_related(depth=1) [:count] return u'[%s%s]' % (u', '.join(unicode(f.user) for f in friend_list), u', ...' if self.friend_count() > count else u'') friend_summary.short_description = _(u'Summary of friends') class UserBlocks(models.Model): user = models.OneToOneField(User, related_name='user_blocks') blocks = models.ManyToManyField(User, related_name='blocked_by_set') class Meta: verbose_name = verbose_name_plural = _(u'user blocks') def __unicode__(self): return _(u'Users blocked by %(user)s') % {'user': unicode(self.user)} def block_count(self): return self.blocks.count() block_count.short_description = _(u'Blocks count') def block_summary(self, count=7): block_list = self.blocks.all()[:count] return u'[%s%s]' % (u', '.join(unicode(user) for user in block_list), u', ...' if self.block_count() > count else u'') block_summary.short_description = _(u'Summary of blocks') def create_friendship_instance(sender, instance, created, raw, **kwargs): if created and not raw: Friendship.objects.create(user=instance) models.signals.post_save.connect(create_friendship_instance, sender=User, dispatch_uid='friends.models.create_' \ 'friendship_instance') def create_userblocks_instance(sender, instance, created, raw, **kwargs): if created and not raw: UserBlocks.objects.create(user=instance) models.signals.post_save.connect(create_userblocks_instance, sender=User, dispatch_uid='friends.models.create_' \ 'userblocks_instance') On Mar 28, 6:57 pm, Joel Goldstick wrote: > On Mon, Mar 28, 2011 at 12:14 PM, mike171562 > wrote: &g
django-simple-friends + notifications: how to intergrate?
I have both simple-friends and notifications running and workign and have set up notice types. How do I use signals from friend request for instance to trigger notice types? examples simple-friends: class FriendshipRequest(models.Model): from_user = models.ForeignKey(User, related_name="invitations_from") to_user = models.ForeignKey(User, related_name="invitations_to") message = models.CharField(max_length=200, blank=True) created = models.DateTimeField(default=datetime.datetime.now, editable=False) accepted = models.BooleanField(default=False) class Meta: verbose_name = _(u'friendship request') verbose_name_plural = _(u'friendship requests') unique_together = (('to_user', 'from_user'),) def __unicode__(self): return _(u'%(from_user)s wants to be friends with % (to_user)s') % \ {'from_user': unicode(self.from_user), 'to_user': unicode(self.to_user)} def accept(self): Friendship.objects.befriend(self.from_user, self.to_user) self.accepted = True self.save() signals.friendship_accepted.send(sender=self) def decline(self): signals.friendship_declined.send(sender=self, cancelled=False) self.delete() def cancel(self): signals.friendship_declined.send(sender=self, cancelled=True) self.delete() notifications: notification.send(Friendship.objects.friends_for_user(self.owner.id), "listing_new", {'listing':self, }, ) -- 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 Notification - can't send notifications
can't send notifications have tried adding (in notification models.py): if notification: notification.send([self.from_user], "friends_accept", {"invitation": self, "new_user": self.to_user}) but does nothing although I can enter notices manually in admin. -- 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 custom template tags: how to send to (parser, token)
I've just started using custom tags and need some help parsing info to: @register.tag def friends_of(parser, token): tag_name, user_var = token.split_contents() return FriendsOfNode(user_var) class FriendsOfNode(template.Node): def __init__(self, user_var): self.user_var = template.Variable(user_var) def render(self, context): user = self.user_var.resolve(context) context.update({'friends': Friendship.objects.friends_of(user, True)}) return u'' I tried: friends: {% friends_of {{ user }} %} output: ValueError at /friends/ too many values to unpack -- 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.