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

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 p

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

Django Customized Admin/User management interface

2016-08-13 Thread Ali khan
Hi, I have 4 different type of user groups in my ecommerce application. Suppliers, Shops, Referrers and Staff. I nee to create a dashboards for all of them so when they login they can see content related to them. Can someone refer any reusable app or the best approach to do it? Regards, Ali -- Y

Form Mixins with multilayered M2M models

2016-08-16 Thread Ali khan
Hi, I have three models like below: Shop: | Products | Variations Where Shop has a ForeignKey for products and then products has foreign key for variations. So Shop has no ForeignKey with Variations directly instead connected via

Non Admin Dashboard/Shop Login for Suppliers

2016-08-20 Thread Ali khan
Hi, I am using Django-registration for registration process in my django project. Now I need to add a shop login for resellers. Can some one provide me the process to add Shop-Dashboard in NLP like in non coding format just to give me idea how to go for it. Do I need to build form from my Shop mo

Non-Admin Dashboard

2016-08-27 Thread Ali khan
Hi, I am building ecommerce related to books and I am looking for some non-admin dashboard besides Django-dash because its not ported to latest version. Can someone refer me the best approach or a sample project even which helps me to understand how to go for it? Regards, Ali -- You received th

Django filters with Foreign Key

2016-09-18 Thread Ali khan
I have two different apps and applying filters by ForeignKey and as newbie I am not able to understand how it works. My Order App: ORDER_STATUS_CHOICES={ ('created','Created'), ('paid','Paid'), } class Order(models.Model): status = models.CharField(max_

Re: Django filters with Foreign Key

2016-09-18 Thread Ali khan
for the seller in my "Orders" model like "seller = models.ForeignKey(Seller)" and then filter it out. But I tried that before still as per your suggestion I will do that again. Thanks again. Regards, Ali On Sun, Sep 18, 2016 at 1:14 PM, James Schneider wrote: > On Sep 18,

Re: Django filters with Foreign Key

2016-09-19 Thread Ali khan
:08 PM, James Schneider wrote: > On Sep 18, 2016 10:22 PM, "Ali khan" wrote: > > > > Thank you for your kind response James. > > > > I must be doing something wrong but I thought that importing different > models and assigning them with variable may had hel

Re: Django filters with Foreign Key

2016-09-19 Thread Ali khan
I just got it done. Thanks. On Mon, Sep 19, 2016 at 4:19 AM, Ali khan wrote: > I've tried many ways but it ends with the same error that says: > > Cannot query "alikhan": Must be "User" instance. > > Where alikhan is admin user I've created with

Django not saving form in DB from frontend

2016-09-29 Thread Ali khan
Hi, I am newbie so I must be doing some stupid mistake here. I am trying to save a contact form with ModelForm. But its not saving in DB from the frontend form. model.py class Contact(models.Model): name = models.CharField(max_length=100, null=True, blank=True) email = models.EmailFie

Re: Django not saving form in DB from frontend

2016-09-29 Thread Ali khan
Appologies. In my view after else clause its ContactForm. On Thu, Sep 29, 2016 at 11:52 AM, Ali khan wrote: > Hi, > > I am newbie so I must be doing some stupid mistake here. > > I am trying to save a contact form with ModelForm. But its not saving in > DB from the frontend

Re: Django not saving form in DB from frontend

2016-09-30 Thread Ali khan
> >> if form.is_valid(): >> print("Form is valid") >> form.save(commit=True) >> else: >> print("Invalid form") >> >> >> Pretty sure you will get an invalid form, due to a missing field >> send_

Re: Django not saving form in DB from frontend

2016-09-30 Thread Ali khan
Ludovic I did what you told and that was reason it was not validating. Thanks On Fri, Sep 30, 2016 at 9:53 PM, Ali khan wrote: > Thanks Mudassar, > > Its working now. > > > > On Fri, Sep 30, 2016 at 8:42 PM, M Hashmi wrote: > >> *Please change*

For loop for ModelForm in Django

2016-10-02 Thread Ali khan
I need to iterate the form to get Boolean values in a single line. Please help me to figure out a way to iterate through model forms. Also I generally need to understand how to iterate through modelforms. App Model: class ProjectDetails(models.Model): type = models.CharField(max_length=120) too

data must be QuerySet-like (have count() and order_by()) or support list(data) -- NoneType has neither

2017-01-07 Thread Ali khan
I am using Django-table2 for SingleTableMixin and I am getting this error which I am not able to come around. Error says I need to present data in query to be able to make it work. Following is the code and guidance is requested. class ProductListView(SingleTableMixin, generic.TemplateView):

Re: data must be QuerySet-like (have count() and order_by()) or support list(data) -- NoneType has neither

2017-01-10 Thread Ali khan
a "get_table_data" method in your class > > On 1/8/17, Ali khan wrote: > > I am using Django-table2 for SingleTableMixin and I am getting this error > > which I am not able to come around. Error says I need to present data in > > query to be able to