Re: Downloaded Django but the command prompt wont recognize commands

2016-08-07 Thread René Fleschenberg
Hi Owen,

> I went through a tutorial for downloading python, pip and Django.  All
> seemed to be going well until I attempted to put command lines 
through the
> command window
> 
> So when I try to create a project via these instructions below
> 
> $ django-admin startproject mysite
> 
> 
> It gives an error

Can you give us a link to the tutorial you are following?

Did you maybe forget to activate your virtualenv?


René

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6340590.7ojJnfTlfd%40rene-laptop.
For more options, visit https://groups.google.com/d/optout.


Re: How to start Django app with apache server

2016-08-07 Thread Daniel Roseman
There is no equivalent. If you're following those instructions, Django will run 
via Apache.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9e7618a2-3850-4b6c-b7a7-384bb50c1202%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


OperationalError at /checkout/ table orders_order has no column named order_id

2016-08-07 Thread M Hashmi
*I have two apps "orders" and "carts". In my models for carts I got:*

class CartItem(models.Model):
cart = models.ForeignKey("Cart")
item = models.ForeignKey(Variation)
quantity = models.PositiveIntegerField(default=1)
line_item_total = models.DecimalField(max_digits=10, decimal_places=2)

def __unicode__(self):
return self.item.title

def remove(self):
return self.item.remove_from_cart()


def cart_item_pre_save_receiver(sender, instance, *args, **kwargs):
qty = instance.quantity
if qty >= 1:
price = instance.item.get_price()
line_item_total = Decimal(qty) * Decimal(price)
instance.line_item_total = line_item_total

pre_save.connect(cart_item_pre_save_receiver, sender=CartItem)

def cart_item_post_save_receiver(sender, instance, *args, **kwargs):
instance.cart.update_subtotal()
post_save.connect(cart_item_post_save_receiver, sender=CartItem)

post_delete.connect(cart_item_post_save_receiver, sender=CartItem)

class Cart(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL, null=True,
blank=True)
items = models.ManyToManyField(Variation, through=CartItem)
timestamp = models.DateTimeField(auto_now_add=True, auto_now=False)
updated = models.DateTimeField(auto_now_add=False, auto_now=True)
subtotal = models.DecimalField(max_digits=50, decimal_places=2,
default=25.00)
tax_percentage  = models.DecimalField(max_digits=10, decimal_places=5,
default=0.085)
tax_total = models.DecimalField(max_digits=50, decimal_places=2,
default=25.00)
total = models.DecimalField(max_digits=50, decimal_places=2,
default=25.00)

def __unicode__(self):
return str(self.id)

def update_subtotal(self):
print "updating..."
subtotal = 0
items = self.cartitem_set.all()
for item in items:
subtotal += item.line_item_total
self.subtotal = "%.2f" %(subtotal)
self.save()

def do_tax_and_total_receiver(sender, instance, *args, **kwargs):
subtotal = Decimal(instance.subtotal)
tax_total = round(subtotal * Decimal(instance.tax_percentage), 2) #8.5%
print instance.tax_percentage
total = round(subtotal + Decimal(tax_total), 2)
instance.tax_total = "%.2f" %(tax_total)
instance.total = "%.2f" %(total)

pre_save.connect(do_tax_and_total_receiver, sender=Cart)

*In my carts Views.py:*

from orders.forms import GuestCheckoutForm
from orders.mixins import CartOrderMixin
from orders.models import UserCheckout, Order, UserAddress
from products.models import Variation
from .models import Cart, CartItem

if settings.DEBUG:
braintree.Configuration.configure(braintree.Environment.Sandbox,
merchant_id=settings.BRAINTREE_MERCHANT_ID,
public_key=settings.BRAINTREE_PUBLIC,
private_key=settings.BRAINTREE_PRIVATE)

class ItemCountView(View):
def get(self, request, *args, **kwargs):
if request.is_ajax():
cart_id = self.request.session.get("cart_id")
if cart_id == None:
count = 0
else:
cart = Cart.objects.get(id=cart_id)
count = cart.items.count()
request.session["cart_item_count"] = count
return JsonResponse({"count": count})
else:
raise Http404

