Пример #1
0
def projects(request, project_name):
    projectList = [
        Project(
            "2dDrafting", "2D Drafting application", "Developer",
            "Vb.Net, Eyeshot",
            "The lightweight library which provides AutoCAD OEM module with Eyeshot. Features like command line utility, drawing, Layer and editing features."
        ),
        Project(
            "3dDrafting", "3D Graphical User Interface", "Developer",
            "C#.Net, Eyeshot",
            "Provided WinForm based thread safe solution which provides better 3D view with more features like WinForm controller, custom entity, selection filter, etc."
        ),
        Project(
            "vanity", "Vanity", "Research And Developer", "C#.Net, ASP.NET",
            "Provided webform based solution that scan QR code and super imposed model infront of QR."
        ),
        Project(
            "custom_insole_designer", "Custom Insole Designer", "Developer",
            "C#.Net, Eyeshot",
            "Provided WinForm based solution to generate the insole for scanned human foot. Also provided trimming, solidify, alignment and Mesh deformation (mapped 2D curvature to 3D surface). Generated machine code of insole for CNC machine."
        ),
        Project(
            "body_measuring", "Body Measuring Application",
            "Research And Developer", "C#.Net, Eyeshot",
            "Provided Eyeshot based solution to automate alignment of human leg in Z+ direction and Patella in X+ direction. Also, automatic determination of patella point, knee point and ankle point."
        ),
        Project(
            "cad_generate_and_view", "CAD Generate and View",
            "Research And Developer",
            "Eyeshot, Hoops, ACIS, Teigha, C#, C++, JavaScript, HTML, ASP.NET",
            "Research based project to figure out 10 years ahead product and technology. Investigated Eyeshot, Hoops Communicator, ACIS and Teigha technologies. Generated 3D model and annotations and stored all available formats. From 3D drawing created 2D drawing of model (Top, Front and ISO views). Generated hoops xml from BXF file to views and configure models."
        ),
        Project("fbx_exporter", "FBX Exporter ", "Developer",
                "C#.Net, C++, Autodesk FBX SDK",
                "Plugin to export the Fusion360 models into FBX file format."),
        Project(
            "json_library", "JSON Library", "Developer", "C#.Net, THREE.JS",
            "Developed JSON library to export JSON format 4.5 on the top of PTS library. JSON library supports to visibility of nodes, face level color support, cumulative transformation and face level transparency."
        ),
        Project(
            "voice_360", "VOICE 360 (2 Month)", "Developer & Mentor",
            "HTML, CSS, JavaScript, Forge, BIM 360, PHP, ASP.NET",
            "Voice 360 is an application which allows you to interact with Forge Viewer and BIM 360 model using voice. It provides voice recognition feature to execute Forge Viewer commands. With the help of microphone on your system, you can give commands instead of taking inputs from mouse and keyboard. This application seamlessly integrates with an existing system and can be extended with more commands as needed. Successfully submitted the application to BIM360 Autodesk Hackathon.(http://dev.prototechsolutions.com:83/ps/voice360/index.html)"
        ),
        Project(
            "autodesk_platform_plugins", "Autodesk Platform Plugins",
            "Developer", "C#.NET, C++",
            "Project consists of 3DPDF, OBJ and WebGL exporter’s plugins for major Autodesk Platforms like Inventor, AutoCAD, Revit."
        )
    ]
    for proj in projectList:
        if proj.id == project_name:
            output = proj
            break

    #output = projectList[0]

    context = {'output': output}

    return render(request, 'project_t.html', context)
Пример #2
0
def project_new(db_session):
    """ Creates a new project. """
    data = request.get_json()

    if data is None:
        abort(400)

    if "name" not in data:
        abort(400)
    if "url" not in data:
        abort(400)
    if "show" not in data:
        abort(400)
    if "description" not in data:
        abort(400)

    project = Project(name=data["name"],
                      url=data["url"],
                      show=data["show"],
                      description=data["description"])

    try:
        db_session.add(project)
        db_session.commit()
        return ("", 204)
    except IntegrityError:
        return jsonify(**{"error": "project could not be added"})
Пример #3
0
    def test_saving_retrieving_projects(self):
        first_project = Project()
        first_project.name = "The first ever test project"
        first_project.save()

        second_project = Project()
        second_project.name = "The second test project"
        second_project.save()

        saved_projects = Project.objects.all()
        self.assertEqual(saved_projects.count(), 2)

        first_saved_project = saved_projects[0]
        second_saved_project = saved_projects[1]
        self.assertEqual(first_saved_project.name,
                         'The first ever test project')
        self.assertEqual(second_saved_project.name, 'The second test project')
