Re: Django for desktop app development

2018-09-09 Thread Luc Saffre
Hi Muhammad,

we do write and maintain desktop applications for our customers using
Django. But before feeling able to offer this we wrote Lino, a kind of
"intrusive" Django application which replaces the Admin by a new
desktop-like user interface (currently based on ExtJS). It also replaces
the permissions system by a class-based approach. Because of its
intrusiveness we consider it a framework based on Django. Our first
production site went alive in January 2011. We believe that Lino has a
bright future and should be used by other companies as well.
Lino framework: http://lino-framework.org
My company: https://saffre-rumma.net/

Luc

On 07.09.2018 15:16, Muhammad Dilshad Khaliq wrote:
> I am final year student of software engineering.My final year project
> is about fee management system where student submit fee online and
> administrator use this system for managing fee and scholarship of
> student and notifying them about their any issue.So can i  make web
> based application or desktop application for administration site and
> notify student through mobile application.?*Is it good idea to use
> Django for desktop application?*  
> -- 
> 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/199c0ed7-ce95-42e4-b391-462a491c22fe%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/891bbd90-86a1-54f7-e8d2-88c06d2a39ee%40gmx.net.
For more options, visit https://groups.google.com/d/optout.


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

2018-09-09 Thread Mike Dewhirst

On 8/09/2018 9:09 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.


