Re: Obtaining content from Git

2014-11-21 Thread Aaron C. de Bruyn
I'm not aware of any such module, but there are a few python 'git' modules for reading/writing, etc... As for how much trouble it would be, that all depends on how familiar you are with git, python, Django, and the template system. One way you might be able to achieve what you want is to create y

Obtaining content from Git

2014-11-21 Thread martin f krafft
Hello, we have a Django project with a few pages that come from Git. Currently, Apache rewrite rules serve those files statically (and they make use of the same template/CSS as Django does, so the user does not actually notice), and it's a massive hack and pain to keep up-to-date. Hence I was thi

Re: How to install psycopg2 using Pip?

2014-11-21 Thread Kat R
This was helpful. Thank you. :) On Thursday, March 24, 2011 11:49:05 AM UTC-4, Shawn Milochik wrote: > > This actually has nothing to do with Python -- I'm talking about your > PATH, not your PYTHONPATH. > > Short version: Type 'which pg_config' at the command line. If it is > found, then it's on

Re: Django 1.7 tutorial: python manage.py migrate errors.

2014-11-21 Thread Collin Anderson
Hi, I found this: http://stackoverflow.com/questions/2384064/python-winreg-problem So, you could try installing win32all http://python.net/crew/skippy/win32/Downloads.html You don't need to install sqlite3 separately, but there's no command line tool out of the box. I've used http://sqliteadmi

Has anyone successfully used django-concurrency?

2014-11-21 Thread ian . k
Hey everyone, One last try. I've given up on django-locking, and am now trying django-concurrency because it's more modern and more likely to work on Django 1.6.8's admin interface. The documentation is very basic and doesn't actually give any examples, so I'm not sure if I've missed something

Re: problem implementing admin inline

2014-11-21 Thread Collin Anderson
Hi, Here's a hack that might solve your problem. # moduleApp/admin.py class ModuleAdmin(admin.ModelAdmin): inlines = [] # etc admin.site.register(Module, ModuleAdmin) # articleApp/admin.py from moduleApp.admin import ModuleAdmin class ArticleInline(admin.StackedInline): model = Ar

Re: Django comments app - adding each field of comments app to div classes

2014-11-21 Thread Collin Anderson
Hi, The simple way: {{ form }} The more full way: Name {{ form.user_name.errors }} Email {{ form.user_email.errors }} Disqus is a good javascript-based comment system that Django also recommends. Collin On Thursday, November 20, 2014 11:44:12 PM UTC-5, Co

Re: traceback when encountering unhandled exception and trying to send email

2014-11-21 Thread Collin Anderson
Hi, Wow. Never seen that one before. I wonder if it's a threading issue / race condition. I looks like there was an error, and then it ran into this error when trying to send an email about the original error. What gunicorn worker type are you using? You could try asking on the gunicorn list

Re: Managing a database connection object in Django

2014-11-21 Thread Collin Anderson
Hi, For simplicity and reliability, although a hair slower, it probably makes sense to create a new database connection during each request. You could define a function that gets a database connection with your parameters and then call that at the top of each view. Collin On Thursday, Novembe

Re: DecimalField returns 'This value must be a decimal number' when blank

2014-11-21 Thread Collin Anderson
Hi, Could you post a traceback? Also, what database are you using? Also also, ModelForms would help simplify your code. Check them out if you haven't. https://docs.djangoproject.com/en/dev/topics/forms/modelforms/ Thanks, Collin On Thursday, November 20, 2014 10:44:26 AM UTC-5, elcaiaimar wro

Re: Is it wrong to disable a lot of the core django features?

2014-11-21 Thread John Rodkey
Perfect. That answers my question. I was trying to avoid having the two tables in the db -- but we will just disregard them. Thank you for all of the input and quick replies. Django appears to have a great community and we are excited to get started. On Friday, November 21, 2014 3:42:46 PM U

Re: Warning / Error when testing with W flag

2014-11-21 Thread Collin Anderson
It looks like it's fixed for python 3.4 on master (the fix will eventually be in django 1.8) On Wednesday, November 19, 2014 10:15:00 AM UTC-5, Carl Meyer wrote: > > Hi Daniel, > > On 11/18/2014 02:01 AM, Daniel Grace wrote: > > Hi, > > I get another warning / error with a test command as foll

Re: Squid or Varnish for Django?

2014-11-21 Thread Collin Anderson
ESI = Edge Side Includes, where some rendering can happen on a CDN. I personally try to serve the exact same html to every user, and squeeze things like "hello so-and-so" (and csrftokens) into a cookie and display that using javascript. That way most of my webpages don't have a Vary header, and

