Is it possible to implement an equivalent of sudo for Django profiles ? I'm using the basic authentication system django.contrib.auth.
Usecase: Sometimes, users report bugs which are only reproductible in their profile, so, each time, I change their password, log in, fix the bug and replaces the password with the original one.
I tried...
I'm trying to deploy a django app to Weblogic and it cannot find modjy. I looked in the jython.jar that is included in the generated war file, and the modjy servlet is indeed there. Below is the error the server gets when deploying the app.
<Feb 18, 2010 11:18:49 AM EST> <Error> <HTTP> <BEA-101216> <Servlet: "modjy" failed to preload o...
Hello
I need to arrange some kind of encrpytion for generating user specific links. Users will be clicking this link and at some other view, related link with the crypted string will be decrypted and result will be returned.
For this, I need some kind of encryption function that consumes a number(or a string) that is the primary key of ...
Hello Django Gods..
I am trying to simply access a the values and names of a Many to Many Model in a template by name. Can someone show me what I'm doing wrong.
I have a model called IP. This model can have several attributes. I want to call the "value" of a a particular attribute.
For example:
I have an IP Block named Foo. Foo ...
I'm creating a decorator for Django views that will check permissions in a non-Django-managed database. Here is the decorator:
def check_ownership(failure_redirect_url='/', *args, **kwargs):
def _check_ownership(view):
def _wrapper(request, csi=None):
try:
opb_id=request.user.get_profile().opb_id
...
Does anyone know about any solutions for keeping data bigger, than 1mb in memcached ?
This is no big deal to cut big data to 1mb pieces before setting and merge this pieces after getting from memcached. And this algorithm can work transparently for users.
This can works on the base of this snippet http://www.djangosnippets.org/snippe...
i'm using Python with MySQL and Django. I keep seeing this error and I can't figure out where the exception is being thrown:
Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now") in > ignored
I have many "try" and "exception" blocks in my code--if the exception occurred within...
I'm creating a multiple-tenant application that won't use any of the standard Django Admin (except for internal use which will have access to all tenants... that's simple enough). I'm trying to create an authorization system of my own and I'm not interested in using the standard User model (or any built-in application's model). My applic...
Can a kind soul point me to some good documentation or code samples on setting up group based permissions with Django? My requirements are fairly simple - I just need to enable/disable functionality based on what groups a user belongs to.
...
I have a path to a zip file. I don't know how to
retrieve the file from the hard drive
or
open that zip file. Does anyone know?
The zip file is a zip file, but it's really a .epub file.
...
I have python server based on django and celery.
Each time computer restarts, apache2 starts so my server is working, BUT I have to restart celery manually (going to my project directory and executing "python manage.py celeryd"). What is the correct solution for production? I mean, is there a possibility to start celery as daemon?
Here...
I'm developing an SAAS and having the hardest time wrapping my brain around why I need to use "User" for anything other than myself. I don't know why but it makes me queezy to think that I, as the developer/admin of the entire software, with full Django Admin access (like the Eye of Sauron), have the same type of User object as an "Accou...
I can't figure out how I'm supposed to order these models that have a M2M relationship.
When I try to syncdb, I can't because the Model related model is not in the namespace yet, so I get:
NameError: name 'FavoriteQuestion' is not defined
If I switch places, I get:
NameError: name 'UserProfile' is not defined
class UserProfile(models....
I want to use MemcacheDB instead of Memcached because I don't have a lot of RAM for Memcached.
Will it work with django's cache framework?
Is there anything additional I would need to do?
...
I have a django model in use on a production application and I need to change the name and data type of the field with zero downtime to the site. So here is what I was planning:
1) Create the new field in the database that will replace the original field
2) Everytime an instance of the Model is loaded, convert the data form the origina...
So far the Documentation for Django has been too technical. How do I create a session and store variables in it or get variables from it? I'm new to the Django framework, hence why the Documentation is too technical. Sessions are my 'last step'.
...
I'm creating a SAAS as a project, and can't seem to wrap my dinosaur brain around this auth system. I started to roll my own system before I realized you could add on to the normal auth system. Is this completely wrong? Should I somehow extend the User model but still include all of my own attributes (username, password, etc)?
from djan...
I moved my first Django project from DjangoEurope to Webfaction, and that started an issue looking like a memory leak. With every single request memory usage of the server process goes up about 500kb. It never goes down. This goes on until Webfaction kills it for using too much memory.
I can clearly see this when I refresh the Django's ...
thanks
this is the signup view:
def signup(request, form_class=SignupForm,
template_name="account/signup.html", success_url=None):
if success_url is None:
success_url = get_default_redirect(request)
if request.method == "POST":
form = form_class(request.POST)
if form.is_valid():
use...
So far Django has good integration with several RDBMS. NoSQL, schema-less and document-oriented DBMS are picking up. What's the status of integration those on-trend and fashionable DBMSes with Django? Are there any production-ready or at least ready-to-use libraries for Django?
So far I have these at hand:
http://github.com/lethain/co...