(Original Question on Stackoverflowhere 
: 
What is Django commend equivalent to Rails' $ rails db drop)


My scenario goes as follow:

1. I create 2 model class objects, Post, Product in models.py
2. Post has 2 attributes: post_title, post_text. Product has its own 
but that's irrelevant.

3. I make migrations and migrate.
4. Then I go to /admin of my page and add some rows both on Post and 
Product.


5. Now I remember that I I forgot to add an attribute post_author on 
Post and adds it in models.py
6. If I make migrations, Django warns me that already existing rows 
needs default values since they don't have this new attributes.
7. I don't want any post without an author so I want to drop this 
existing rows and make it all again.

8. However, I don't want to lose any Product rows already created.


Here's the question: How do I drop ONLY Post table leaving Product and 
my Superuser intact?


You need a custom migration ... ./migrations/remove_authorless_rows.py

def forwards_func(apps, schema_editor):
    Model_class = apps.get_model("", "Model_class")
    db_alias = schema_editor.connection.alias
    Model_class.objects.using(db_alias).filter(author=None).delete()

class Migration(migrations.Migration):

    dependencies = [
    ('', ''),
    ]

    operations = [
    migrations.RunPython(
    forwards_func,
    ),
    ]

This is off the top of my head so you would need to test it in a sandbox 
and repair as required.





Original Stackoverflow post suggests manually removing db.sqlite3 file 
and migrations files but I really don't think this is the way to go 
and there must be some best practice or commend for this since Django 
is already at 2.1.


If not, I think there must be a good reason not to have one and I want 
to know why.




--
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/a8170e3d-ae7f-4b59-9330-fef33fb9816d%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/b22a3574-4616-23fb-1d5a-f29c20cdd571%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


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 this we wrote Lino, a kind of
> "intrusive" Django application which replaces the Admin by a new
> desktop-like user interface (currently based on ExtJS). It also replaces
> the permissions system by a class-based approach. Because of its
> intrusiveness we consider it a framework based on Django. Our first
> production site went alive in January 2011. We believe that Lino has a
> bright future and should be used by other companies as well.
> Lino framework: http://lino-framework.org
> My company: https://saffre-rumma.net/
>
> Luc
>
> On 07.09.2018 15:16, Muhammad Dilshad Khaliq wrote:
>
> I am final year student of software engineering.My final year project is
> about fee management system where student submit fee online and
> administrator use this system for managing fee and scholarship of student
> and notifying them about their any issue.So can i  make web based
> application or desktop application for administration site and notify
> student through mobile application.?*Is it good idea to use Django for
> desktop application?*
> --
> 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/199c0ed7-ce95-42e4-b391-462a491c22fe%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/891bbd90-86a1-54f7-e8d2-88c06d2a39ee%40gmx.net
> 
> .
> 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/CAHV4E-cjsio2fThUeROrxn1MGmOdvx9NxZQRsWdg%3D8c3k4_zTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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.
>
> (Original Question on Stackoverflow here
> :
> What is Django commend equivalent to Rails' $ rails db drop)
>
> My scenario goes as follow:
>
> 1. I create 2 model class objects, Post, Product in models.py
> 2. Post has 2 attributes: post_title, post_text. Product has its own but
> that's irrelevant.
> 3. I make migrations and migrate.
> 4. Then I go to /admin of my page and add some rows both on Post and
> Product.
>
> 5. Now I remember that I I forgot to add an attribute post_author on Post
> and adds it in models.py
> 6. If I make migrations, Django warns me that already existing rows needs
> default values since they don't have this new attributes.
> 7. I don't want any post without an author so I want to drop this existing
> rows and make it all again.
> 8. However, I don't want to lose any Product rows already created.
>
>
> Here's the question: How do I drop ONLY Post table leaving Product and my
> Superuser intact?
>
> Original Stackoverflow post suggests manually removing db.sqlite3 file and
> migrations files but I really don't think this is the way to go and there
> must be some best practice or commend for this since Django is already at
> 2.1.
>
> If not, I think there must be a good reason not to have one and I want to
> know why.
>
>
>
> --
> 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/a8170e3d-ae7f-4b59-9330-fef33fb9816d%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/CAHV4E-crnof0n0YevJANPaiDR7ED50z57W2EH_SzdXGexdjC3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How to make custom field (defined as function) in StackedInline hidden?

2018-09-09 Thread Mirek Zvolsky
Django 2.1.

I have this code:

class AnswerInline(admin.StackedInline):
model = Answer
form = AnswerForm
fields = ("question_answer_type", "answer_plain")
readonly_fields = ("question_answer_type",)

def question_answer_type(self, row):
return row.question.answer_type

This works and I have new field "question_answer_type" in inline instances.

Now I want to make this field hidden. (I want use its content in 
JavaScript.)

I know there is forms.widgets.HiddenInput (or forms.HiddenInput ???) which 
I should probably use. But how to use it?

-- 
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/fb098587-51c6-4586-b3d0-cf5d376700e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Views & Template issue

2018-09-09 Thread Mikko Meronen
Hi again,

I'm trying to include two views in one html template, however the
latter(bolded) view doesn't work.

The first one works well and I can see the items created within last 15
minutes in my webpage. However when I want to see the older items (bolded
html part and index1 in views.py), I don't get anything, not even an error.
Do I need to add something to other files in Django or is this even
possible?

- Mikko



{% for news in newstest %}
 {{ news.title }} 
{{ news.publisher }} {{ news.section }} {{ news.country }}

{% endfor %}

 +15 min 

*{% for news in newstest1 %}*
*  {{ news.title }} *
* {{ news.publisher }} {{ news.section }} {{ news.country }}*
* *
* {% endfor %}*





def index(request):
newstest = NewsData.objects.filter(created__gt= time.time() -
900).order_by('-created')
args = {'newstest': newstest}
return render(request, "news/index.html", args)

def index1(request):
newstest1 = NewsData.objects.filter(created__lt= time.time() -
900).order_by('-created')
args1 = {'newstest1': newstest1}
return render(request, "news/index.html", args1)

-- 
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/CAGD0jjLmhg2SzTb6oCtapBK_h4AN5_zCUdsj7ntHGfteqiRFvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django for desktop app development

2018-09-09 Thread Gerald Brown
I have created something similar to this.  My setup is a 2 system 
IntrAnet ( not Internet). One system is being used as a web server 
running Nginx & Django with a Mariadb database.  I also had to install a 
wireless router.  The server system is using the Django Admin system as 
there are only 2 users.


From your description this could be system with one server and many 
clients connecting to it if they are in range of the router as in my 
case the client is just using Firefox web browser to connect to the server.


Does your school have WiFi available? If it does then this would be a 
snap to setup with the Django server.


Good luck.


On Friday, 07 September, 2018 08:16 PM, Muhammad Dilshad Khaliq wrote:
I am final year student of software engineering.My final year project 
is about fee management system where student submit fee online and 
administrator use this system for managing fee and scholarship of 
student and notifying them about their any issue.So can i  make web 
based application or desktop application for administration site and 
notify student through mobile application.?*Is it good idea to use 
Django for desktop application?*

--
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/199c0ed7-ce95-42e4-b391-462a491c22fe%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/71b4139b-2a76-1510-ad80-9b11e2bf1944%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Views & Template issue

2018-09-09 Thread Jason
You've defined two views which pass in different querysets to be rendered.

so if you hit index, you get the first queryset rendered but not the second 
because newstest1 is not rendered at all.  and vice versa.

solution is to add newstest1 to index and pass both querysets as context to 
the render.  eg

return render(request, 'news/index.html', {'newstest': newstest, 
'newstest1': newstest1})

-- 
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/6ebc2322-5bb5-4809-a6f3-1adf94e92168%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Data lost by a migration for renaming a field

2018-09-09 Thread Jason

>
> I'm also thinking it might be much helpful to detect the rename as much as 
> possible and give warning message about developer has to modify the 
> migration to rename field properly
>

sure, but how would you do this? And how would you cover all the possible 
cases to detect whether the dev intends to delete a field and replace it 
with another vs renaming the field entirely?  For the django core devs, I 
can see this being a very large effort feature that, despite everything, is 
very brittle and introduces uncertanity in migrations.

Having an option like that for makemigrations could be useful as an 
alternative.  Perhaps you can write up a ticket for that at 
https://code.djangoproject.com/query for discussion?

-- 
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/3ae0aee2-adc9-4a4d-ada9-3177c9e3d66f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


I don't clearly know how to name my issue, please read the body.

2018-09-09 Thread vineeth sagar
I have a form class like this, if the db is not populated I skip that 
field, in the future when something thaat might trigger a d population 
happens and I try to render this form, it doesn't recognise the update, but 
once I restart the development server it renders with the newly added 
field? Is this how it's supposed to happen?  How Can I overcome this? In 
production I cant just start/stop the server right?  can anyone help me 
with this? Thank you

class Schedule(...):

   try:
mails = forms.ModelChoiceField(queryset=FetchFrom.objects.all(),
to_field_name="mail",empty_label=None,initial=FetchFrom.objects.latest("id"
))
except Exception as e:
mails=None

-- 
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/8cd9ab46-ef1b-479a-8843-950ceb6820cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Views & Template issue

2018-09-09 Thread Mikko Meronen
Thank you.

-Mikko

su 9. syysk. 2018 klo 16.49 Jason (jjohns98...@gmail.com) kirjoitti:

> You've defined two views which pass in different querysets to be rendered.
>
> so if you hit index, you get the first queryset rendered but not the
> second because newstest1 is not rendered at all.  and vice versa.
>
> solution is to add newstest1 to index and pass both querysets as context
> to the render.  eg
>
> return render(request, 'news/index.html', {'newstest': newstest,
> 'newstest1': newstest1})
>
> --
> 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/6ebc2322-5bb5-4809-a6f3-1adf94e92168%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/CAGD0jjJXo8_Qe%2Bq9OWrYKC3zbzP%3DFj-S59SGNo%2ByvqehWqm0_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: does django pdf documentation has all of the existing functions and classes?

2018-09-09 Thread Andréas Kühne
The django documentation does not include the code for the django project.
It is the offline version of https://docs.djangoproject.com/

You won't need to know all the django code to use django on a website.

Regards,

Andréas


Den lör 8 sep. 2018 kl 18:21 skrev Amirhosein Majidi :

> does django pdf documentation has all of the existing functions and
> classes and modules of django framework?
> I just wanted to know if I read that pdf documentation that has about 1900
> pages then i learned all about the django or not.
>
> --
> 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/f422036f-9cd9-4711-b59a-fa6937096dee%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/CAK4qSCcm77GRfz-nF_kPLttZP-kjQFS5FWOHq5QT75VJAMz1_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2018-09-09 Thread KarmaFish
*How can I add more modules to a CORE in the backend so that I may create 
content pages please?*


Please forgive I am new.



-- 
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/90146419-2780-4cf8-8bc7-45cfd0c527bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error while doing django tutorial part 2

2018-09-09 Thread Pravinkumar Kale

I am also getting same issue...
Following is my code

##
from django.db import models
from django.utils import timezone

class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def __str__(self):
return self.question_text
def was_published_recently(self):
return self.pub_date>=timezone.now()



class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choice_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)
def __str__(self):
return self.question_text
#


On Sunday, May 27, 2018 at 11:51:39 AM UTC+5:30, TonyF-UK wrote:
>
> What is the code for your Choice model.  The error message clearly states 
> that the Choice model is the one with the problem. 
>
> -- 
> Anthony Flury
> email : anthon...@btinternet.com 
> Twitter : @TonyFlury
>
> On 26 May 2018, at 18:47, Kranthi Kiran <1991.k...@gmail.com > 
> wrote:
>
> Text of error message in case the image is not loading
>
>
> >>> q = Question.objects.get(pk=1)
> >>> q.choice_set.all()
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/usr/lib64/python3.6/site-packages/django/db/models/query.py", 
> line 251,  
> in __repr__
> return '<%s %r>' % (self.__class__.__name__, data)
>   File "/usr/lib64/python3.6/site-packages/django/db/models/base.py", line 
> 513,
>   in __repr__
> return '<%s: %s>' % (self.__class__.__name__, self)
>   File "/home/kkondapalli/mysite/polls/models.py", line 25, in __str__
> return self.question_text
> AttributeError: 'Choice' object has no attribute 'question_text'
> >>>
>
>
>
> On Saturday, 26 May 2018 22:49:04 UTC+5:30, Kranthi Kiran wrote:
>>
>> Hello User,
>>
>> I am following django tutorial at 
>> https://docs.djangoproject.com/en/2.0/intro/tutorial02/
>>
>> After modifying polls/models.py  and when running python3.6 manage.py 
>> shell again
>>
>>
>> I am getting the following error at the following 
>>
>> >>> q = Question.objects.get(pk=1)
>> # Display any choices from the related object set -- none so far.>>> 
>> q.choice_set.all()
>>
>>
>> Error screenshot
>>
>>
>>
>>
>> Please help me to resolve the issue at earliest
>>
> -- 
> 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...@googlegroups.com .
> To post to this group, send email to django...@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/0e27456c-eefa-4a1e-bf4f-a44d9e8dcad1%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/838a6bf2-9630-4eb5-8b61-18ba37115823%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 KarmaFish
Hello we  had no issues uploaded images to our servers pointing toa n image 
name.
But this Dev came in and changed the code.
Whenever we upload a new image for a product, after save , we'd go back to 
find that the image name had an automatically generated code added to the 
jpg filename making the image blank.

Where can I fix that please? Remove that superfluous random numbers please?

Thank you in advance,

[image: random.jpg]

-- 
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/eb34f554-04c8-487a-a03b-020a48e0bd14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how-to style registration form?

2018-09-09 Thread V O
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):
> username = forms.CharField(required=True, label='Username', 
> widget=forms.TextInput(attrs={'class': 'class-one-input-fields'}))
> password1 = forms.CharField(required=True, label='Password', 
> widget=forms.PasswordInput(attrs={'class': 'class-one-input-fields'}))
> password2 = forms.CharField(required=True, label='Password 
> confirmation', widget=forms.PasswordInput(attrs={'class': 
> 'class-one-input-fields'}))
> pubpgp = forms.CharField(required=True, label='Public PGP Key', 
> widget=forms.Textarea(attrs={'class': 'class-two-input-fields'}))
> captcha = CaptchaField()
> 
> def save(self, commit=True):
> username = super(RegistrationForm, self).save(commit=False)
> username.pubpgp = self.cleaned_data['pubpgp']
> 
> if commit:
> username.save()
> 
> return username