Re: Want to change home->blog to Admin home -> blog

2014-11-21 Thread donarb
On Friday, November 21, 2014 2:02:29 PM UTC-8, Collin Anderson wrote: > > Hi, > > Is your TEMPLATE_DIRS set correctly? The tutorial recommends this: > > TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')] > > Thanks, > Collin > > > > On Tuesday, November 18, 2014 2:06:35 AM UTC-5, Sachin Tiwari w

Re: my mysite/templates/admin/base_site.html is ignored (tutorial unclear?)

2014-11-21 Thread donarb
On Friday, November 21, 2014 10:59:19 AM UTC-8, Andreas Ka wrote: > > I don't know. > How to test that? > > > > The things I have done were these: > > https://docs.djangoproject.com/en/1.7/intro/tutorial02/#customizing-your-project-s-templates > > mkdir templates > mkdir templates/admin > cp > /us

Re: Using Related Names Not Working

2014-11-21 Thread Collin Anderson
Hi, Yes, that's what I was hoping. Are you getting an error message, or what happens when you try? Collin On Tuesday, November 18, 2014 1:16:00 PM UTC-5, Shaun Livingston wrote: > > Yeah, I was on the #django IRC yesterday and they were saying something > similiar, that I should switch it to

Re: Ovreeride django mptt admin queryset

2014-11-21 Thread Collin Anderson
Hi, Try using get_queryset() instead of queryset(). Collin On Tuesday, November 18, 2014 8:02:12 AM UTC-5, Neeraj Sharma wrote: > > Hi, > > I want to override django mptt admin queryset, i want to filter the the > queryset. > I also tried the following method in admin.py but its not working.

Re: Want to change home->blog to Admin home -> blog

2014-11-21 Thread Collin Anderson
Hi, Is your TEMPLATE_DIRS set correctly? The tutorial recommends this: TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')] Thanks, Collin On Tuesday, November 18, 2014 2:06:35 AM UTC-5, Sachin Tiwari wrote: > > > > On Thursday, November 13, 2014 7:49:28 PM UTC+5:30, Sachin Tiwari wrote: >>

Re: daterange filter

2014-11-21 Thread Collin Anderson
Hi, I'm actually having a hard time seeing how your code matches up with the django-daterange-filter code you linked to. One thing to try is to as much as possible use dates instead of datetimes, or otherwise, yes, you'll need to use timedelta(days=1). Also, the "None" value means that they ke

Re: Is it wrong to disable a lot of the core django features?

2014-11-21 Thread Carl Meyer
Hi John, On 11/21/2014 02:33 PM, John Rodkey wrote: > Thank you for the quick answer. Using your recommendation, can we simply > disable the admin, groups and permissions, but still use the Authentication > (login/sessions)? The admin is already separate from auth, so that's easy to turn off

Re: Is it wrong to disable a lot of the core django features?

2014-11-21 Thread John Rodkey
Hi Carl, Thank you for the quick answer. Using your recommendation, can we simply disable the admin, groups and permissions, but still use the Authentication (login/sessions)? We will create our own authorization module for permissions/roles and groups. Best, John On Friday, November 21,

Re: Is it wrong to disable a lot of the core django features?

2014-11-21 Thread Carl Meyer
Hi John, I'll start with answering the question in your subject: no. There's nothing at all wrong with using the parts of Django that are useful to you, and not using the ones that aren't. In particular, auth and admin are part of "contrib"; that is, useful applications built on top of Django and

Re: ImportError: cannot import name 'GEOSException'

2014-11-21 Thread jogaserbia
Hi All, Thanks very much for the help. I managed to figure it out with tips for both of you. I am not sure exactly what helped finally fix it but: 1) I changed my python version from 64 bit to 32 bit 2) The script in that updated the path variables were pretty messed up, so I manually change

Is it wrong to disable a lot of the core django features?

2014-11-21 Thread John Rodkey
We are evaluating django for a new internal CRM project and have issues using many of the built in features including: the base user, permissions, and authentication. We do not wish to use the built-in admin... The level of complexity for our permissions will be based on the employees job func

Re: my mysite/templates/admin/base_site.html is ignored (tutorial unclear?)

2014-11-21 Thread Andreas Ka
I don't know. How to test that? The things I have done were these: https://docs.djangoproject.com/en/1.7/intro/tutorial02/#customizing-your-project-s-templates mkdir templates mkdir templates/admin cp /usr/local/lib/python2.7/dist-packages/django/contrib/admin/templates/admin/base_site.html tem

Re: please help: problem saving strings to the database