class CartView(SingleObjectMixin, View):
model = Cart
template_name = "carts/view.html"

def get_object(self, *args, **kwargs):
self.request.session.set_expiry(0) #5 minutes
cart_id = self.request.session.get("cart_id")
if cart_id == None:
cart = Cart()
cart.tax_percentage = 0.075
cart.save()
cart_id = cart.id
self.request.session["cart_id"] = cart_id
cart = Cart.objects.get(id=cart_id)
if self.request.user.is_authenticated():
cart.user = self.request.user
cart.save()
return cart

def get(self, request, *args, **kwargs):
cart = self.get_object()
item_id = request.GET.get("item")
delete_item = request.GET.get("delete", False)
flash_message = ""
item_added = False
if item_id:
item_instance = get_object_or_404(Variation, id=item_id)
qty = request.GET.get("qty", 1)
try:
if int(qty) < 1:
delete_item = True
except:
raise Http404
cart_item, created = CartItem.objects.get_or_create(cart=cart,
item=item_instance)
if created:
flash_message = "Successfully added to the cart"
item_added = True
if delete_item:
flash_message = "Item removed successfully."
cart_item.delete()
else:
if not created:
flash_message = "Quantity has been updated
successfully."
cart_item.quantity = qty
cart_item.save()
  

Re: OperationalError at /checkout/ table orders_order has no column named order_id

2016-08-07 Thread M Hashmi
This is strange in Django 1.8.5 that it is not creating all DB fields.
I've just commented out order_id field and 1. manage.py makemigrations, 2. 
manage.py migrate. Then again removed comment sign and it got added in db. 

Anyone knows why this happened? If I delete all my db with migrations there 
will be one or two fields not getting added in new db. I am using sqlite3 
as database in dev.

My problem is solved though.

Regards,
Mudassar

