I have a need to match cold leads against a database of our clients.
The leads come from a third party provider in bulk (thousands of records) and sales is asking us to (in their words) "filter out our clients" so they don't try to sell our service to a established client.
Obviously, there are misspellings in the leads. Charles become...
Hello,
In my django project I would like to be able to delete certain entries in the database automatically if they're too old. I can write a function that checks the creation_date and if its too old, deletes it, but I want this function to be run automatically at regular intervals..Is it possible to do this?
Thanks
...
I am implementing ImageKit in a Django app and I have everything set up properly to my knowledge. When I run the command
$python manage.py ikflush main
the command seems to run fine but nothing appears to happen. None of the images get resized or stored and cannot be accessed.
main.models.py:
class ProductImage(models.Model):
pr...
I'm using Git to push my code from my development machine to my testing server.
Dev: Mac, Python 2.6, sqllite and
Test: Linux, Python 2.7, MySQL
I took an early dev database and exported it to MySQL for initial testing.
So now I'm regularly pushing new code to the testing server. In general it seems to be working well, but I'm ge...
I love the Thauber Schedule datepicker, but it's a datetime picker and I can't get it to just do dates. Any recommendations for nice looking datepickers that come with instructions on how to integrate with a Django date form field?
...
I wanted to deloy a pinax project on a mediatemple. Does anyone know how to go about making it work there? or any other webhost?
...
In my django application I have my URLS.PY configured to accept requests to /community/user/id and /community/user/id/ with:
url(r'^(?P<username>[\w-]+)/(?P<cardId>\d+)/$', 'singleCard.views.singleCard', name='singleCardView'),
I did this as some times people will add an ending "/" and I didn't want to raise a 404.
However parts of my...
Hi everyone. On one of my pages I would like to display a subset of a sorted list of objects. The entire list of relevant objects is extremely long and has a good chance of changing while the user is viewing the page. I don't mind that the page is not up to date, but I do need to ensure that when the user goes to the next page, the user ...
I have a QuerySet of teams ordered by school name. One of the attributes is a model method that keeps track of the team's winning percentage. I want to order the teams from highest winning percentage to lowest. If teams have the same winning percentage, I want them to be ordered alphabetically by school. How do I get something like this:...
Is it possible for an inlineformset_factory to take in a ModelForm as well as a model. When I try to run this I get an error message 'NoneType' object is not iterable.
Please help, I've spent an entire day trying to figure this out. Thanks.
Code:
Model.py
class FilterForm(ModelForm):
firstFilter = forms.BooleanField(label='First Filt...
When a user is not logged I'm trying to enter areas of site for authenticated users only I should be redirected to my login site with ?next= and here my LOGIN_REDIRECT_URL from settings. But instead of /users/login in my address bar /accounts/login is displayed. What should I change to get the right url ?
settings :
AUTH_PROFILE_MODULE...
My settings has the following MIDDLEWARE_CLASSES defined:
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_cas.middleware.CASMiddleware',
'django.contr...
Is there any django application that can create other apps merely based on a sql / csv file provided that a default template is found for the new applications.
...
Can someone help me here?
My form looks like this:
class RecieveLineForm(forms.ModelForm):
purchaseorderline = forms.IntegerField(widget=forms.HiddenInput())
rl_quantity = forms.IntegerField(label='Quantity')
class Meta:
model = RecieveLine
Now, I need to set a default value for my purchaseorderline which is origi...
From the Django documentation...
When you're only dealing with simple many-to-many relationships such as mixing and matching pizzas and toppings, a standard ManyToManyField is all you need. However, sometimes you may need to associate data with the relationship between two models.
For example, consider the case of an application...
I have a simple view, but can't get it to do what it's supposed to, which is simply flip a Boolean Value:
def change_status(request):
request.user.get_profile().active=not request.user.get_profile().active
return render_to_response('holdstatus.html', {
'user' : request.user,
})
In addition to "not", I've tried '-' and '!', but al...
I have a djapian search based on the tutorial that pulls back data from one model. How do I limit results based on date being null or not null (such as DeletedDate). When I delete a record I set DeletedDate=now. I do not want these records returned in my results so I need to filter after the search occurs. I've tried several things with ...
My setup is Django 1.2 running via mod_wsgi under Debian Lenny.
I have a such structure:
/root/
project1/appx
models.py
project2/appy
models.py
management/
commands/
mycommand.py
Now I want to import Foox model fro...
Is it possible and correct to have multiple sites under single django project. So that there will be globally shared sittings file,urls files along with global shared 'apps' for all the sites and a common admin interface for all the sites under the single django project. Each site might have its own setting,urls and templates that will b...
I have two models Property and Image, related by foreign key such that each Property has multiple instances of Image. I'm trying to retrieve a queryset of all the properties - listing all fields - and the number of images that each property has. I am aware that I could do this as two distinct queries, but I don't feel that this is a part...