views.py:

def signup (request):
> if request.method == 'POST':
> form = RegistrationForm(request.POST)
> if form.is_valid():
> form.save()
> messages.add_message(request, messages.INFO, "Thanks for 
> you registration, you are now able to login.")
> return redirect(reverse('post_list'))
> else:
> form = RegistrationForm()
> 
> args = {'form': form}
> return render(request, 'registration/signup.html', args)


The error i get is:

> AttributeError: Manager isn't available; 'auth.User' has been swapped
> > for 'accounts.User'


in my settings.py i set:

> AUTH_USER_MODEL = 'accounts.User'


This is the current working state:

class RegistrationForm(UserCreationForm):
> user = forms.CharField(required=True)
> 
> class Meta:
> model = User
> fields = (
> 'user',
> 'password1',
> 'password2',
> 'pubpgp'
> )
> 
> captcha = CaptchaField()
> 
> def save(self, commit=True):
> user = super(RegistrationForm, self).save(commit=False)
> user.pubpgp = self.cleaned_data['pubpgp']
> 
> if commit:
> user.save()
> 
> return user


User model of accounts:

#User Model Manager
> class UserManager(BaseUserManager):
> def create_user(self, user, password=None):
> """
> Creates and saves a User with the given username and password.
> """
> if not user:
> raise ValueError('Error: The User you want to create must 
> have a username, try again')
> 
> new_user = self.model(
> user=self.model.normalize_username(user)
> )
> 
> new_user.set_password(password)
> new_user.save(using=self._db)
> return new_user
> 
> def create_staffuser(self, user, password):
> """
> Creates and saves a staff user with the given username and 
> password.
> """
> new_user = self.create_user(
> user,
> password=password,
> )
> new_user.staff = True
> new_user.save(using=self._db)
> return new_user
> 
> def create_superuser(self, user, password):
> """
> Creates and saves a superuser with the given username and 
> password.
> """
> new_user = self.create_user(
> user,
> password=password,
> )
> new_user.staff = True
> new_user.admin = True
> new_user.save(using=self._db)
> return new_user
> 
> 
> class User(AbstractBaseUser):
> 
> #User fields
> user = 
> models.CharField(verbose_name='username',max_length=30,unique=True)
> bio = models.TextField(max_length=5000, blank=True, null=True)
> pubpgp = models.TextField(blank=True, null=True)
> avatar = fields.ImageField(upload_to='avatar', blank=True, 
> null=True, dependencies=[
> FileDependency(processor=ImageProcessor(
> format='JPEG', scale={'max_width': 350, 'max_height': 
> 350}))
> ])
> 
> #Account typs
> active = models.BooleanField(default=True)
> staff = models.BooleanField(default=False) # a admin user; non 
> super-user
> admin = models.BooleanField(default=False) # a superuser
> # notice the absence of a "Password field", that's built in.
> 
> USERNAME_FIELD = 'user'
> REQUIRED_FIELDS = [] # Username & Password are required by default.
> 
> def 

serve mp3 files without html5

2018-09-09 Thread Mustafa Ryad
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 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/375600eb-9717-4f80-b034-56d0f6763591%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django for desktop app development

2018-09-09 Thread Vanity Fair
c#


On Fri, Sep 7, 2018 at 7:26 PM Muhammad Dilshad Khaliq <
dilshadkhaliq...@gmail.com> wrote:

> I am final year student of software engineering.My final year project is
> about fee management system where student submit fee online and
> administrator use this system for managing fee and scholarship of student
> and notifying them about their any issue.So can i  make web based
> application or desktop application for administration site and notify
> student through mobile application.?*Is it good idea to use Django for
> desktop application?*
>
> --
> 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/199c0ed7-ce95-42e4-b391-462a491c22fe%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/CAGBEyf6jgRTO3mOzoAfkj8FBBjRE-WcjXeNX3ss7TQ3%3DRsy5Zw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 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/375600eb-9717-4f80-b034-56d0f6763591%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/CAHV4E-cDtCy336QfKC7A-d81w-iZrczJ%2BdqyXtq56m8Cc%2BGPcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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):
>> username = forms.CharField(required=True, label='Username',
>> widget=forms.TextInput(attrs={'class': 'class-one-input-fields'}))
>> password1 = forms.CharField(required=True, label='Password',
>> widget=forms.PasswordInput(attrs={'class': 'class-one-input-fields'}))
>> password2 = forms.CharField(required=True, label='Password
>> confirmation', widget=forms.PasswordInput(attrs={'class':
>> 'class-one-input-fields'}))
>> pubpgp = forms.CharField(required=True, label='Public PGP Key',
>> widget=forms.Textarea(attrs={'class': 'class-two-input-fields'}))
>> captcha = CaptchaField()
>>
>> def save(self, commit=True):
>> username = super(RegistrationForm, self).save(commit=False)
>> username.pubpgp = self.cleaned_data['pubpgp']
>>
>> if commit:
>> username.save()
>>
>> return username
>
>
> views.py:
>
> def signup (request):
>> if request.method == 'POST':
>> form = RegistrationForm(request.POST)
>> if form.is_valid():
>> form.save()
>> messages.add_message(request, messages.INFO, "Thanks for
>> you registration, you are now able to login.")
>> return redirect(reverse('post_list'))
>> else:
>> form = RegistrationForm()
>>
>> args = {'form': form}
>> return render(request, 'registration/signup.html', args)
>
>
> The error i get is:
>
> > AttributeError: Manager isn't available; 'auth.User' has been swapped
>> > for 'accounts.User'
>
>
> in my settings.py i set:
>
> > AUTH_USER_MODEL = 'accounts.User'
>
>
> This is the current working state:
>
> class RegistrationForm(UserCreationForm):
>> user = forms.CharField(required=True)
>>
>> class Meta:
>> model = User
>> fields = (
>> 'user',
>> 'password1',
>> 'password2',
>> 'pubpgp'
>> )
>>
>> captcha = CaptchaField()
>>
>> def save(self, commit=True):
>> user = super(RegistrationForm, self).save(commit=False)
>> user.pubpgp = self.cleaned_data['pubpgp']
>>
>> if commit:
>> user.save()
>>
>> return user
>
>
> User model of accounts:
>
> #User Model Manager
>> class UserManager(BaseUserManager):
>> def create_user(self, user, password=None):
>> """
>> Creates and saves a User with the given username and password.
>> """
>> if not user:
>> raise ValueError('Error: The User you want to create must
>> have a username, try again')
>>
>> new_user = self.model(
>> user=self.model.normalize_username(user)
>> )
>>
>> new_user.set_password(password)
>> new_user.save(using=self._db)
>> return new_user
>>
>> def create_staffuser(self, user, password):
>> """
>> Creates and saves a staff user with the given username and
>> password.
>> """
>> new_user = self.create_user(
>> user,
>> password=password,
>> )
>> new_user.staff = True
>> new_user.save(using=self._db)
>> return new_user
>>
>> def create_superuser(self, user, password):
>> """
>> Creates and saves a superuser with the given username and
>> password.
>> """
>> new_user = self.create_user(
>> user,
>> password=password,
>> )
>> new_user.staff = True
>> new_user.admin = True
>> new_user.save(using=self._db)
>> return new_user
>>
>>
>> class User(AbstractBaseUser):
>>
>> #User fields
>> user =
>> models.CharField(verbose_name='username',max_length=30,unique=True)
>> bio = models.TextField(max_length=5000, blank=True, null=True)
>> pubpgp = models.TextField(blank=True, null=True)
>> avatar = fields.ImageField(upload_to='avatar', blank=True,
>> null=True, dependencies=[
>> FileDependency(processor=ImageProcessor(
>> format='JPEG', scale={'max_width': 350, 'max_height':
>> 350}))
>> ])
>>
>> #Account typs
>> active = models.BooleanField(default=True)
>> staff = models.BooleanField(default=False) # a admin user; non
>> super-user
>> admin = models.BooleanField(default=False) # a superuser
>> # notice the absence of a "Password field", that's built in.
>>

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 in and changed the code.
> Whenever we upload a new image for a product, after save , we'd go back to
> find that the image name had an automatically generated code added to the
> jpg filename making the image blank.
>
> Where can I fix that please? Remove that superfluous random numbers please?
>
> Thank you in advance,
>
> [image: random.jpg]
>
> --
> 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/eb34f554-04c8-487a-a03b-020a48e0bd14%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/CAHV4E-d7jA49anFAPbsO1m%3D_HyeoFWeT6x%2BjiT_oAV-NHf6NRA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 a CORE in the backend so that I may create
> content pages please?*
>
>
> Please forgive I am new.
>
>
>
> --
> 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/90146419-2780-4cf8-8bc7-45cfd0c527bb%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/CAHV4E-c-9-8BvcZnzr2wU0jyFG9gyQKQJCR6m1Z19sBZHp7B%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 Vijay Khemlani
If you're using django-storages with S3 as the media backend then there is
a setting called AWS_S3_FILE_OVERWRITE that prevents files with the same
name form being uploaded. In those cases the library appends a suffix
similar to your example.

Usually this is useful to prevent files from being overwritten (for example
if you upload photos for different products with the same filename you
don't want one to overwrite the other)

On Sun, Sep 9, 2018 at 8:06 PM mottaz hejaze  wrote:

> 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 in and changed the code.
>> Whenever we upload a new image for a product, after save , we'd go back
>> to find that the image name had an automatically generated code added to
>> the jpg filename making the image blank.
>>
>> Where can I fix that please? Remove that superfluous random numbers
>> please?
>>
>> Thank you in advance,
>>
>> [image: random.jpg]
>>
>> --
>> 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/eb34f554-04c8-487a-a03b-020a48e0bd14%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/CAHV4E-d7jA49anFAPbsO1m%3D_HyeoFWeT6x%2BjiT_oAV-NHf6NRA%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/CALn3ei0F1pbhprFEZCoh%2B%2BnerYSB5PVKxZa1ffMrkk9zJs90kw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to save multiple model form in one template?

2018-09-09 Thread Sunil Kothiyal
THIS IS MY FORM. I HOPE IT WILL CLEAR THE CONCEPT.

[image: STLY.png]

On Sun, Sep 9, 2018 at 1:59 AM Savvey Chauhan 
wrote:

> First Create 3 Views For each form .
> Second Create urls for all 3 views .
> THiRD CHANGE ACTION URL ACCORDING TO VIEWS URL
> ADD AJAX TO SUBMIT THE FORM
> IF YOU WANT TO DISPLAY A TOAST MESSAGE USE TOASTR ON HTML PAGE.
> eg :
>
>  
>   {% csrf_token %}
> 
>   First Name:
>   
> 
> 
>   Last Name:
>   
> 
>
>   
>   Gender:
>   
> 
> Submit
>   
>
> 
>
>
>
> 
> $( "#target" ).submit(function( event ) {
>   var form = $("form").serialize();
>   $.ajax({
> url: '',
> data: form ,
> success: function (data) {
> toastr["success"]("New Student Added !")
> }
>   });
>   event.preventDefault();
> });
> 
>
>  href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css";>
>  href="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.css">
>  src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js";>
>  src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js";>
>  src="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js">
>
>
> VIEWS.PY
>
>
> def update(request):
> fname =  request.GET.get('fname')
> lname =  request.GET.get('lname')
> gender = request.GET.get('gender')
> student.objects.create(firstname=fname,lastname=lname,gender=gender)
> return JsonResponse ({'Success':'Success'})
>
>
>
>
>
>
>
>
> On Fri, Sep 7, 2018 at 7:26 PM Anthony Petrillo <
> anthony.petri...@gmail.com> wrote:
>
>> Here is an example. I've cut out some of the code, but I this will give
>> you the general idea. Note, I move the data from the Day form in to the
>> Classes table. But you could just save both sets of data to their
>> respective tables if desired.
>>
>> in views.py
>>
>> class ClassesAddView(LoginRequiredMixin,View):
>> classesFormClass = ClassesRegForm
>> daysFormClass = DaysForm
>> template_name = 'qing/classes.html'
>>
>> def get(self,request,role='NoRole'):
>> classesForm = self.classesFormClass()
>> context['form'] = classesForm
>> daysForm = self.daysFormClass()
>> context['daysform'] = daysForm
>> return render(request,self.template_name, context)
>>
>> def post(self, request, *args, **kwargs):
>> classesForm = self.classesFormClass(request.POST)
>> daysForm = self.daysFormClass(request.POST)
>> if classesForm.is_valid() and daysForm.is_valid():
>> days = str(request.POST.getlist('days'))
>> reference = request.POST['reference']
>> classes = classesForm.save()
>> classes = Classes.objects.get(reference=reference)
>> classes.days = days
>> classes.save()
>> else:
>> classesForm = self.classesFormClass(request.POST)
>> context['form'] = classesForm
>> daysForm = self.daysFormClass(request.POST)
>> context['daysform'] = daysForm
>> context['datavalid'] = False
>> return render(request, self.template_name, context)
>> return HttpResponseRedirect(reverse('classesadd',args=(role,)))
>>
>> in forms.py
>>
>> class ClassesForm(ModelForm):
>> class Meta:
>> model = Classes
>> fields = ['reference','course','teachers',etc...]
>>
>> class DaysForm(forms.Form):
>> OPTIONS = (
>> ("Sunday", "Sunday"),
>> ("Monday", "Monday"),
>> ("Tuesday", "Tuesday"),
>> ("Wednesday", "Wednesday"),
>> ("Thursday", "Thursday"),
>> ("Friday", "Friday"),
>> ("Saturday", "Saturday"),
>> )
>> days = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple,
>>  choices=OPTIONS)
>>
>>
>> On Friday, September 7, 2018 at 9:47:51 AM UTC-4, Akshay Gaur wrote:
>>>
>>> I think it would be easier to write out a custom form (without using
>>> your model classes, just the fields that you will need for all the models)
>>> and then in the save method for that form's view, you create model objects
>>> using the fields in the POST request.
>>>
>>> On Friday, September 7, 2018 at 5:43:11 AM UTC-5, Django Lover wrote:


 I have one page, which I have to show three model form and three
 different submit button for each.

 My question is how I can save these three form individually?

 FOLLOWING IS CODE:-

 **form.py**


 class UserTaxesMultiForm(MultiModelForm):
form_classes = {
'user_tax_form': MyForm,
'user_discount_form': DiscountForm,
'user_shiping_form': ShipmentForm,
}

 *Note- m

Re: mysqlclient is already installed but it will give an error,please help

2018-09-09 Thread Deepak Kumar jha
Thanks buddy

On Wed, Sep 5, 2018 at 10:10 PM Everett White  wrote:

> Hey yay
>
> --
> 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/5af47051-dea8-4069-afc0-3cc192fd5219%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/CAFeJbFv7UKQcLuDA8iUveCqVRJcMaft_7S36wyiBys%3D6rQfY0w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: models.py => Mandatory to create tables?

2018-09-09 Thread Benjamin SOULAS
Hi Andréas,

Yes you are absolutely right, because I am still coding a POC to test some 
module features, I think I forgot to delete it. Now the make migrations and 
migrate works, BUT it didn't create the expected table, so still have an 
issue on that, hope to find quickly what happened?

Regards,

Benjamin

-- 
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/7b678fc2-c284-4ce6-bc39-4bc7646501dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.