On Sunday, August 7, 2016 at 5:55:13 AM UTC-7, M Hashmi wrote:
>
> *I have two apps "orders" and "carts". In my models for carts I got:*
>
> class CartItem(models.Model):
> cart = models.ForeignKey("Cart")
> item = models.ForeignKey(Variation)
> quantity = models.PositiveIntegerField(default=1)
> line_item_total = models.DecimalField(max_digits=10, decimal_places=2)
>
> def __unicode__(self):
> return self.item.title
>
> def remove(self):
> return self.item.remove_from_cart()
>
>
> def cart_item_pre_save_receiver(sender, instance, *args, **kwargs):
> qty = instance.quantity
> if qty >= 1:
> price = instance.item.get_price()
> line_item_total = Decimal(qty) * Decimal(price)
> instance.line_item_total = line_item_total
>
> pre_save.connect(cart_item_pre_save_receiver, sender=CartItem)
>
> def cart_item_post_save_receiver(sender, instance, *args, **kwargs):
> instance.cart.update_subtotal()
> post_save.connect(cart_item_post_save_receiver, sender=CartItem)
>
> post_delete.connect(cart_item_post_save_receiver, sender=CartItem)
>
> class Cart(models.Model):
> user = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, 
> blank=True)
> items = models.ManyToManyField(Variation, through=CartItem)
> timestamp = models.DateTimeField(auto_now_add=True, auto_now=False)
> updated = models.DateTimeField(auto_now_add=False, auto_now=True)
> subtotal = models.DecimalField(max_digits=50, decimal_places=2, 
> default=25.00)
> tax_percentage  = models.DecimalField(max_digits=10, decimal_places=5, 
> default=0.085)
> tax_total = models.DecimalField(max_digits=50, decimal_places=2, 
> default=25.00)
> total = models.DecimalField(max_digits=50, decimal_places=2, 
> default=25.00)
>
> def __unicode__(self):
> return str(self.id)
>
> def update_subtotal(self):
> print "updating..."
> subtotal = 0
> items = self.cartitem_set.all()
> for item in items:
> subtotal += item.line_item_total
> self.subtotal = "%.2f" %(subtotal)
> self.save()
>
> def do_tax_and_total_receiver(sender, instance, *args, **kwargs):
> subtotal = Decimal(instance.subtotal)
> tax_total = round(subtotal * Decimal(instance.tax_percentage), 2) #8.5%
> print instance.tax_percentage
> total = round(subtotal + Decimal(tax_total), 2)
> instance.tax_total = "%.2f" %(tax_total)
> instance.total = "%.2f" %(total)
> 
> pre_save.connect(do_tax_and_total_receiver, sender=Cart)
>
> *In my carts Views.py:*
>
> from orders.forms import GuestCheckoutForm
> from orders.mixins import CartOrderMixin
> from orders.models import UserCheckout, Order, UserAddress
> from products.models import Variation
> from .models import Cart, CartItem
>
> if settings.DEBUG:
> braintree.Configuration.configure(braintree.Environment.Sandbox,
> merchant_id=settings.BRAINTREE_MERCHANT_ID,
> public_key=settings.BRAINTREE_PUBLIC,
> private_key=settings.BRAINTREE_PRIVATE)
>
> class ItemCountView(View):
> def get(self, request, *args, **kwargs):
> if request.is_ajax():
> cart_id = self.request.session.get("cart_id")
> if cart_id == None:
> count = 0
> else:
> cart = Cart.objects.get(id=cart_id)
> count = cart.items.count()
> request.session["cart_item_count"] = count
> return JsonResponse({"count": count})
> else:
> raise Http404
>
> class CartView(SingleObjectMixin, View):
> model = Cart
> template_name = "carts/view.html"
>
> def get_object(self, *args, **kwargs):
> self.request.session.set_expiry(0) #5 minutes
> cart_id = self.request.session.get("cart_id")
> if cart_id == None:
> cart = Cart()
> cart.tax_percentage = 0.075
> cart.save()
> cart_id = cart.id
> self.request.session["cart_id"] = cart_id
> cart = Cart.objects.get(id=cart_id)
> if self.request.user.is_authenticated():
> cart.user = self.request.user
> cart.save()
> return cart
>
> def get(self, request, *args, **kwargs):
> cart = self.get_object()
> item_id = request.GET.get("item")
> delete_item = request.GET.get("delete", False)
> flash_message = ""
> item_added = False
> if item_id:
> item_instance = get_object_or_404(Variation, id=i

Django Multiple Currencies Implementation

2016-08-07 Thread A.Khan
Hi I am new to Django and I need to implement multiple currency options 
based on user's preference. What I don't understand that let's say I am in 
Pakistan and I've used in my template simply

PKR {{ object.price }} .

Now I need to understand how would a payment processor will determine what 
currency I am using for example if I am using above tag and someone needs 
to pay me with localized currency equaling to my currency amount using 
Credit Cart or whatever.

Secondly I need to implement multiple currencies that user can select 
currency option for payment. Can you please tell me the simplest way 
possible to achieve it.

This is not a necessity at this point but just in case I need to implement 
a use case that Django provides localized currency automatically if website 
accessed from a particular location what do I need to do.

I need to implement Braintree and Stripe with Paypal and Credit cards both 
for testing on two different projects. As I said I am a beginner so not 
sure if its a qualified question. 
Please advise.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/51b5e211-0b03-4423-b1c2-2b42aaa92ba8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Multiple Currencies Implementation

2016-08-07 Thread Babatunde Akinyanmi
Hello Khan,
Your payment processor will specify in its API how it determines currency.
This is not a django problem. I'm sure the answer to your question lies in
the documentation of Stripe and Braintree

On 7 Aug 2016 18:46, "A.Khan"  wrote:

> Hi I am new to Django and I need to implement multiple currency options
> based on user's preference. What I don't understand that let's say I am in
> Pakistan and I've used in my template simply
>
> PKR {{ object.price }} .
>
> Now I need to understand how would a payment processor will determine what
> currency I am using for example if I am using above tag and someone needs
> to pay me with localized currency equaling to my currency amount using
> Credit Cart or whatever.
>
> Secondly I need to implement multiple currencies that user can select
> currency option for payment. Can you please tell me the simplest way
> possible to achieve it.
>
> This is not a necessity at this point but just in case I need to implement
> a use case that Django provides localized currency automatically if website
> accessed from a particular location what do I need to do.
>
> I need to implement Braintree and Stripe with Paypal and Credit cards both
> for testing on two different projects. As I said I am a beginner so not
> sure if its a qualified question.
> Please advise.
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/51b5e211-0b03-4423-b1c2-2b42aaa92ba8%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXMBCeVRi0wTSxnv7-ZHcAMCdx8c9cvFNVFQe3dxiP1qjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Using non-ASCII app name via Apache server

2016-08-07 Thread Göran Uddeborg
I'm new to Django, so this is probably some kind of beginner's mistake.

Django is set up to run via Apache and WSGI.  It uses Python 3.  The first 
app I wrote works fine.  When I got to the second I wanted to use an app 
name that contained non-ASCII letters.  But I can't get that to work at 
all.  Can anyone explain what I'm doing wrong?  I've failed to find the 
solution using Google.

To isolate the problem, I tried to make a test app following the 
instructions in https://docs.djangoproject.com/en/1.9/intro/tutorial01/ but 
using the app name "appåäö".  But trying to access the page gives me an 
error message:

ImportError at /appåäö/
No module named 'appåäö'

On the other hand, if I copy the file tree for my project, remove the 
SECURE_SSL_REDIRECT=True directive from settings.py, and run using 
"manage.py runserver", *then* it works just fine.  It is somehow related to 
the WSGI environment.  But how can I make it work?

To give a bit more details, this is what I have done:


   1. Added 
   url(r'^appåäö/', include('appåäö.urls'))
   to urlpatterns in dynsite/urls.py (dynsite is the name of the directory 
   with settings.py and similar files).
   2. Run "./manage.py startapp appåäö" to create an initial app tree.
   3. Created a file appåäö/urls.py with the contents 
   from django.conf.urls import url
   
   from . import views
   
   urlpatterns = [
   url(r'^$', views.index, name='index'),
   ]
   4. Edited appåäö/views.py to look like this 
   from django.http import HttpResponse
   
   def index(request):
   return HttpResponse("Hej världen!")
   5. Restarted httpd
   6. Point my browser to appåäö in my 
   
I attach the complete traceback I get.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d6db7796-931b-46b9-bd8e-7c4b78d49db3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


#traceback
Description: Binary data


Please Can Some one Help me To get my static files load my default CSS files

2016-08-07 Thread Timothy Steele
Please any time i try to load my Django admin panel the default CSS files 
does not load and even i have to refresh several time before i can  the css 
file will load, and even if i log in still the interface become different, 
it does not load the CSS files. I believe this is coming form the static 
files which i have not loaded but i did what ever i could and it did not 
work for me so i need  a help please.
Please below is an attach file of screen shots i took 

Any way i am still a beginner

THANKS

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4e4bf61b-ca6d-4937-a441-e4fe6d6f0601%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Please this is the log in screen short.docx
Description: MS-Word 2007 document


Forcing Localization

2016-08-07 Thread Adam Starrh


I am writing an application for my small business based in India, where 
numbers are commonly understood in terms of lakhs and crores.

ie. 1,000,000 is displayed as 10,00,000

I am assuming that enabling localization will cause numbers to display this 
way when I am viewing my application from an Indian server. However, I 
would also like to view the data this way when I am in the United States. 
Is it possible to force localization to a particular regional standard, no 
matter where I am viewing the page from?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/604036bf-2557-4c63-8718-3950dd89010f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Multiple Currencies Implementation

2016-08-07 Thread Ali khan
Thank you Babutunde,
So you are saying that the price = models.DecimalField(max_digits=20,
decimal_fields=2) will automatically sense it that what currency it is or
if someone wants to pay me in different currency how would a payment
processor will change currency value?

Also I need my currency to be localized upon the location of access. For
example if my client is in US he should get USD based prices and if someone
in Japan he should see Yen. How would I do it?
Regards,
Ali

On Sun, Aug 7, 2016 at 3:01 PM, Babatunde Akinyanmi 
wrote:

> Hello Khan,
> Your payment processor will specify in its API how it determines currency.
> This is not a django problem. I'm sure the answer to your question lies in
> the documentation of Stripe and Braintree
>
> On 7 Aug 2016 18:46, "A.Khan"  wrote:
>
>> Hi I am new to Django and I need to implement multiple currency options
>> based on user's preference. What I don't understand that let's say I am in
>> Pakistan and I've used in my template simply
>>
>> PKR {{ object.price }} .
>>
>> Now I need to understand how would a payment processor will determine
>> what currency I am using for example if I am using above tag and someone
>> needs to pay me with localized currency equaling to my currency amount
>> using Credit Cart or whatever.
>>
>> Secondly I need to implement multiple currencies that user can select
>> currency option for payment. Can you please tell me the simplest way
>> possible to achieve it.
>>
>> This is not a necessity at this point but just in case I need to
>> implement a use case that Django provides localized currency automatically
>> if website accessed from a particular location what do I need to do.
>>
>> I need to implement Braintree and Stripe with Paypal and Credit cards
>> both for testing on two different projects. As I said I am a beginner so
>> not sure if its a qualified question.
>> Please advise.
>>
>> Thanks.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/51b5e211-0b03-4423-b1c2-2b42aaa92ba8%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CA%2BWjgXMBCeVRi0wTSxnv7-ZHcAMCdx8c9cvFNVFQe3dxiP1qjQ%
> 40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAXvsYnd%3D0uePhTn4M5PR1ixi8K3JC%2BcqpyYkkc-AD7qRsxCLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using non-ASCII app name via Apache server

2016-08-07 Thread M Hashmi
List down your "civ.apps.CivConfig" also restart Gunicorn, and reload 
Nginx. 

On Sunday, August 7, 2016 at 4:59:40 PM UTC-7, Göran Uddeborg wrote:
>
> I'm new to Django, so this is probably some kind of beginner's mistake.
>
> Django is set up to run via Apache and WSGI.  It uses Python 3.  The first 
> app I wrote works fine.  When I got to the second I wanted to use an app 
> name that contained non-ASCII letters.  But I can't get that to work at 
> all.  Can anyone explain what I'm doing wrong?  I've failed to find the 
> solution using Google.
>
> To isolate the problem, I tried to make a test app following the 
> instructions in https://docs.djangoproject.com/en/1.9/intro/tutorial01/ 
> but using the app name "appåäö".  But trying to access the page gives me an 
> error message:
>
> ImportError at /appåäö/
> No module named 'appåäö'
>
> On the other hand, if I copy the file tree for my project, remove the 
> SECURE_SSL_REDIRECT=True directive from settings.py, and run using 
> "manage.py runserver", *then* it works just fine.  It is somehow related 
> to the WSGI environment.  But how can I make it work?
>
> To give a bit more details, this is what I have done:
>
>
>1. Added 
>url(r'^appåäö/', include('appåäö.urls'))
>to urlpatterns in dynsite/urls.py (dynsite is the name of the 
>directory with settings.py and similar files).
>2. Run "./manage.py startapp appåäö" to create an initial app tree.
>3. Created a file appåäö/urls.py with the contents 
>from django.conf.urls import url
>
>from . import views
>
>urlpatterns = [
>url(r'^$', views.index, name='index'),
>]
>4. Edited appåäö/views.py to look like this 
>from django.http import HttpResponse
>
>def index(request):
>return HttpResponse("Hej världen!")
>5. Restarted httpd
>6. Point my browser to appåäö in my 
>
> I attach the complete traceback I get.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/26c5b510-de0e-4a80-b12e-b31ee3fe089c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Please Can Some one Help me To get my static files load my default CSS files

2016-08-07 Thread M Hashmi
In your settings.py how did you setup your STATIC_URL and STATIC_FILEDIRS?
Copy paste your settings.py code below STATIC_URL with your DB engine 
settings. DB looks working fine because your page is showing up so we can 
use same BASE_DIR conventions for setting up your static.

On Sunday, August 7, 2016 at 5:16:57 PM UTC-7, Timothy Steele wrote:
>
> Please any time i try to load my Django admin panel the default CSS files 
> does not load and even i have to refresh several time before i can  the css 
> file will load, and even if i log in still the interface become different, 
> it does not load the CSS files. I believe this is coming form the static 
> files which i have not loaded but i did what ever i could and it did not 
> work for me so i need  a help please.
> Please below is an attach file of screen shots i took 
>
> Any way i am still a beginner
>
> THANKS
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/660507f4-231e-4f6c-8162-701cf8bb5c1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Multiple Currencies Implementation

2016-08-07 Thread Mike Dewhirst

On 8/08/2016 12:23 PM, Ali khan wrote:

Thank you Babutunde,
So you are saying that the price = models.DecimalField(max_digits=20,
decimal_fields=2) will automatically sense it that what currency it is
or if someone wants to pay me in different currency how would a payment
processor will change currency value?

Also I need my currency to be localized upon the location of access. For
example if my client is in US he should get USD based prices and if
someone in Japan he should see Yen. How would I do it?


There are two sides to this coin ;)