Пример #4
0
def addproject(request, personp):
    #notifications = NotificationsField.objects.filter(person__username__contains=personp)
    if request.method == 'GET':
        context = {
            'form': AddProject,
            #'notifications': notifications,
        }
        return render(request, 'addproject.html', context)
    else:
        form = AddProject(request.POST, request.FILES)
        if form.is_valid():
            sup = Project(
                title=form.cleaned_data['title'],
                description=form.cleaned_data['description'],
                technology=form.cleaned_data['technology'],
                person=request.user,
                main_image=form.cleaned_data['main_image'],
                source_code=form.cleaned_data['source_code'],
                img1=form.cleaned_data['img1'],
                img2=form.cleaned_data['img2'],
                img3=form.cleaned_data['img3'],
            )
            #g1 = Project()
            print(sup)
            sup.save()
            #yha bhari cheez ane wali h(notifications)
            User = get_user_model()
            val = FollowersField.objects.filter(
                person__username__contains=request.user.username)
            sending_person = NewFields.objects.filter(
                person__username__contains=request.user.username)[0]
            for v in val:
                user1 = User.objects.filter(username=v.followers)[0]
                #user1 = NewFields.objects.filter(person__username__contains=v.followers)[0]
                shi_dbba = NotificationsField(
                    person=user1,
                    sender=sending_person,
                    Pid=sup.id,
                    notifications=request.user.username +
                    " recently added a project")
                shi_dbba.save()
                print(shi_dbba.notifications)
            dbba = Project.objects.filter(person__username__contains=personp)
            info = NewFields.objects.filter(person__username__contains=personp)
            context = {
                'dbba': dbba,
                'info': info,
            }
            #return render(request,'portfolio.html',context)
            return redirect(reverse('portfolio'))
Пример #5
0
    def _enter_projects(self):
        with open('portfolio/data/projects-full.json', 'r') as f:
            data = json.load(f)

        for row in data:
            project = Project(title=row['title'],
                              description=row['description'],
                              live_link=row['live_link'],
                              source_code=row['source_code'],
                              blog_link=row['blog_link'])
            project.save()

            image_name = row['image']
            abs_path = os.path.join(BASE_DIR,
                                    "portfolio/data/screenshots/" + image_name)

            with open(abs_path, 'rb') as f:
                django_file = File(f)
                project.image.save(image_name, django_file)
Пример #6
0
def projects():
    form = AddProjectForm()
    if form.validate_on_submit():
        project = Project(name=form.name.data,
                          year=form.year.data,
                          url=form.url.data,
                          description=form.description.data,
                          creator=current_user)
        db.session.add(project)
        db.session.commit()
        flash('Your project has been added!', 'success')
        return redirect(url_for('projects'))
    elif (not form.validate_on_submit()) and request.method == "POST":
        flash(
            'There has been an error. Click on the + button to see the error.',
            'error')
    return render_template('projects.html',
                           page_title='Projects',
                           form=form,
                           projects=current_user.projects)
Пример #7
0
def add_entry(form_type):
    if form_type == 'testimoni':
        test_form = Testimoni_form()
        if test_form.validate_on_submit():
            if test_form.picture.data:
                pic_file = save_picture(test_form.picture.data)
                new_data = Testimonial(name=test_form.name.data,
                                       desc=test_form.desc.data,
                                       testimony=test_form.main.data,
                                       image_file=pic_file,
                                       author=current_user)
            else:
                new_data = Testimonial(name=test_form.name.data,
                                       desc=test_form.desc.data,
                                       testimony=test_form.main.data,
                                       author=current_user)
            db.session.add(new_data)
            db.session.commit()
            return redirect(url_for('main.data'))
        return render_template('new_data_test.html',
                               form=test_form,
                               type=form_type,
                               pic=True,
                               title='New Testimoni Data')
    if form_type == 'skill':
        skill_add_form = SkillForm()
        if skill_add_form.validate_on_submit():
            skilldata = Skills(sk_name=skill_add_form.skillsname.data,
                               sk_value=skill_add_form.skills.data,
                               author=current_user)
            db.session.add(skilldata)
            db.session.commit()
            return redirect(url_for('main.data'))
        return render_template('new_data_test.html',
                               form=skill_add_form,
                               type='testimoni',
                               title='New Skill Data')
    if form_type == 'project':
        projectform = ProjectForm()
        if projectform.validate_on_submit():
            for filled_data in projectform:
                if filled_data.data == '':
                    filled_data.data = None
            project_data = Project(p_name=projectform.title.data,
                                   p_description=projectform.Description.data,
                                   Organization=projectform.Organization.data,
                                   p_url=projectform.URL.data,
                                   cred_id=projectform.Credential.data,
                                   certi_url=projectform.Certificate.data,
                                   author=current_user)
            db.session.add(project_data)
            db.session.commit()
            return redirect(url_for('main.data'))
        return render_template('new_data_test.html',
                               form=projectform,
                               type='testimoni',
                               title='New Project Data')
    if form_type == 'job':
        jobform = JobForm()
        if jobform.validate_on_submit():
            if jobform.end.data == None:
                jobform.end.data = None
            else:
                jobform.end.data = datetime.strptime(
                    jobform.end.data.strftime("%B %Y"), "%B %Y")
            newjob = Job(role=jobform.role.data,
                         company=jobform.company.data,
                         start=datetime.strptime(
                             jobform.start.data.strftime("%B %Y"), "%B %Y"),
                         end=jobform.end.data,
                         place=jobform.place.data,
                         jd=jobform.jd.data,
                         author=current_user)
            db.session.add(newjob)
            db.session.commit()
            return redirect(url_for('main.data'))
        return render_template('new_data_test.html',
                               form=jobform,
                               type=form_type,
                               title='New Job Data')