Re: Two models one form, or use generic CreateView

2021-01-07 Thread Farai M
Your code is fine but you will need to preload your form with the customer which you want this can be done in the get method of that create view.Read more about use of DjangoModel form https://docs.djangoproject.com/en/3.1/topics/forms/modelforms/ Then override the get() method and respond with t

Re: Is it possible to use REST API on Django template ?

2020-11-25 Thread Farai M
Very possible you can create urls for API with the rest framework then create other urls for your templates .Just install the django rest framework you are good to go. On Wed, Nov 25, 2020, 4:18 PM Aman Modi wrote: > > > Hello Django lovers. > > I want to use REST API on Django template but i

Re: Having issues with django and Heroku

2020-11-03 Thread Farai M
I used whitenoise 5.0.1 it works fine you can updated your version and see what will happen On Tue, Nov 3, 2020, 6:31 PM Odeyale Kehinde wrote: > Can any one assist me to fix this issue, I uploaded my django website on > heroku but I'm get this errors > ImportError at /Your WhiteNoise configurat

Re: Regd:- Generating PDF from HTML with image

2020-10-27 Thread Farai M
Try also reportLab it's on the server side you can create any pdf with easy On Tue, Oct 27, 2020, 11:36 AM Senthil Kumar wrote: > Hi Everyone, > > Hope you are doing well > > We need help to generate the PDF from the HTML tag with images. Let us > know if any package available to do this require

Re: Login Default admin page

2020-10-26 Thread Farai M
Try to share the cmd logs because that error will definitely log On Mon, Oct 26, 2020, 1:52 PM waqar khan wrote: > i have many small project all my project same issues , > before properly work , > How can solve this is my problems > > On Sun, Oct 25, 2020 at 9:54 PM waqar khan wrote: > >> I hav

Re: How to connect django and React js but getting Error

2020-10-26 Thread Farai M
Why don't you use django rest framework API then separate your front end to your back end.That why you will not have to deal with integration issues On Mon, Oct 26, 2020, 11:55 AM Vineeth wrote: > I am using django 3.1 version how to connect django and react i am trying > to connect but > getti

Re: django staticfiles problem

2020-10-14 Thread Farai M
Why have the media url if it's point to the same dir as static .Your can just specific it's separately in it's own dir as /media/ and have /static/ .You are also missing a static root there . On Wed, Oct 14, 2020, 5:05 PM Chelsea Fan wrote: > MEDIA_URL = '/images/' > MEDIA_ROOT = BASE_DIR / 'sta

Re: Recruitment

2020-10-14 Thread Farai M
One email l think would have been enough because it goes to every body.The email should have been on it's separate thread with a full company profile and details so it stands out when we need those services people will just search their inbox. Then you could put a banner pricing links to githu

Re: E Commerce Website Assistance

2020-10-09 Thread Farai M
Thanks very much checking it right away On Sat, Oct 10, 2020, 8:02 AM RANGA BHARATH JINKA wrote: > Hi, > > Check this. > > https://www.youtube.com/playlist?list=PL-51WBLyFTg0omnamUjL1TCVov7yDTRng > > All the best > > On Sat, Oct 10, 2020 at 11:29 AM Farai M wrote

E Commerce Website Assistance

2020-10-09 Thread Farai M
Hello all I am doing an ecommerce app can any one who have done a commercial project assist with maybe documentation and architecture and packages l can use. Thanks in advance DM me on +263779046006 -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Account activity How to logout a particular device to logout.

2020-09-14 Thread Farai M
difficult to thwart. This should solve most of our problems l an sure they are already algorithms available for python or javascript ready to use On Mon, Sep 14, 2020, 2:17 PM Farai M wrote: > You might need to capture mac address on login then associate it with the > login session > >

Re: Account activity How to logout a particular device to logout.

2020-09-14 Thread Farai M
You might need to capture mac address on login then associate it with the login session On Mon, Sep 14, 2020, 1:48 PM Salima Begum wrote: > Hi all, > By using python and django. > > >1. User Login with one account in different devices. >2. If he login into another device we sent user to

Re: No Reverse Match Error, When creating a new user (new user application) it should direct back to home (to the core application)

2020-04-19 Thread Farai M
You can use Httpresponse(reverse_lazy('appname')) On Sun, Apr 19, 2020, 6:35 AM Ahmed Khairy wrote: > For this project, I have made 2 applications: Core and Users > > Creating a new user is the 2nd application. > I am trying to direct the new user after registration to 'home' > > I keep getting

Re: I have issue. I want to migrate database from sqlite3 to postgresql. With a table have 10M records. I need a solution for issue. Maybe help me?

2020-03-26 Thread Farai M
Export to csv in SQL then import into postgresql from there On Wed, Mar 25, 2020, 6:43 PM Thắng IT wrote: > solution > > -- > 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, sen

Re: Retaining text in search input boxes

2020-02-20 Thread Farai M
For drop downs use JavaScript script or JQuery to set the value of the value of the selected item.For input use an if on the value if it's populated then the input value is equal to the attribute us you put it .Another option is to use the default on attribute but make it an empty string so you don

Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working

2020-02-19 Thread Farai M
The session must be activated in the settings file check that it should work smoothly. On the insert can u share the template file mostly .It is to do with post requests not reaching back end. You can try to print the post request before your save to model to see if all inputs are coming through.If

Re: How to pass pk through URL to CreateView

2020-02-18 Thread Farai M
It should work two issue 1.Url is not matching your need to visit that is where you are getting that reverse error. 2.To pull that value through kwargs you need to use the get request so override the get method otherwise it should work fine. On Sat, Feb 15, 2020, 5:19 AM Sam Hefer wrote: > Hi, >

Re: Error with filter queryset

2020-02-09 Thread Farai M
The status is a foreign ID u can use choices if the status is not dynamically changed by the users . Otherwise you will need to pass the selected status from fronted or hardcode it. On Sun, Feb 9, 2020, 2:58 PM Chuck G. Madamombe wrote: > Hello, > > I want to filter data in the database to retri

Re: not inserted registeration form.

2020-02-06 Thread Farai M
In the temple use form.idfield.errors In the view u can use print or try and catch On Fri, Feb 7, 2020, 9:03 AM nrupesh08 wrote: > hi, > why not inserted registration. their is no error shows. plese tell how to > see any error? once check my screeshots > > -- > You received this message because

Re: Dynamically retrieve data from table

2020-02-06 Thread Farai M
Put user id in your Entity table it will be user has one Entity one to one .In the view u just retrieve the Entity id related to that user. On Wed, Feb 5, 2020, 2:30 PM bobo michel wrote: > Hi all, > > I am struggling with a piece of code for a few days now and thought I'll > seek for advice. >

Re: About extending the django inbuilt user

2020-01-14 Thread Farai M
Just do a one to One to the user table because if you have already created and migrated the model on first install .Creating a custom model will give you a headache On Tue, Jan 14, 2020 at 6:11 PM sachinbg sachin wrote: > Hii every one I want to add some additional fields in inbuilt django user