Your probable ideal solution is to use an account with a bank which will 
do all your currency conversions automatically for the bottom twenty 
percent of your transactions and keep certain other accounts denominated 
in the currencies of the major proportion of your transactions. But 
ideal may not be practical. All foreign exchange transactions attract 
bank fees.


You will need a price setting mechanism as well. If you set a selling 
price in one currency, how will you decide on the exchange rate to use 
to calculate the other selling prices?


How frequently will you update your selling prices?

These are both hard questions.

Most larger firms force their customers to buy in a one of a few stable 
currencies which normally don't move very quickly against each other. 
That lets them take out forward exchange contracts to hedge or lock-in a 
given conversion rate at some point in future for a given amount.


A smaller firm would most likely choose just one stable currency and 
force all buyers to pay in that currency.


Probably not answering your question but I hope that helps

Mike



Regards,
Ali

On Sun, Aug 7, 2016 at 3:01 PM, Babatunde Akinyanmi
mailto:tundeba...@gmail.com>> wrote:

Hello Khan,
Your payment processor will specify in its API how it determines
currency. This is not a django problem. I'm sure the answer to your
question lies in the documentation of Stripe and Braintree


On 7 Aug 2016 18:46, "A.Khan" mailto:alipathan123...@gmail.com>> wrote:

Hi I am new to Django and I need to implement multiple currency
options based on user's preference. What I don't understand that
let's say I am in Pakistan and I've used in my template simply

PKR {{ object.price }} .

Now I need to understand how would a payment processor will
determine what currency I am using for example if I am using
above tag and someone needs to pay me with localized currency
equaling to my currency amount using Credit Cart or whatever.

Secondly I need to implement multiple currencies that user can
select currency option for payment. Can you please tell me the
simplest way possible to achieve it.

This is not a necessity at this point but just in case I need to
implement a use case that Django provides localized currency
automatically if website accessed from a particular location
what do I need to do.

I need to implement Braintree and Stripe with Paypal and Credit
cards both for testing on two different projects. As I said I am
a beginner so not sure if its a qualified question.
Please advise.

Thanks.

--
You received this message because you are subscribed to the
Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to django-users+unsubscr...@googlegroups.com
.
To post to this group, send email to
django-users@googlegroups.com
.
Visit this group at https://groups.google.com/group/django-users
.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/51b5e211-0b03-4423-b1c2-2b42aaa92ba8%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout
.

--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to django-users+unsubscr...@googlegroups.com
.
To post to this group, send email to django-users@googlegroups.com
.
Visit this group at https://groups.google.com/group/django-users
.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/CA%2BWjgXMBCeVRi0wTSxnv7-ZHcAMCdx8c9cvFNVFQe3dxiP1qjQ%40mail.gmail.com



Re: Django Multiple Currencies Implementation

2016-08-07 Thread Babatunde Akinyanmi
Hello Ali,
Mike has given a good analysis of the financials and your database
implementation will depend on which option you choose.

I know that's not the most helpful answer in the world but that will help
in making good suggestions regarding the problem.

If you ask me, stick to one currency and look for a processor that will
allow customers pay for your product by converting the customers' local
currency into yours.

On 8 Aug 2016 03:43, "Mike Dewhirst"  wrote:

> On 8/08/2016 12:23 PM, Ali khan wrote:
>
>> Thank you Babutunde,
>> So you are saying that the price = models.DecimalField(max_digits=20,
>> decimal_fields=2) will automatically sense it that what currency it is
>> or if someone wants to pay me in different currency how would a payment
>> processor will change currency value?
>>
>> Also I need my currency to be localized upon the location of access. For
>> example if my client is in US he should get USD based prices and if
>> someone in Japan he should see Yen. How would I do it?
>>
>
> There are two sides to this coin ;)
>
> Your probable ideal solution is to use an account with a bank which will
> do all your currency conversions automatically for the bottom twenty
> percent of your transactions and keep certain other accounts denominated in
> the currencies of the major proportion of your transactions. But ideal may
> not be practical. All foreign exchange transactions attract bank fees.
>
> You will need a price setting mechanism as well. If you set a selling
> price in one currency, how will you decide on the exchange rate to use to
> calculate the other selling prices?
>
> How frequently will you update your selling prices?
>
> These are both hard questions.
>
> Most larger firms force their customers to buy in a one of a few stable
> currencies which normally don't move very quickly against each other. That
> lets them take out forward exchange contracts to hedge or lock-in a given
> conversion rate at some point in future for a given amount.
>
> A smaller firm would most likely choose just one stable currency and force
> all buyers to pay in that currency.
>
> Probably not answering your question but I hope that helps
>
> Mike
>
>
> Regards,
>> Ali
>>
>> On Sun, Aug 7, 2016 at 3:01 PM, Babatunde Akinyanmi
>> mailto:tundeba...@gmail.com>> wrote:
>>
>> Hello Khan,
>> Your payment processor will specify in its API how it determines
>> currency. This is not a django problem. I'm sure the answer to your
>> question lies in the documentation of Stripe and Braintree
>>
>>
>> On 7 Aug 2016 18:46, "A.Khan" > > wrote:
>>
>> Hi I am new to Django and I need to implement multiple currency
>> options based on user's preference. What I don't understand that
>> let's say I am in Pakistan and I've used in my template simply
>>
>> PKR {{ object.price }} .
>>
>> Now I need to understand how would a payment processor will
>> determine what currency I am using for example if I am using
>> above tag and someone needs to pay me with localized currency
>> equaling to my currency amount using Credit Cart or whatever.
>>
>> Secondly I need to implement multiple currencies that user can
>> select currency option for payment. Can you please tell me the
>> simplest way possible to achieve it.
>>
>> This is not a necessity at this point but just in case I need to
>> implement a use case that Django provides localized currency
>> automatically if website accessed from a particular location
>> what do I need to do.
>>
>> I need to implement Braintree and Stripe with Paypal and Credit
>> cards both for testing on two different projects. As I said I am
>> a beginner so not sure if its a qualified question.
>> Please advise.
>>
>> Thanks.
>>
>> --
>> You received this message because you are subscribed to the
>> Google Groups "Django users" group.
>> To unsubscribe from this group and stop receiving emails from
>> it, send an email to django-users+unsubscr...@googlegroups.com
>> .
>> To post to this group, send email to
>> django-users@googlegroups.com
>> .
>> Visit this group at https://groups.google.com/group/django-users
>> .
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/51b5e211-0b03
>> -4423-b1c2-2b42aaa92ba8%40googlegroups.com
>> > 3-4423-b1c2-2b42aaa92ba8%40googlegroups.com?utm_medium=email
>> &utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout
>> .
>>
>> --
>>  

Re: Django Multiple Currencies Implementation

2016-08-07 Thread Ali khan
Thank you mike for your kind reply but question was more related to how to
setup moneyfield using what available modules. Use case is that a payment
processor should be able to determine exchange value for instance if price
is listed in Asian currency and someone wants to make payment in USD then
payment processor should provide same equal amount to localized currency.

Hope I was able to explain.
Please specify what reusable apps support following:
1. Different currencies in a format that payment api can understand it.
2. Should be connected to some online exchange rate site to get updated
price.

Thank you for your interest to address this question and looking forward
for your response.

Regards,
Ali

On Sun, Aug 7, 2016 at 3:01 PM, Babatunde Akinyanmi 
wrote:

> Hello Khan,
> Your payment processor will specify in its API how it determines currency.
> This is not a django problem. I'm sure the answer to your question lies in
> the documentation of Stripe and Braintree
>
> On 7 Aug 2016 18:46, "A.Khan"  wrote:
>
>> Hi I am new to Django and I need to implement multiple currency options
>> based on user's preference. What I don't understand that let's say I am in
>> Pakistan and I've used in my template simply
>>
>> PKR {{ object.price }} .
>>
>> Now I need to understand how would a payment processor will determine
>> what currency I am using for example if I am using above tag and someone
>> needs to pay me with localized currency equaling to my currency amount
>> using Credit Cart or whatever.
>>
>> Secondly I need to implement multiple currencies that user can select
>> currency option for payment. Can you please tell me the simplest way
>> possible to achieve it.
>>
>> This is not a necessity at this point but just in case I need to
>> implement a use case that Django provides localized currency automatically
>> if website accessed from a particular location what do I need to do.
>>
>> I need to implement Braintree and Stripe with Paypal and Credit cards
>> both for testing on two different projects. As I said I am a beginner so
>> not sure if its a qualified question.
>> Please advise.
>>
>> Thanks.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/51b5e211-0b03-4423-b1c2-2b42aaa92ba8%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CA%2BWjgXMBCeVRi0wTSxnv7-ZHcAMCdx8c9cvFNVFQe3dxiP1qjQ%
> 40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAXvsYnSm7m7FdAx2iXcFoo2OUQYykG0ucE8xzw%3D8RUY3fVZcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Multiple Currencies Implementation

2016-08-07 Thread Ali khan
Thank you Babatunde,

That is also I am not aware of that which payment processor supports such
functions. So if you've implemented any such kind of api please let me know.

Regards,
Ali

On Sun, Aug 7, 2016 at 11:31 PM, Ali khan  wrote:

> Thank you mike for your kind reply but question was more related to how to
> setup moneyfield using what available modules. Use case is that a payment
> processor should be able to determine exchange value for instance if price
> is listed in Asian currency and someone wants to make payment in USD then
> payment processor should provide same equal amount to localized currency.
>
> Hope I was able to explain.
> Please specify what reusable apps support following:
> 1. Different currencies in a format that payment api can understand it.
> 2. Should be connected to some online exchange rate site to get updated
> price.
>
> Thank you for your interest to address this question and looking forward
> for your response.
>
> Regards,
> Ali
>
> On Sun, Aug 7, 2016 at 3:01 PM, Babatunde Akinyanmi 
> wrote:
>
>> Hello Khan,
>> Your payment processor will specify in its API how it determines
>> currency. This is not a django problem. I'm sure the answer to your
>> question lies in the documentation of Stripe and Braintree
>>
>> On 7 Aug 2016 18:46, "A.Khan"  wrote:
>>
>>> Hi I am new to Django and I need to implement multiple currency options
>>> based on user's preference. What I don't understand that let's say I am in
>>> Pakistan and I've used in my template simply
>>>
>>> PKR {{ object.price }} .
>>>
>>> Now I need to understand how would a payment processor will determine
>>> what currency I am using for example if I am using above tag and someone
>>> needs to pay me with localized currency equaling to my currency amount
>>> using Credit Cart or whatever.
>>>
>>> Secondly I need to implement multiple currencies that user can select
>>> currency option for payment. Can you please tell me the simplest way
>>> possible to achieve it.
>>>
>>> This is not a necessity at this point but just in case I need to
>>> implement a use case that Django provides localized currency automatically
>>> if website accessed from a particular location what do I need to do.
>>>
>>> I need to implement Braintree and Stripe with Paypal and Credit cards
>>> both for testing on two different projects. As I said I am a beginner so
>>> not sure if its a qualified question.
>>> Please advise.
>>>
>>> Thanks.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/django-users/51b5e211-0b03-4423-b1c2-2b42aaa92ba8%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/CA%2BWjgXMBCeVRi0wTSxnv7-ZHcAMCdx8c9cvFNVFQ
>> e3dxiP1qjQ%40mail.gmail.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAXvsY%3DOdw7jBoi_LuzyomBThWu4shrpaZzcas6bf9iRAYBFaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.