2014-11-21 Thread Szymon Krzemiński
Looks like the record is stored as a one-element tuple. Don't know what's the source of this behaviour yet, though. W dniu piątek, 21 listopada 2014 12:57:40 UTC+1 użytkownik Sabine Maennel napisał: > > Hello, > > I do not know why this is happening: If I try to update a database record > the t

django-locking

2014-11-21 Thread ian . k
Hi everyone, I'm posting new message because I have a different question. Has anyone had any luck using django-locking (https://github.com/RobCombs/django-locking) with a modern version of Django's admin interface? I've got it mostly working with my project. Basically Django is set up to add

Re: Deploying Django project

2014-11-21 Thread Phang Mulianto
Hi Fred, Sory for the missunderstanding ... i just remember my first time deploying manually with all the typing and typo and the step.. :) Cheers Mulianto On Fri, Nov 21, 2014 at 11:42 PM, Fred Stluka wrote: > Mulianto, > > You said: > > Fred way is good, but need time to type and remember

Re: Form doesn't show in HTML template

2014-11-21 Thread Some Developer
On 21/11/14 15:31, Vijay Khemlani wrote: If you manually call the form "as_p" method in the view (not the template), does it print the form? OK. Sorted that out. Running my program through the debugger shows that the form object exists and has the correct fields associated with it. I don't

Re: Form doesn't show in HTML template

2014-11-21 Thread Some Developer
On 21/11/14 15:31, Vijay Khemlani wrote: If you manually call the form "as_p" method in the view (not the template), does it print the form? Which method in the FormView class would I override to put that in? The get() method or the render_to_response() method? -- You received this message be

Re: django.contrib.comments depreciated, any good alternatives?

2014-11-21 Thread Scot Hacker
On Thursday, November 20, 2014 10:35:18 PM UTC-8, Code wrote: > > Hi, > > I have been facing a nightmare with django comments app. > > see: https://groups.google.com/forum/#!topic/django-users/7B2umISG-9I > > I found out it has been depreciated and so wanted to know suitable > alternatives. Disq

Re: Deploying Django project

2014-11-21 Thread Fred Stluka
Mulianto, You said: Fred way is good, but need time to type and remember all the steps. WIth fabric you will not miss a step and it can be automated. I think you misunderstood my post. The commands I showed are excerpts from my automated script. I provided them so termopro could write such

Re: Form doesn't show in HTML template

2014-11-21 Thread Vijay Khemlani
If you manually call the form "as_p" method in the view (not the template), does it print the form? On Fri, Nov 21, 2014 at 12:28 PM, Some Developer wrote: > On 20/11/14 22:07, Vijay Khemlani wrote: > >> If you set the settings TEMPLATE_DEBUG to True, does it display any >> errors? >> >> > Hmm s

Re: Form doesn't show in HTML template

2014-11-21 Thread Some Developer
On 20/11/14 22:07, Vijay Khemlani wrote: If you set the settings TEMPLATE_DEBUG to True, does it display any errors? Hmm still been trying to figure out what is going on but haven't really managed to get very far. I'm completely stumped. Has anyone got any tips as to what the problem might

Web and mobile app with Django? Kivy? sth else?

2014-11-21 Thread Mariusz Wilk
I'm new to programming. Eventually, I'd like to make a website and an android/ios app that would work together and display pretty much the same content on a mobile as on the the web. Each client would log in (via mobile or desktop) and continue solving some exercises from the place he previousl

Re: please help: problem saving strings to the database

2014-11-21 Thread Tiago Almeida
Check if you have a comma after the string. log = ClassroomLog.objects.get(...) log.text = "Hallo"*,* log.save() Sexta-feira, 21 de Novembro de 2014 11:57:40 UTC, Sabine Maennel escreveu: > > Hello, > > I do not know why this is happening: If I try to update a database record >

Django translate not translating jinja templates

2014-11-21 Thread Tom Hamilton Stubber
Hi all, I have a project that is being translated fine for the most part, but my jinja templates aren't working. If I reference them in the django.po file and then compilemessages, the page loads fine with my translations. However, if I makemessages then my entries in the .po get commented out.

Re: Problem in deploying Django 1.7 application using openshift.

2014-11-21 Thread Girish Joshi
I did not find the correct and clear instructions for bootstrapping and settings of django1.7 application for Openshift. from these two links https://stackoverflow.com/questions/26871381/deploying-a-local-django-app-using-openshift

please help: problem saving strings to the database

2014-11-21 Thread Sabine Maennel
Hello, I do not know why this is happening: If I try to update a database record the text gets into the field the wrong way: models.py from model_utils.models import TimeStampedModel class ClassroomLog(TimeStampedModel): ... text = models.TextField() then somewhere else I put data in