Search Results

Search found 4109 results on 165 pages for 'django paypal'.

Page 24/165 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Django Per-site caching using memcached

    - by Paul
    Hi, So I'm using per-site caching on a project and I've observed the following, which is kind of confusing. When I load a flat page in my browser then change it through admin and then do a refresh (within the cache timeout) there is no change in the page--as expected. However when I stat a new session in a different browser and load the page (still within the timeout) the app is hit instead of the cache, with the Isn't the cache key generated from the URL? it seems that the session state is getting in there somewhere, which is causing a cache miss. Any ideas? thanks MIDDLEWARE_CLASSES = ( 'django.middleware.cache.UpdateCacheMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.gzip.GZipMiddleware', 'django.middleware.http.ConditionalGetMiddleware', 'django.middleware.doc.XViewMiddleware', 'ittybitty.middleware.IttyBittyURLMiddleware', 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', 'maintenancemode.middleware.MaintenanceModeMiddleware', 'djangodblog.middleware.DBLogMiddleware', 'SSL.middleware.SSLRedirect', #SSL middleware to handle SSL 'django.middleware.cache.FetchFromCacheMiddleware', )

    Read the article

  • Problems with South/Django: not recognizing the Django App

    - by christmasgorilla
    I've got a Django project on my machine and when I try to use South to migrate the data schema, I get several odd errors. Example: $ python manage.py convert_to_south thisLocator /Library/Python/2.6/site-packages/registration/models.py:4: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha /Users/cm/code/thisLocator/../thisLocator/batches/models.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 There is no enabled application matching 'thisLocator'. I've followed the South documentation. Settings.py has it in the installed apps, I can run import south from the manage.py shell. Everyone else on my team is calling the app thisLocator. Am I doing something really stupid?

    Read the article

  • I keep Getting KeyError: 'tried' Whenever I Tried to Run Django Dev Server from Remote Machine

    - by Spikie
    I am running django on python2.6.1, and did start the django web server like this manage.py runserver 192.0.0.1:8000 then tried to connect to the django dev web server on http://192.0.0.1:8000/ keep getting this message on the remote computer Traceback (most recent call last): File "C:\Python26\Lib\site-packages\django\core\servers\basehttp.py", line 279, in run self.result = application(self.environ, self.start_response) File "C:\Python26\Lib\site-packages\django\core\servers\basehttp.py", line 651, in call return self.application(environ, start_response) File "C:\Python26\lib\site-packages\django\core\handlers\wsgi.py", line 241, in call response = self.get_response(request) File "C:\Python26\lib\site-packages\django\core\handlers\base.py", line 115, in get_response return debug.technical_404_response(request, e) File "C:\Python26\Lib\site-packages\django\views\debug.py", line 247, in technical_404_response tried = exception.args[0]['tried'] KeyError: 'tried' what i am doing wrong ? it seen to work ok if i run http://192.0.0.1:8000/ on the computer that runs the Django web server and have that ip 192.0.0.1:8000

    Read the article

  • Testing a Django view cause "AttributeError: 'NoneType' object has no attribute 'handler500'" error

    - by jack
    I just wanted to start testing a Django view using the code below: from django.test.client import Client c = Client() response = c.get('/search/keyword') print response.content It just throws out following error message: "/usr/local/lib/python2.6/dist-packages/django/test/client.py", line 286, in get response = self.request(**r) File "/usr/local/lib/python2.6/dist-packages/django/test/client.py", line 230, in request response = self.handler(environ) File "/usr/local/lib/python2.6/dist-packages/django/test/client.py", line 74, in __call__ response = self.get_response(request) File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 143, in get_response return self.handle_uncaught_exception(request, resolver, exc_info) File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 178, in handle_uncaught_exception callback, param_dict = resolver.resolve500() File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 268, in resolve500 return self._resolve_special('500') File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 258, in _resolve_special callback = getattr(self.urlconf_module, 'handler%s' % view_type) AttributeError: 'NoneType' object has no attribute 'handler500' The view works in browser. What's wrong with above code?

    Read the article

  • Paypal IPN setup...Ship to Zipcode and auto calculation

    - by Kunal
    Hi I have successfully setup paypal IPN on my site and its working fine. From my paypal account I have set options to ass shipping and tax calculations(only if it's Iowa). But the only issue is, on the paypal checkout page it's asking me to enter the "Ship to Zipcode" manually...if I enter and update only then the net payable is getting updated with the shipping and tax charges. Is there any variable via which I could send the ship to zip code which will work directly on the cart and make it auto calculate the charges and show it? I have tried both "zip" and "address_zip" variables. None of them worked. By the way I have multiple items on my cart so I am using the "cart" transaction type. Thanks in advance for your help.

    Read the article

  • PayPal IPN & ASP.NET MVC

    - by Wayne
    Hello - I have a strange problem that somebody can hopefully help me with. For a while now I have been using PayPal's IPN service for our website. In order to test it I have a port opened up on our firewall pointing to my machine. This has been working great with no problems at all. I recently upgraded to the RTM release of ASP.NET MVC and now things are not working. I can navigate to my IPN handler from the outside world so I know it's not my connection or a firewall issue. It simply refuses to recieve any PayPal IPN messages. I am puzzled why the page can be accessed yet the PayPal IPN server wont connect to it. I realize there could be a 1000 different reasons for this, but I am hoping somebody out there can point me in the right direction!

    Read the article

  • Paypal Payment Link into Email (Website Payments Standard)

    - by knightrider
    Hello, I trying to do billing service. Seller can create bill from my website and send to the buyer. Once seller created bill, bill detail will be send to buyer email address. What I want to know is, at the bill information email, can i send payment link whether buyer can click payment link and carried to the paypal payment page directly. Will not be landing or redirecting from our page. Can it be possible ? Because when someone request money from paypal, we get the payment link from paypal which is directly go to the payment page. Thanks. Any suggestion and information will be greatly appreciated.

    Read the article

  • paypal integration according to dynamic choices

    - by Pankaj Khurana
    Hi, I want to integrate paypal with my website. I have studied the documentation available on paypal website. My requirement is A user selects a category, based on category course is populated,user selects course and discount. I want the user to pay through paypal according to the course selected. Also the data should be inserted into a table after successfull payment. I have checked sample code also but i am unable to figure out how to accomplish this task ie how to make it dynamic according to the user choice. I think ipn would be used but not sure. Plese help Thanks

    Read the article

  • django threadedcomments

    - by Patrick
    Hi folks, I would like to setup a comment systems on my site, using django threadedcomments, and I follow all the steps in the Tutorial, however, I get the following error: No module named newforms.util I am not sure what causing this issue, here is my configuration: #settings.py INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'myproject.myapp', 'threadedcomments', ) #urls.py from django.conf import settings from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), (r'^threadedcomments/', include('threadedcomments.urls')), ) Please let me know if there is another better choice for commenting, as long as the comment system is flexible and able to do lot of customization, as well as threadedcomment, of coz, integrating with Rating, I am happy to use the other one. Thanks guys.

    Read the article

  • Paypal credit card validation

    - by Naresh
    Hi all, I want to check that the credit card number provided by customer to my site is valid or not for further transaction. for that i wand to only verify taht the CC no is valid or not by Paypal. A method for that can be with paypal api step 1: DoDirectPayment with PAYMENTACTION=Authorization for amt of $1, then step 2: DoVoid that request Does any one can tell me is any amount is charged by paypal for doing tis stuff? or any other better way you know? My site is in PHP..

    Read the article

  • Auto filling polymorphic table on save or on delete in django

    - by Mo J. Mughrabi
    Hi, Am working on an project in which I made an app "core" it will contain some of the reused models across my projects, most of those are polymorphic models (Generic content types) and will be linked to different models. Example below am trying to create audit model and will be linked to several models which may require auditing. This is the polls/models.py from django.db import models from django.contrib.auth.models import User from core.models import * from django.contrib.contenttypes import generic class Poll(models.Model): ## TODO: Document question = models.CharField(max_length=300) question_slug=models.SlugField(editable=False) start_poll_at = models.DateTimeField(null=True) end_poll_at = models.DateTimeField(null=True) is_active = models.BooleanField(default=True) audit_obj=generic.GenericRelation(Audit) def __unicode__(self): return self.question class Choice(models.Model): ## TODO: Document choice = models.CharField(max_length=200) poll=models.ForeignKey(Poll) audit_obj=generic.GenericRelation(Audit) class Vote(models.Model): ## TODO: Document choice=models.ForeignKey(Choice) Ip_Address=models.IPAddressField(editable=False) vote_at=models.DateTimeField("Vote at", editable=False) here is the core/modes.py from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class Audit(models.Model): ## TODO: Document # Polymorphic model using generic relation through DJANGO content type created_at = models.DateTimeField("Created at", auto_now_add=True) created_by = models.ForeignKey(User, db_column="created_by", related_name="%(app_label)s_%(class)s_y+") updated_at = models.DateTimeField("Updated at", auto_now=True) updated_by = models.ForeignKey(User, db_column="updated_by", null=True, blank=True, related_name="%(app_label)s_%(class)s_y+") content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField(unique=True) content_object = generic.GenericForeignKey('content_type', 'object_id') and here is polls/admin.py from django.core.context_processors import request from polls.models import Poll, Choice from core.models import * from django.contrib import admin class ChoiceInline(admin.StackedInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): inlines = [ChoiceInline] admin.site.register(Poll, PollAdmin) Am quite new to django, what am trying to do here, insert a record in audit when a record is inserted in polls and then update that same record when a record is updated in polls.

    Read the article

  • Sumproduct using Django's aggregation

    - by Matthew Rankin
    Question Is it possible using Django's aggregation capabilities to calculate a sumproduct? Background I am modeling an invoice, which can contain multiple items. The many-to-many relationship between the Invoice and Item models is handled through the InvoiceItem intermediary table. The total amount of the invoice—amount_invoiced—is calculated by summing the product of unit_price and quantity for each item on a given invoice. Below is the code that I'm currently using to accomplish this, but I was wondering if there is a better way to handle this using Django's aggregation capabilities. Current Code class Item(models.Model): item_num = models.SlugField(unique=True) description = models.CharField(blank=True, max_length=100) class InvoiceItem(models.Model): item = models.ForeignKey(Item) invoice = models.ForeignKey('Invoice') unit_price = models.DecimalField(max_digits=10, decimal_places=2) quantity = models.DecimalField(max_digits=10, decimal_places=4) class Invoice(models.Model): invoice_num = models.SlugField(max_length=25) invoice_items = models.ManyToManyField(Item,through='InvoiceItem') def _get_amount_invoiced(self): invoice_items = self.invoiceitem_set.all() amount_invoiced = 0 for invoice_item in invoice_items: amount_invoiced += (invoice_item.unit_price * invoice_item.quantity) return amount_invoiced amount_invoiced = property(_get_amount_invoiced)

    Read the article

  • How to implement full text search in Django?

    - by Jannis
    I would like to implement a search function in a django blogging application. The status quo is that I have a list of strings supplied by the user and the queryset is narrowed down by each string to include only those objects that match the string. See: if request.method == "POST": form = SearchForm(request.POST) if form.is_valid(): posts = Post.objects.all() for string in form.cleaned_data['query'].split(): posts = posts.filter( Q(title__icontains=string) | Q(text__icontains=string) | Q(tags__name__exact=string) ) return archive_index(request, queryset=posts, date_field='date') Now, what if I didn't want do concatenate each word that is searched for by a logical AND but with a logical OR? How would I do that? Is there a way to do that with Django's own Queryset methods or does one have to fall back to raw SQL queries? In general, is it a proper solution to do full text search like this or would you recommend using a search engine like Solr, Whoosh or Xapian. What are there benefits? Thanks for taking the time

    Read the article

  • django-rest-framework: api versioning

    - by w--
    so googling around it appears that the general consensus is that embedding version numbers in REST URIs is a bad practice and a bad idea. even on SO there are strong proponents supporting this. e.g. Best practices for API versioning? My question is about how to accomplish the proposed solution of using the accept header / content negotiation in the django-rest-framework to accomplish this. It looks like content negotiation in the framework, http://django-rest-framework.org/api-guide/content-negotiation.html is already configured to automatically return intended values based on accepted MIME types. If I start using the Accept header for custom types, I'll lose this benefit of the framework. Is there a better way to accomplish this in the framework?

    Read the article

  • Django URL resolving infrastructure stops working

    - by btol45
    We recently launched a new Django-powered website, and we are experiencing the oddest bug: The site is running under Apache with mod_fastcgi. Everything works fine for a while, and then the URL tag and reverse() functionality stops working. Instead of returning the expected URL, they return "". We haven't noticed anything in Apache's log file; there are no errors being generated by Django. And (the kicker) the problem only occurs in production mode; we can't reproduce it when DEBUG=True. Any thoughts on where we should be looking for the problem?

    Read the article

  • Inline editing of ManyToMany relation in Django

    - by vorpyg
    After working through the Django tutorial I'm now trying to build a very simple invoicing application. I want to add several Products to an Invoice, and to specify the quantity of each product in the Invoice form in the Django admin. Now I've to create a new Product object if I've got different quantites of the same Product. Right now my models look like this (Company and Customer models left out): class Product(models.Model): description = models.TextField() quantity = models.IntegerField() price = models.DecimalField(max_digits=10,decimal_places=2) tax = models.ForeignKey(Tax) class Invoice(models.Model): company = models.ForeignKey(Company) customer = models.ForeignKey(Customer) products = models.ManyToManyField(Product) invoice_no = models.IntegerField() invoice_date = models.DateField(auto_now=True) due_date = models.DateField(default=datetime.date.today() + datetime.timedelta(days=14)) I guess the quantity should be left out of the Product model, but how can I make a field for it in the Invoice model?

    Read the article

  • Django Admin interface with pickled set

    - by Rosarch
    I have a model that has a pickled set of strings. (It has to be pickled, because Django has no built in set field, right?) class Foo(models.Model): __bar = models.TextField(default=lambda: cPickle.dumps(set()), primary_key=True) def get_bar(self): return cPickle.loads(str(self.__bar)) def set_bar(self, values): self.__bar = cPickle.dumps(values) bar = property(get_bar, set_bar) I would like the set to be editable in the admin interface. Obviously the user won't be working with the pickled string directly. Also, the interface would need a widget for adding/removing strings from a set. What is the best way to go about doing this? I'm not super familiar with Django's admin system. Do I need to build a custom admin widget or something? Update: If I do need a custom widget, this looks helpful: http://www.fictitiousnonsense.com/archives/22

    Read the article

  • Django South Foreign Keys referring to pks with Custom Fields

    - by Rory Hart
    I'm working with a legacy database which uses the MySQL big int so I setup a simple custom model field to handle this: class BigAutoField(models.AutoField): def get_internal_type(self): return "BigAutoField" def db_type(self): return 'bigint AUTO_INCREMENT' # Note this won't work with Oracle. This works fine with django south for the id/pk fields (mysql desc "| id | bigint(20) | NO | PRI | NULL | auto_increment |") but the ForeignKey fields in other models the referring fields are created as int(11) rather than bigint(20). I assume I have to add an introspection rule to the BigAutoField but there doesn't seem to be a mention of this sort of rule in the documentation (http://south.aeracode.org/docs/customfields.html). Update: Currently using Django 1.1.1 and South 0.6.2

    Read the article

  • Django - categories & sub-categories

    - by Bluey
    Some advice needed on how I can structure my models for my site. I have seen this post from Django project but still a little lost. Also come across Django-MPTT - but that's no help and possibly overkill. I'm looking to have categories & subcategories that are shown in the URLs like this: mysite.com/Level1/Maths/Calculations/Addition/ mysite.com/Level3/English/ mysite.com/Level2/English/Storytelling/ In my admin interface I'm looking to have drop downs for each level of category or subcategory. Also at each level I will be querying items (another model) like get all items that have the category 'Level1' AND 'Maths'. There could also be a situation where I have five or more subcategories. How is it best to create my models for best performance? It it worth using tagging instead?

    Read the article

  • django 'if' statement improperly formatted

    - by Zayatzz
    Im getting strangest error in django so far: 'if' statement improperly formatted Template that raises the error is this: {% if diff >= 0 %} <span class="pos">+{{ diff }} {% else %} <span class="neg">-{{ diff }} {% endif %} </span> <span>{{ a }}</span> view that has a and diff in context is this: def add(request, kaart_id): if request.is_ajax() and request.method == 'POST': x = Kaart.objects.get(id=kaart_id) x.pos += 1 x.save x = Kaart.objects.get(id=kaart_id) from django.utils import simplejson diff = x.pos - x.neg a = "(+1)" context = { 'diff':diff, 'a':a } return render_to_response('sum.html', context, context_instance=RequestContext(request)) It does not matter what equation i use in if, , =, ==.. they all raise the same error. and as far as i can tell its all by the book: http://docs.djangoproject.com/en/dev/ref/templates/builtins/#id5 Alan.

    Read the article

  • error about django to connecct newes mssql2008

    - by qq263020776
    I am using django-mssql and SQL Server 2008, but I found that it always errors when I do some commands,for example: python manage.py syncdb the error is below: raise OperationalError(e, "Error opening connection: " + connection_string) ngo.db.backends.sqlserver_ado.dbapi.OperationalError: (com_error(-2147352567, xb7\xa2\xc9\xfa\xd2\xe2\xcd\xe2\xa1\xa3', (0, u'Microsoft OLE DB Provider for L Server', u'[DBNETLIB][ConnectionOpen (Connect()).]SQL Server \u4e0d \u5b58\u 8\u6216\u62d2\u7edd\u8bbf\u95ee\u3002', None, 0, -2147467259), None), 'Error ning connection: PROVIDER=SQLOLEDB;DATA SOURCE=115.238.106.100,60433;Network rary=DBMSSOCN;Initial Catalog=rvdb_1;UID=sa;PWD=xxxx') When I use Microsoft SQL Server Management studio client, I can successfully connect the database. I got some infomation from: http://code.google.com/p/django-mssql/issues/detail?id=76 but I still tried I got wrong and I think the solution provided is wrong.

    Read the article

  • Error connecting to SQL Server 2008 with Django

    - by qq263020776
    I am using django-mssql and SQL Server 2008, but I found that it always errors when I do some commands,for example: python manage.py syncdb the error is below: raise OperationalError(e, "Error opening connection: " + connection_string) ngo.db.backends.sqlserver_ado.dbapi.OperationalError: (com_error(-2147352567, xb7\xa2\xc9\xfa\xd2\xe2\xcd\xe2\xa1\xa3', (0, u'Microsoft OLE DB Provider for L Server', u'[DBNETLIB][ConnectionOpen (Connect()).]SQL Server \u4e0d \u5b58\u 8\u6216\u62d2\u7edd\u8bbf\u95ee\u3002', None, 0, -2147467259), None), 'Error ning connection: PROVIDER=SQLOLEDB;DATA SOURCE=115.238.106.100,60433;Network rary=DBMSSOCN;Initial Catalog=rvdb_1;UID=sa;PWD=xxxx') When I use Microsoft SQL Server Management studio client, I can successfully connect the database. I got some infomation from: http://code.google.com/p/django-mssql/issues/detail?id=76 but I still tried I got wrong and I think the solution provided is wrong.

    Read the article

  • How to use sessions with django piston auth?

    - by xyld
    The problem is that I want to store authentication in a cookie that I can present to django piston rather than requiring user/password to be typed in each time (without hardcoding or storing the user/pass combo somewhere on disk). I was hoping to accomplish this with cookies like someone would without the piston API. Am I missing something? Django Piston doesn't seem to care about session cookies at all? Or can someone suggest a good alternative? Maybe I shouldn't use Piston?

    Read the article

  • Confusion on using django socialauth

    - by Fedor
    http://github.com/uswaretech/Django-Socialauth/tree/master/socialauth/ I'm a bit confused on how I should use this. Of course, I read the notes at the bottom but I'm a Django novice so I'll need a little hand holding. The structure of this looks like a project structure since it contains a urls.py but I'm also aware that applications can also have that. It also has a manage.py which leads me to believe it's a project ( plus the subdirectories ). So should I just be integrating portions of this into my existing project? This isn't an application, right? The README also mentions grabbing API Keys. So if I want a standard interface where you click on a google/yahoo logo and it forwards itself via Javascript to the authentication page where you login if you already aren't logged in, kicks you back to your own page, would I need API keys? Any other special tips are appreciated.

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >