Help

2018-07-08 Thread mottaz hejaze
push the code to git repository -- 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

Re: ValueError: Attempted relative import in non-package

2018-07-08 Thread mottaz hejaze
make sure that __init__.py file exists and not deleted -- 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 thi

Using multiple keyword arguments with reverse()

2018-07-08 Thread mottaz hejaze
try to use url('view function name' x y) -- 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 e

Re: django template rendering performance

2018-07-09 Thread mottaz hejaze
i dont think so . rendering templates , though rendering templates us a matter of the web server then users browsers On Tue, 10 Jul 2018, 00:56 Masoud Sadri, wrote: > Hi, > when rendering django(v 1.11) templates, is there any performance > difference between python 2.7 and 3.5? > > Thanks. > >

Re: facebook python script

2018-07-09 Thread mottaz hejaze
i think you gonna need to scrap the page first . then use requests library On Mon, 9 Jul 2018, 20:17 Ahmad, wrote: > Thank you very much dear. It will help alot me. > > On Monday, July 9, 2018 at 10:46:34 PM UTC+5, Ahmad wrote: >> >> Hello everyone, I hope all of you will be fine. >> >> I want a

Re: Using multiple keyword arguments with reverse()

2018-07-09 Thread mottaz hejaze
def my_view(request): ... return redirect('some-view-name', foo='bar') -- 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...@googlegro

Re: Is it possible to create models inside a database model

2018-07-11 Thread mottaz hejaze
for alexander .. you can make three models .. one for orders .. one for items .. and one for orderedItems .. the orderedItems model will have relations to both models items and orders On Tue, 10 Jul 2018, 21:19 aditya gupta, wrote: > Well I was thinking is that instead of using related_name is

Re: Is it possible to create models inside a database model

2018-07-11 Thread mottaz hejaze
13:09 mottaz hejaze, wrote: > for alexander .. you can make three models .. one for orders .. one for > items .. and one for orderedItems .. the orderedItems model will have > relations to both models items and orders > > On Tue, 10 Jul 2018, 21:19 aditya gupta, > wrote: >

Re: What is the best route to take to build a general CMS using Django?

2018-07-11 Thread mottaz hejaze
i think we can all use google mark . thanks for the good knowledge On Thu, 12 Jul 2018, 02:48 Mark Phillips, wrote: > > https://www.google.com/search?q=What+is+the+best+route+to+take+to+build+a+general+CMS+using+Django%3F&oq=What+is+the+best+route+to+take+to+build+a+general+CMS+using+Django%3F&a

Re: Weighing Scale & TCP IP connectivity

2018-07-13 Thread mottaz hejaze
check this https://raspberrypi.stackexchange.com/questions/70476/tcp-communication-raspberry-pi-and-pc-via-ethernet On Fri, 13 Jul 2018, 11:08 mottaz hejaze, wrote: > you dont need sockets , you can make the weight program scan inputs every > n seconds .. or you can program it to be an

Re: Weighing Scale & TCP IP connectivity

2018-07-13 Thread mottaz hejaze
you dont need sockets , you can make the weight program scan inputs every n seconds .. or you can program it to be an event hundler to any change in unputs start with weight program , design it the code it . test untill you satisfied .. now you can do the connection with backend in many ways ..

Re: Upgrading Django

2018-07-13 Thread mottaz hejaze
please share your settings.py . maybe you need to add or edit some middleware in settings.py On Fri, 13 Jul 2018, 14:36 Ghiath ghanem, wrote: > I'm working on small project, (Automatic Calender for the near future > events from Tweets). > I have upgraded to Python 3.4.3, and Now i would like to

Re: How is MySQL syntax for a table changed if I had a ManyToManyField?

2018-07-14 Thread mottaz hejaze
for many to many relationships between two tables .. you can make a third table that only contains the id fields ftom both tables , then you can make a third model for this table On Fri, 13 Jul 2018, 22:24 , wrote: > I tried for hours to get django's migrate/makemigrations function work but > mi

multiple django websites

2018-07-16 Thread mottaz hejaze
hello friends , is it possible to host multiple django websites on a single VPS ?? i mean real production websites all go live in the same time from the same VPS like digitalocean VPS thx all -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django "pub_date" error

2018-07-16 Thread mottaz hejaze
i dont know .. did you import the Question Class from models.py ?? On Mon, 16 Jul 2018, 05:25 Dylan Reinhold, wrote: > Without your code no one can help you (they will just be guessing). Post > your models.py and the exact traceback error. > > > On Sun, Jul 15, 2018 at 7:52 PM, Daniel Tobi Onipe

Re: how-to-fix-the-field-error-issue-in-django

2018-07-16 Thread mottaz hejaze
i dont use class based views , but in function based views , my url would be like this urls.py path(' ', views.list , name='list'), path('', views.detail , name='detail') views.py def list(request): ... def detail(request, id) ... On Mon, 16 Jul 2018, 13:37 gomathi subramanian,

multiple django websites

2018-07-16 Thread mottaz hejaze
hello friends , is it possible to host multiple django websites on a single VPS ?? i mean real production websites all go live in the same time from the same VPS like digitalocean VPS thx all -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Admin CSS Not Working in Opera or UC Browser

2018-07-16 Thread mottaz hejaze
if it worked with Explorer , it should work with all browsers !! On Mon, 16 Jul 2018, 14:15 Jason, wrote: > If this works in standard browsers like chrome, firefox, or IE/Edge, then > my guess is Opera and UC are doing non-standard things which break > rendering and/or requests. So I'd suggest

Re: multiple django websites

2018-07-16 Thread mottaz hejaze
ryan do you have a guide for this .. i found one but its outdated i think On Mon, 16 Jul 2018, 14:53 Ryan Nowakowski, wrote: > Yes > > On July 16, 2018 6:50:37 AM CDT, mottaz hejaze > wrote: >> >> >> hello friends , >> >> is it possible to hos

Re: multiple django websites

2018-07-16 Thread mottaz hejaze
t; articles are a bit dated - I don't think there are severe differences on > how to deploy django. > > Regards, > > Andréas > > 2018-07-16 15:18 GMT+02:00 mottaz hejaze : > >> ryan do you have a guide for this .. i found one but its outdated i think >> >

Re: Use an external REST API in django admin

2018-07-16 Thread mottaz hejaze
even REST API needs a database managments system like postgre or mysql so the lowest layer is postgre or mysql or mongodb the upper layer on top of any one of them , your backend REST API read about DMS and REST API On Mon, 16 Jul 2018, 20:44 Vijay Khemlani, wrote: > django rest framework

Re: problem with instaling django

2018-07-17 Thread mottaz hejaze
first install python 3.6 not 3.7 second install virtualenv third make a virtualenv and use pip inside it .. On Wed, 18 Jul 2018, 01:36 Gerardo Palazuelos Guerrero, < gerardo.palazue...@gmail.com> wrote: > Hi, > Is there any chance that you can use a Virtual Environment? > At least in my experienc

Re: How to create dynamic form field? Django 2.0

2018-07-19 Thread mottaz hejaze
this is not a django stuff , this is frontend .. you can use jquery or angularjs ..to hundle click event on the button and create the two fields ... this website cant be done with django templates.. you need djangorest framework with frontend javascript library the django template way , you creat

Re: django extensions and thems such as worpress or other cms

2018-07-20 Thread mottaz hejaze
you can do it in 2 ways : 1- you can use django-cms .. a content managment based on django https://www.django-cms.org/en/ 2 - you can use django cookiecutter a ready for production complete django installation https://github.com/pydanny/cookiecutter-django On Fri, 20 Jul 2018, 19:50 Mohsen Pah

Re: Djando 2.0.7 image handling problem on production server

2018-07-21 Thread mottaz hejaze
thats why they invented virtualenv On Sat, 21 Jul 2018, 19:36 Melvyn Sopacua, wrote: > On zaterdag 21 juli 2018 19:08:03 CEST Asif Khan wrote: > > > Oh dear I checked and found that Pillow was install in Python3.5 where as > > > production setup is for Python3.6 so Pillow was installed by pip3.5

Re: Good up-to-date Django report builder addons

2018-07-22 Thread mottaz hejaze
gerald do you realy need a package to do this , couse i think its not that hard to code by you ! i think there are time intervals functions in datetime and in django timezone you can use .. On Sun, 22 Jul 2018, 11:07 Gerald Brown, wrote: > Been there done that. > > It would not select a range o

Re: How can i require the user to login to see the view ?

2018-07-23 Thread mottaz hejaze
The login_required decorator¶ login_required(*redirect_field_name='next'*, *login_url=None*)[source]

Re: Server complete html Static App without apache server and without modifying html code

2018-07-23 Thread mottaz hejaze
i dont understand .. why you need backend anyway ? On Mon, 23 Jul 2018, 23:21 archit mehta, wrote: > > Hi, > > I have oraclejet frontend application and want to server that using > django, I did it with flask but don't know how to do with django. > > Here is complete description of my problem Pl

Re: BEGIINER_ISSUE (FIRST DJANGO PROJECT): The install worked successfully! Congratulations! You are seeing this page because DEBUG=True is in your settings file and you have not configured any URLs.

2018-07-23 Thread mottaz hejaze
this is not an issue , please go to documentation and follow the tutorial On Tue, 24 Jul 2018, 01:44 Vinko Sucur, wrote: > When i lounch my first djangoproject it always display the issue "The > install worked successfully! Congratulations! You are seeing this page > because DEBUG=True is in you

Re: How to automatically fill out an auto increment number in form field?

2018-07-23 Thread mottaz hejaze
you can use count() in views or models to count number of objects then add the new record On Tue, 24 Jul 2018, 02:55 Alexander Joseph, wrote: > Thanks Michael and Gerald. With an auto key field or primary key field > would users still be able to input their own value? And if so how would I > be

Re: Code vs Shell?

2018-07-23 Thread mottaz hejaze
python is not just web , python is very general and has many other usages , so you are developing but in a pythonic way , think of the shell as your scratch paper .. what if you want to learn a code snippet like querying the database with filters , do you have to waste time build a complete app to

Re: Django makemigration polls error

2018-07-25 Thread mottaz hejaze
just add 'polls' to the end of your installed apps in your settings.py On Wed, 25 Jul 2018, 13:23 Okware Aldo, wrote: > Did you include Polls app in INCLUDE_APPS section in settings. > > On Wed, 25 Jul 2018, 06:34 Ashish Kumar, wrote: > >> I am trying to follow the latest Django tutorial at the

Re: Django template cheat sheet or ebook

2018-07-30 Thread mottaz hejaze
i think docs are very good On Mon, 30 Jul 2018, 13:41 , wrote: > Hello, > > I have found a lot of example on the Django's CookBook, at this url : > https://code.djangoproject.com/wiki/CookBook > > Le lundi 30 juillet 2018 05:44:44 UTC+2, aditya a écrit : >> >> Can anyone tell me where I can find

Re: Authentication (Login view)

2018-07-30 Thread mottaz hejaze
in your templates you make a check using {% if request.user.is_authenticated % } content to show {% else %} the login url {% endif %} On Mon, 30 Jul 2018, 13:41 SAD BOIII, wrote: > ?guys, how can i stop logged in users from accessing the log in page again > > >

Re: Django App plugins

2018-07-30 Thread mottaz hejaze
wow , i faced the [ static and preload problem ] of settings.py once .. you cant govl around it becouse its how they designed django , you cant even pass empty containers for any future values , or will be calculated from the very next script after settings.py , you cant do that , there is no such

Re: How to use multiple ForeignKeys

2018-07-31 Thread mottaz hejaze
put a foreign key in invoices model that points to vendor model . On Tue, 31 Jul 2018, 00:38 Alexander Joseph, wrote: > I'm building a Purchase Order app that uses a ForeignKey for Vendors. I > want to be able to use another ForeignKey for invoices once a Vendor is > selected. So the choices of

Re: Live Streaming Video through WebCam

2018-08-01 Thread mottaz hejaze
this is awesome man .. On Tue, 31 Jul 2018, 16:20 Pravin Yadav, wrote: > *Hello Everyone, I'm using the Live Streaming Video through WebCam. It's > storing in .avi format. When i'm playing the Video. I'm not getting the > audio of that video. I hope that opencv does not provide the audio > featu

Re: changes in django appilcation

2018-08-16 Thread mottaz hejaze
You can use git On Thu, 16 Aug 2018, 09:58 Kamal Sharma, wrote: > Hey Django, > > I have deployed the django application on my production VPS, with the help > of this tutorial > https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04

Re: Wrting rtl templates for my web site

2018-08-18 Thread mottaz hejaze
يا عم محمد ده شغل css ابعتلي الكود وانا اشوفه .. ده ملوش علاقه بالدجانجو On Fri, 17 Aug 2018, 13:34 Mohamed El-sayed, < mohamed.elsayed.abdel...@gmail.com> wrote: > Hello Guys, > I have a question related to rtl templates > what i need is making a web site with heading rtl (Arabic language) and i

Re: Convoluted setup information

2018-08-18 Thread mottaz hejaze
what is your operating system ? what problems do you have On Sat, Aug 18, 2018 at 7:44 PM, wrote: > Hi, I'm new to Django and I found the setup guide pretty useless. Had to > refer to many articles on stackoverflow just to get basic django > (+pip+python+virtualenv) installed. > Why make it so c

Re: Django for desktop app development

2018-09-09 Thread mottaz hejaze
Luc , man this framework Lino is very Cool .. محمد عرفني يا هندسة انت عاوز تعمل ايه وربك ييسر اخوك معتز من مصر On Sun, Sep 9, 2018 at 9:14 AM Luc Saffre wrote: > Hi Muhammad, > > we do write and maintain desktop applications for our customers using > Django. But before feeling able to offer thi

Re: What is a standard practice to drop tables of an app in Django?

2018-09-09 Thread mottaz hejaze
make the attribute post_auther null = True , then make migrations On Sat, Sep 8, 2018 at 6:21 PM Jae Pil Choi wrote: > I'm asking this on the official Django community after I asked on > Stackoverflow because I still don't know what is the best practice for this > particular action. > > (Origi

Re: serve mp3 files without html5

2018-09-09 Thread mottaz hejaze
please give us more details On Mon, Sep 10, 2018 at 12:48 AM Mustafa Ryad wrote: > how can i play mp3 file without html5 tag > > -- > 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

Re: how-to style registration form?

2018-09-09 Thread mottaz hejaze
please full error message On Mon, Sep 10, 2018 at 12:48 AM V O wrote: > i currently try to "style" my registration form. in General i get the > concept behind it but not at that point: > > > This is how it's intendet to be (and not working): > > class RegistrationForm(UserCreationForm): >>

Re: A questionale developer had added exraneous code to image URLS that used to work. I would be gratefuldor your assitamce please?

2018-09-09 Thread mottaz hejaze
please share code .. Is this image from admin panel or from website front .. please share models.py , admin.py , views.py and forms.py On Mon, Sep 10, 2018 at 12:47 AM KarmaFish wrote: > Hello we had no issues uploaded images to our servers pointing toa n > image name. > But this Dev came

Re: How can I add more modules to a CORE in the backend so that I may create content pages please?

2018-09-09 Thread mottaz hejaze
do you want to share the news and events in catalog app ??? if this so , in your catalog app directory , in admin.py from CATC_CORE.models import Event, News admin.site.register(Event) admin.site.register(News) On Mon, Sep 10, 2018 at 12:47 AM KarmaFish wrote: > *How can I add more modules to

Re: Django 1.9.8 with mysql 'Commands out of sync; you can't run this command now' exception

2018-09-23 Thread mottaz hejaze
try latest_message = Message.objects.filter(example_field=1)[::-1].first() On Mon, Sep 24, 2018 at 5:55 AM wrote: > I am a python developer and I am using Django 1.9.8 for my project. > I am having a problem with MySQL like below: > > I have a model named 'Message' and sometimes when running t

Re: Best option for hosting django website

2018-10-08 Thread mottaz hejaze
If you are a biggener and don't know how to setup and configure a VPS , use pythonanywhere or if you have a linux experience , use Digitalocean اذا محتاج اي مساعدة .. راسلني .. اخوك معتز من مصر -- You received this message because

Re: Help me to Generate CSV through Django View from database - and download the same

2018-10-16 Thread mottaz hejaze
import csvfrom django.http import HttpResponse def some_view(request): # Create the HttpResponse object with the appropriate CSV header. response = HttpResponse(content_type='text/csv') response['Content-Disposition'] = 'attachment; filename="somefilename.csv"' writer = csv.writer(

Re: django username and password error

2018-10-17 Thread mottaz hejaze
does your server support SSL ? did you configure your server for SSL ? On Wed, Oct 17, 2018 at 12:10 PM Joel Mathew wrote: > After attempting to redirect http to https by setting SECURE_SSL_REDIRECT > to True and a few other changes, suddenly I found myself locked out of > django login. It didnt

Re: django username and password error

2018-10-17 Thread mottaz hejaze
try this : https://github.com/teddziuba/django-sslserver On Wed, Oct 17, 2018 at 1:14 PM Joel wrote: > Yes, my server did support ssl. But on my local development environment it > doesn't support ssl. > > On Wed, 17 Oct, 2018, 4:41 PM mottaz hejaze, wrote: > >> do